RenderOcelot .java

net.minecraft.client.renderer.entity.RenderOcelot (class): members: siameseOcelotTextures, blackOcelotTextures, redOcelotTextures, ocelotTextures.

net.minecraft.client.renderer.entityclass56 linesclientextends RenderLiving<EntityOcelot>1.9 KB

API Surface (2)

ResourceLocation getEntityTexture(EntityOcelot entity)
void preRenderCallback(EntityOcelot entitylivingbaseIn, float partialTickTime)

Fields & Constants (4)

blackOcelotTextures
ocelotTextures
redOcelotTextures
siameseOcelotTextures

String literals (4)

"textures/entity/cat/black.png"
"textures/entity/cat/ocelot.png"
"textures/entity/cat/red.png"
"textures/entity/cat/siamese.png"

Code Graph: Dependencies (6)

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

Full Source

RenderOcelot.java56 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.entity.passive.EntityOcelot;
6
import net.minecraft.util.ResourceLocation;
7
8
public class RenderOcelot extends RenderLiving<EntityOcelot>
9
{
10
    private static final ResourceLocation blackOcelotTextures = new ResourceLocation("textures/entity/cat/black.png");
11
    private static final ResourceLocation ocelotTextures = new ResourceLocation("textures/entity/cat/ocelot.png");
12
    private static final ResourceLocation redOcelotTextures = new ResourceLocation("textures/entity/cat/red.png");
13
    private static final ResourceLocation siameseOcelotTextures = new ResourceLocation("textures/entity/cat/siamese.png");
14
15
    public RenderOcelot(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn)
16
    {
17
        super(renderManagerIn, modelBaseIn, shadowSizeIn);
18
    }
19
20
    /**
21
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
22
     */
23
    protected ResourceLocation getEntityTexture(EntityOcelot entity)
24
    {
25
        switch (entity.getTameSkin())
26
        {
27
            case 0:
28
            default:
29
                return ocelotTextures;
30
31
            case 1:
32
                return blackOcelotTextures;
33
34
            case 2:
35
                return redOcelotTextures;
36
37
            case 3:
38
                return siameseOcelotTextures;
39
        }
40
    }
41
42
    /**
43
     * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
44
     * entityLiving, partialTickTime
45
     */
46
    protected void preRenderCallback(EntityOcelot entitylivingbaseIn, float partialTickTime)
47
    {
48
        super.preRenderCallback(entitylivingbaseIn, partialTickTime);
49
50
        if (entitylivingbaseIn.isTamed())
51
        {
52
            GlStateManager.scale(0.8F, 0.8F, 0.8F);
53
        }
54
    }
55
}
56

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