RenderGhast .java

net.minecraft.client.renderer.entity.RenderGhast (class, 39 lines): members: ghastShootingTextures, ghastTextures, preRenderCallback, getEntityTexture.

net.minecraft.client.renderer.entityclass39 linesclientextends RenderLiving<EntityGhast>1.4 KB

API Surface (2)

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

Fields & Constants (2)

ghastTextures
ghastShootingTextures

String literals (2)

"textures/entity/ghast/ghast.png"
"textures/entity/ghast/ghast_shooting.png"

Code Graph: Dependencies (6)

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

Full Source

RenderGhast.java39 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer.entity;
2
3
import net.minecraft.client.model.ModelGhast;
4
import net.minecraft.client.renderer.GlStateManager;
5
import net.minecraft.entity.monster.EntityGhast;
6
import net.minecraft.util.ResourceLocation;
7
8
public class RenderGhast extends RenderLiving<EntityGhast>
9
{
10
    private static final ResourceLocation ghastTextures = new ResourceLocation("textures/entity/ghast/ghast.png");
11
    private static final ResourceLocation ghastShootingTextures = new ResourceLocation("textures/entity/ghast/ghast_shooting.png");
12
13
    public RenderGhast(RenderManager renderManagerIn)
14
    {
15
        super(renderManagerIn, new ModelGhast(), 0.5F);
16
    }
17
18
    /**
19
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
20
     */
21
    protected ResourceLocation getEntityTexture(EntityGhast entity)
22
    {
23
        return entity.isAttacking() ? ghastShootingTextures : ghastTextures;
24
    }
25
26
    /**
27
     * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
28
     * entityLiving, partialTickTime
29
     */
30
    protected void preRenderCallback(EntityGhast entitylivingbaseIn, float partialTickTime)
31
    {
32
        float f = 1.0F;
33
        float f1 = (8.0F + f) / 2.0F;
34
        float f2 = (8.0F + 1.0F / f) / 2.0F;
35
        GlStateManager.scale(f2, f1, f2);
36
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
37
    }
38
}
39

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