RenderWolf .java

net.minecraft.client.renderer.entity.RenderWolf (class): members: anrgyWolfTextures, tamedWolfTextures, wolfTextures, handleRotationFloat, doRender.

net.minecraft.client.renderer.entityclass51 linesclientextends RenderLiving<EntityWolf>1.9 KB

API Surface (3)

float handleRotationFloat(EntityWolf livingBase, float partialTicks)
void doRender(EntityWolf entity, double x, double y, double z, float entityYaw, float partialTicks)
ResourceLocation getEntityTexture(EntityWolf entity)

Fields & Constants (3)

wolfTextures
tamedWolfTextures
anrgyWolfTextures

String literals (3)

"textures/entity/wolf/wolf.png"
"textures/entity/wolf/wolf_tame.png"
"textures/entity/wolf/wolf_angry.png"

Code Graph: Dependencies (7)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

RenderWolf.java51 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer.entity;
2
3
import net.minecraft.client.model.ModelBase;
4
import net.minecraft.client.renderer.GlStateManager;
5
import net.minecraft.client.renderer.entity.layers.LayerWolfCollar;
6
import net.minecraft.entity.passive.EntityWolf;
7
import net.minecraft.util.ResourceLocation;
8
9
public class RenderWolf extends RenderLiving<EntityWolf>
10
{
11
    private static final ResourceLocation wolfTextures = new ResourceLocation("textures/entity/wolf/wolf.png");
12
    private static final ResourceLocation tamedWolfTextures = new ResourceLocation("textures/entity/wolf/wolf_tame.png");
13
    private static final ResourceLocation anrgyWolfTextures = new ResourceLocation("textures/entity/wolf/wolf_angry.png");
14
15
    public RenderWolf(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn)
16
    {
17
        super(renderManagerIn, modelBaseIn, shadowSizeIn);
18
        this.addLayer(new LayerWolfCollar(this));
19
    }
20
21
    /**
22
     * Defines what float the third param in setRotationAngles of ModelBase is
23
     */
24
    protected float handleRotationFloat(EntityWolf livingBase, float partialTicks)
25
    {
26
        return livingBase.getTailRotation();
27
    }
28
29
    /**
30
     * Renders the desired {@code T} type Entity.
31
     */
32
    public void doRender(EntityWolf entity, double x, double y, double z, float entityYaw, float partialTicks)
33
    {
34
        if (entity.isWolfWet())
35
        {
36
            float f = entity.getBrightness(partialTicks) * entity.getShadingWhileWet(partialTicks);
37
            GlStateManager.color(f, f, f);
38
        }
39
40
        super.doRender(entity, x, y, z, entityYaw, partialTicks);
41
    }
42
43
    /**
44
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
45
     */
46
    protected ResourceLocation getEntityTexture(EntityWolf entity)
47
    {
48
        return entity.isTamed() ? tamedWolfTextures : (entity.isAngry() ? anrgyWolfTextures : wolfTextures);
49
    }
50
}
51

Deobfuscated MCP 1.8.9 source of RenderWolf from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/renderer/entity/RenderWolf.java), stored verbatim.