Fixed facades not showing up before F3+A. This is caused by the BlockRendererDispatcher not existing yet in the ModelBakeEvent event.

This commit is contained in:
Gunther De Wachter 2017-07-19 19:08:49 +02:00
parent 0741e4ae09
commit 7414840530

View file

@ -63,8 +63,6 @@ public class FacadeBuilder
private final TextureAtlasSprite facadeTexture;
private final BlockRendererDispatcher blockRendererDispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
private static final Set<ResourceLocation> warnedFor = new HashSet<>();
FacadeBuilder( VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
@ -213,6 +211,7 @@ public class FacadeBuilder
final float thickness = thinFacades ? 1 : 2;
BlockRendererDispatcher blockRendererDispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
IBakedModel blockModel = blockRendererDispatcher.getModelForState( blockState );
final int color;