TileEntitySpecialRenderer .java

net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer (class): members: rendererDispatcher, DESTROY_STAGES, forceTileEntityRender, getWorld.

net.minecraft.client.renderer.tileentityclass51 linesclientextends TileEntity>2.2 KB

API Surface (5)

void bindTexture(ResourceLocation location)
World getWorld()
void setRendererDispatcher(TileEntityRendererDispatcher rendererDispatcherIn)
FontRenderer getFontRenderer()
boolean forceTileEntityRender()

Fields & Constants (2)

DESTROY_STAGES
rendererDispatcher

String literals (10)

"textures/blocks/destroy_stage_0.png"
"textures/blocks/destroy_stage_1.png"
"textures/blocks/destroy_stage_2.png"
"textures/blocks/destroy_stage_3.png"
"textures/blocks/destroy_stage_4.png"
"textures/blocks/destroy_stage_5.png"
"textures/blocks/destroy_stage_6.png"
"textures/blocks/destroy_stage_7.png"
"textures/blocks/destroy_stage_8.png"
"textures/blocks/destroy_stage_9.png"

Code Graph: Dependencies (6)

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

Full Source

TileEntitySpecialRenderer.java51 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer.tileentity;
2
3
import net.minecraft.client.gui.FontRenderer;
4
import net.minecraft.client.renderer.texture.TextureManager;
5
import net.minecraft.tileentity.TileEntity;
6
import net.minecraft.util.ResourceLocation;
7
import net.minecraft.world.World;
8
9
public abstract class TileEntitySpecialRenderer<T extends TileEntity>
10
{
11
    protected static final ResourceLocation[] DESTROY_STAGES = new ResourceLocation[] {new ResourceLocation("textures/blocks/destroy_stage_0.png"), new ResourceLocation("textures/blocks/destroy_stage_1.png"), new ResourceLocation("textures/blocks/destroy_stage_2.png"), new ResourceLocation("textures/blocks/destroy_stage_3.png"), new ResourceLocation("textures/blocks/destroy_stage_4.png"), new ResourceLocation("textures/blocks/destroy_stage_5.png"), new ResourceLocation("textures/blocks/destroy_stage_6.png"), new ResourceLocation("textures/blocks/destroy_stage_7.png"), new ResourceLocation("textures/blocks/destroy_stage_8.png"), new ResourceLocation("textures/blocks/destroy_stage_9.png")};
12
    protected TileEntityRendererDispatcher rendererDispatcher;
13
14
    public abstract void renderTileEntityAt(T te, double x, double y, double z, float partialTicks, int destroyStage);
15
16
    protected void bindTexture(ResourceLocation location)
17
    {
18
        TextureManager texturemanager = this.rendererDispatcher.renderEngine;
19
20
        if (texturemanager != null)
21
        {
22
            texturemanager.bindTexture(location);
23
        }
24
    }
25
26
    protected World getWorld()
27
    {
28
        return this.rendererDispatcher.worldObj;
29
    }
30
31
    public void setRendererDispatcher(TileEntityRendererDispatcher rendererDispatcherIn)
32
    {
33
        this.rendererDispatcher = rendererDispatcherIn;
34
    }
35
36
    public FontRenderer getFontRenderer()
37
    {
38
        return this.rendererDispatcher.getFontRenderer();
39
    }
40
41
    /**
42
     * If true the {@link TileEntitySpecialRenderer} will always be rendered while the player is in the render bounding
43
     * box {@link TileEntity#getRenderBoundingBox()} and his squared distance with the {@link TileEntity} is smaller
44
     * than {@link TileEntity#getMaxRenderDistanceSquared()}.
45
     */
46
    public boolean forceTileEntityRender()
47
    {
48
        return false;
49
    }
50
}
51

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