mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed armour crash
This commit is contained in:
parent
fb3973a3f1
commit
d438d0f5bb
2 changed files with 15 additions and 9 deletions
|
@ -38,9 +38,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
public static final Pivot BACK_LEGS_SLEEPING = new Pivot(0, 2, -6);
|
||||
|
||||
protected final ModelPart neck;
|
||||
private final ModelPart mane;
|
||||
private final ModelPart nose;
|
||||
private final ModelPart tailStub;
|
||||
|
||||
public final RenderList helmetRenderList;
|
||||
protected final RenderList neckRenderList;
|
||||
|
@ -59,9 +56,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
super(tree);
|
||||
|
||||
neck = tree.getChild("neck");
|
||||
mane = neck.getChild("mane");
|
||||
nose = head.getChild("nose");
|
||||
tailStub = body.getChild("tail_stub");
|
||||
mainRenderList = RenderList.of()
|
||||
.add(withStage(BodyPart.BODY, bodyRenderList = RenderList.of(body).add(body::rotate)))
|
||||
.add(withStage(BodyPart.NECK, neckRenderList = RenderList.of(neck)))
|
||||
|
@ -563,9 +557,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
super.setVisible(visible);
|
||||
neck.visible = visible;
|
||||
hat.visible &= !attributes.isHorsey;
|
||||
mane.visible = attributes.isHorsey;
|
||||
nose.visible = attributes.isHorsey;
|
||||
tailStub.visible = !attributes.isHorsey;
|
||||
parts.forEach(part -> part.setVisible(visible, attributes));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,15 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
|||
protected PonySnout snout;
|
||||
protected PonyEars ears;
|
||||
|
||||
private final ModelPart mane;
|
||||
private final ModelPart nose;
|
||||
private final ModelPart tailStub;
|
||||
|
||||
public EarthPonyModel(ModelPart tree, boolean smallArms) {
|
||||
super(tree);
|
||||
mane = neck.getChild("mane");
|
||||
nose = head.getChild("nose");
|
||||
tailStub = body.getChild("tail_stub");
|
||||
this.smallArms = smallArms;
|
||||
}
|
||||
|
||||
|
@ -45,4 +52,12 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
|||
}
|
||||
return super.getLegOutset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean visible) {
|
||||
super.setVisible(visible);
|
||||
mane.visible = attributes.isHorsey;
|
||||
nose.visible = attributes.isHorsey;
|
||||
tailStub.visible = !attributes.isHorsey;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue