From 490ec69daf95663e76dbe04837a55ec63a7e87e9 Mon Sep 17 00:00:00 2001 From: ah-OOG-ah <75745146+ah-OOG-ah@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:50:37 -0400 Subject: [PATCH] Allow model overriding in the model ISBRH --- .../com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java b/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java index be462688..6da1d32b 100644 --- a/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java +++ b/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java @@ -28,6 +28,12 @@ public class ModelISBRH implements ISimpleBlockRenderingHandler { private ModelISBRH() {} + /// Override this if you want programmatic model selection + @SuppressWarnings("unused") + protected BakedModel getModel(IBlockAccess world, Block block, int meta, int x, int y, int z) { + return ModelRegistry.getBakedModel(new BlockState(block, meta)); + } + @Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { @@ -41,7 +47,7 @@ public class ModelISBRH implements ISimpleBlockRenderingHandler { // Get the model! final int meta = world.getBlockMetadata(x, y, z); - final var model = ModelRegistry.getBakedModel(new BlockState(block, meta)); + final var model = getModel(world, block, meta, x, y, z); int color = model.getColor(world, x, y, z, block, meta, random);