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); } }