Fix merge conflicts

This commit is contained in:
Sollace 2018-06-02 18:05:33 +02:00
parent 9899a01aae
commit 0393daa0ba
3 changed files with 16 additions and 2 deletions

View file

@ -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;

View file

@ -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) {
}
}

View file

@ -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);
}
}