From 568ed80ede54371b9a8ca41dce443d45292933fa Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Sat, 9 Jan 2016 00:03:04 -0600 Subject: [PATCH] Allow platform to render other smart models --- .../java/vazkii/botania/client/model/PlatformModel.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/client/model/PlatformModel.java b/src/main/java/vazkii/botania/client/model/PlatformModel.java index 6b3ea4c30..516bdd1e3 100644 --- a/src/main/java/vazkii/botania/client/model/PlatformModel.java +++ b/src/main/java/vazkii/botania/client/model/PlatformModel.java @@ -40,7 +40,14 @@ public class PlatformModel implements ISmartBlockModel { } else if (heldState != null){ if (heldState.getBlock().canRenderInLayer(layer)) { // Steal camo's model - return mc.getBlockRendererDispatcher().getBlockModelShapes().getModelForState(heldState); + IBakedModel model = mc.getBlockRendererDispatcher().getBlockModelShapes().getModelForState(heldState); + + if (model instanceof ISmartBlockModel) { + // Their model can be smart too + model = ((ISmartBlockModel) model).handleBlockState(heldState); + } + + return model; } }