Allow platform to render other smart models

This commit is contained in:
Vincent Lee committed 2016-01-09 00:03:04 -06:00
1 parent c3dce97e0d
commit 568ed80ede
1 file changed
+8 -1
@@ -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;
}
}