diff --git a/src/main/java/com/minelittlepony/model/armour/ModelPonyArmor.java b/src/main/java/com/minelittlepony/model/armour/ModelPonyArmor.java index d1cfd238..afcec982 100644 --- a/src/main/java/com/minelittlepony/model/armour/ModelPonyArmor.java +++ b/src/main/java/com/minelittlepony/model/armour/ModelPonyArmor.java @@ -97,7 +97,7 @@ public class ModelPonyArmor extends AbstractPonyModel { flankGuard.showModel = invisible; saddle.showModel = invisible; bipedHead.showModel = invisible; - tail.isHidden = true; + tail.setVisible(false); neck.isHidden = true; upperTorso.isHidden = true; snout.isHidden = true; diff --git a/src/main/java/com/minelittlepony/model/capabilities/IModelPart.java b/src/main/java/com/minelittlepony/model/capabilities/IModelPart.java index bf8c0af3..f1bddfe3 100644 --- a/src/main/java/com/minelittlepony/model/capabilities/IModelPart.java +++ b/src/main/java/com/minelittlepony/model/capabilities/IModelPart.java @@ -19,4 +19,11 @@ public interface IModelPart { * Renders this model component. */ void render(float scale); + + /** + * Sets whether this part should be rendered. + */ + default void setVisible(boolean visible) { + + } } diff --git a/src/main/java/com/minelittlepony/model/components/PonyTail.java b/src/main/java/com/minelittlepony/model/components/PonyTail.java index daaabff9..c7a50f41 100644 --- a/src/main/java/com/minelittlepony/model/components/PonyTail.java +++ b/src/main/java/com/minelittlepony/model/components/PonyTail.java @@ -17,6 +17,8 @@ public class PonyTail extends PlaneRenderer implements IModelPart { private int tailStop = 0; + public boolean isHidden = false; + public PonyTail(AbstractPonyModel model) { super(model); theModel = model; @@ -72,6 +74,11 @@ public class PonyTail extends PlaneRenderer implements IModelPart { rotateAngleX = -BODY_ROTATE_ANGLE_X_SNEAK + 0.1F; } + @Override + public void setVisible(boolean visible) { + isHidden = !visible; + } + private class TailSegment extends PlaneRenderer { private final int index; @@ -103,7 +110,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart { @Override public void render(float scale) { - if (index < tailStop) { + if (!isHidden && index < tailStop) { super.render(scale); } }