From 51ad71a355891ae1b7bc79976b76ba980eb4772e Mon Sep 17 00:00:00 2001 From: asie Date: Wed, 12 Dec 2018 14:53:04 +0100 Subject: [PATCH] fix BlockEntityRenderRegistry not understanding how constructors work --- .../fabric/client/render/BlockEntityRendererRegistry.java | 4 ++-- .../mixin/client/render/MixinBlockEntityRenderManager.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java b/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java index d9c99bb1f..7e1be4f02 100644 --- a/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java +++ b/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java @@ -35,7 +35,7 @@ public class BlockEntityRendererRegistry { } - public void initialize(Map, BlockEntityRenderer> map) { + public void initialize(BlockEntityRenderDispatcher instance, Map, BlockEntityRenderer> map) { if (renderers != null && renderers != map) { throw new RuntimeException("Tried to set renderers twice!"); } @@ -46,7 +46,7 @@ public class BlockEntityRendererRegistry { renderers = map; for (BlockEntityRenderer renderer : renderersTmp.values()) { - renderer.setRenderManager(BlockEntityRenderDispatcher.INSTANCE); + renderer.setRenderManager(instance); } renderers.putAll(renderersTmp); renderersTmp = null; diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java index 0bac8ce30..65f0b84de 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java @@ -35,6 +35,6 @@ public class MixinBlockEntityRenderManager { @Inject(method = "()V", at = @At("RETURN")) public void init(CallbackInfo info) { - BlockEntityRendererRegistry.INSTANCE.initialize(renderers); + BlockEntityRendererRegistry.INSTANCE.initialize((BlockEntityRenderDispatcher) (Object) this, renderers); } }