forked from FabricMC/fabric
fix BlockEntityRenderRegistry not understanding how constructors work
This commit is contained in:
parent
9d0f790bfc
commit
51ad71a355
2 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ public class BlockEntityRendererRegistry {
|
|||
|
||||
}
|
||||
|
||||
public void initialize(Map<Class<? extends BlockEntity>, BlockEntityRenderer<? extends BlockEntity>> map) {
|
||||
public void initialize(BlockEntityRenderDispatcher instance, Map<Class<? extends BlockEntity>, BlockEntityRenderer<? extends BlockEntity>> 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;
|
||||
|
|
|
@ -35,6 +35,6 @@ public class MixinBlockEntityRenderManager {
|
|||
|
||||
@Inject(method = "<init>()V", at = @At("RETURN"))
|
||||
public void init(CallbackInfo info) {
|
||||
BlockEntityRendererRegistry.INSTANCE.initialize(renderers);
|
||||
BlockEntityRendererRegistry.INSTANCE.initialize((BlockEntityRenderDispatcher) (Object) this, renderers);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue