mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24: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);
|
public static final Pivot BACK_LEGS_SLEEPING = new Pivot(0, 2, -6);
|
||||||
|
|
||||||
protected final ModelPart neck;
|
protected final ModelPart neck;
|
||||||
private final ModelPart mane;
|
|
||||||
private final ModelPart nose;
|
|
||||||
private final ModelPart tailStub;
|
|
||||||
|
|
||||||
public final RenderList helmetRenderList;
|
public final RenderList helmetRenderList;
|
||||||
protected final RenderList neckRenderList;
|
protected final RenderList neckRenderList;
|
||||||
|
@ -59,9 +56,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
super(tree);
|
super(tree);
|
||||||
|
|
||||||
neck = tree.getChild("neck");
|
neck = tree.getChild("neck");
|
||||||
mane = neck.getChild("mane");
|
|
||||||
nose = head.getChild("nose");
|
|
||||||
tailStub = body.getChild("tail_stub");
|
|
||||||
mainRenderList = RenderList.of()
|
mainRenderList = RenderList.of()
|
||||||
.add(withStage(BodyPart.BODY, bodyRenderList = RenderList.of(body).add(body::rotate)))
|
.add(withStage(BodyPart.BODY, bodyRenderList = RenderList.of(body).add(body::rotate)))
|
||||||
.add(withStage(BodyPart.NECK, neckRenderList = RenderList.of(neck)))
|
.add(withStage(BodyPart.NECK, neckRenderList = RenderList.of(neck)))
|
||||||
|
@ -563,9 +557,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
super.setVisible(visible);
|
super.setVisible(visible);
|
||||||
neck.visible = visible;
|
neck.visible = visible;
|
||||||
hat.visible &= !attributes.isHorsey;
|
hat.visible &= !attributes.isHorsey;
|
||||||
mane.visible = attributes.isHorsey;
|
|
||||||
nose.visible = attributes.isHorsey;
|
|
||||||
tailStub.visible = !attributes.isHorsey;
|
|
||||||
parts.forEach(part -> part.setVisible(visible, attributes));
|
parts.forEach(part -> part.setVisible(visible, attributes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,15 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
||||||
protected PonySnout snout;
|
protected PonySnout snout;
|
||||||
protected PonyEars ears;
|
protected PonyEars ears;
|
||||||
|
|
||||||
|
private final ModelPart mane;
|
||||||
|
private final ModelPart nose;
|
||||||
|
private final ModelPart tailStub;
|
||||||
|
|
||||||
public EarthPonyModel(ModelPart tree, boolean smallArms) {
|
public EarthPonyModel(ModelPart tree, boolean smallArms) {
|
||||||
super(tree);
|
super(tree);
|
||||||
|
mane = neck.getChild("mane");
|
||||||
|
nose = head.getChild("nose");
|
||||||
|
tailStub = body.getChild("tail_stub");
|
||||||
this.smallArms = smallArms;
|
this.smallArms = smallArms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,4 +52,12 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
||||||
}
|
}
|
||||||
return super.getLegOutset();
|
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