diff --git a/src/main/java/com/simibubi/create/modules/palettes/PalettesRegistrate.java b/src/main/java/com/simibubi/create/modules/palettes/PalettesRegistrate.java index 9f3eaafe3..d0ae1daee 100644 --- a/src/main/java/com/simibubi/create/modules/palettes/PalettesRegistrate.java +++ b/src/main/java/com/simibubi/create/modules/palettes/PalettesRegistrate.java @@ -24,6 +24,7 @@ import net.minecraft.block.Blocks; import net.minecraft.client.renderer.RenderType; import net.minecraft.util.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; public class PalettesRegistrate extends CreateRegistrateBase { @@ -102,8 +103,11 @@ public class PalettesRegistrate extends CreateRegistrateBase private NonNullUnaryOperator> connectedTextures( ConnectedTextureBehaviour behavior) { - return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> - CreateClient.getCustomBlockModels() - .register(entry.delegate, model -> new CTModel(model, behavior)))); + return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> registerModel(entry, behavior))); + } + + @OnlyIn(Dist.CLIENT) + private void registerModel(Block entry, ConnectedTextureBehaviour behavior) { + CreateClient.getCustomBlockModels().register(entry.delegate, model -> new CTModel(model, behavior)); } }