Fix NPE in TileEntityPistonRender when class is created to early.
This commit is contained in:
parent
be18bdee88
commit
8045e48952
2 changed files with 11 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/tileentity/TileEntityPistonRenderer.java
|
||||
@@ -67,6 +67,7 @@
|
||||
}
|
||||
|
||||
private boolean func_188186_a(BlockPos p_188186_1_, IBlockState p_188186_2_, BufferBuilder p_188186_3_, World p_188186_4_, boolean p_188186_5_) {
|
||||
+ if (field_178462_c == null) field_178462_c = Minecraft.func_71410_x().func_175602_ab();
|
||||
return this.field_178462_c.func_175019_b().func_199324_a(p_188186_4_, this.field_178462_c.func_184389_a(p_188186_2_), p_188186_2_, p_188186_1_, p_188186_3_, p_188186_5_, new Random(), p_188186_2_.func_209533_a(p_188186_1_));
|
||||
}
|
||||
}
|
|
@ -168,6 +168,7 @@ public net.minecraft.resources.AbstractResourcePack field_195771_a # file
|
|||
public net.minecraft.client.renderer.entity.RenderManager field_78729_o #renderers
|
||||
# TileEntityRendererDispatcher
|
||||
public net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher field_147557_n # fontRenderer - needed for rendering text in TESR items before entering world
|
||||
private-f net.minecraft.client.renderer.tileentity.TileEntityPistonRenderer field_178462_c # blockRenderer - it's static so we need to un-finalize in case this class loads to early.
|
||||
# GameRenderer
|
||||
public net.minecraft.client.renderer.GameRenderer func_175069_a(Lnet/minecraft/util/ResourceLocation;)V #loadShader
|
||||
# WeightedRandomItem
|
||||
|
|
Loading…
Reference in a new issue