mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fixed overlay models causing parts of the body to not render
This commit is contained in:
parent
b39f8f9a32
commit
6f8c1ebbd2
1 changed files with 32 additions and 14 deletions
|
@ -872,8 +872,8 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
public void render(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
public void render(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
||||||
|
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
transform(BodyPart.HEAD);
|
transform(BodyPart.BODY);
|
||||||
renderHead(entity, move, swing, ticks, headYaw, headPitch, scale);
|
renderBody(entity, move, swing, ticks, headYaw, headPitch, scale);
|
||||||
popMatrix();
|
popMatrix();
|
||||||
|
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
|
@ -882,8 +882,8 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
popMatrix();
|
popMatrix();
|
||||||
|
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
transform(BodyPart.BODY);
|
transform(BodyPart.HEAD);
|
||||||
renderBody(entity, move, swing, ticks, headYaw, headPitch, scale);
|
renderHead(entity, move, swing, ticks, headYaw, headPitch, scale);
|
||||||
popMatrix();
|
popMatrix();
|
||||||
|
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
|
@ -891,6 +891,18 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
renderLegs(scale);
|
renderLegs(scale);
|
||||||
popMatrix();
|
popMatrix();
|
||||||
|
|
||||||
|
pushMatrix();
|
||||||
|
transform(BodyPart.BODY);
|
||||||
|
renderHelmet(scale);
|
||||||
|
popMatrix();
|
||||||
|
|
||||||
|
if (textureHeight == 64) {
|
||||||
|
pushMatrix();
|
||||||
|
transform(BodyPart.LEGS);
|
||||||
|
renderSleeves(scale);
|
||||||
|
popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -902,8 +914,13 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
*/
|
*/
|
||||||
protected void renderHead(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
protected void renderHead(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
||||||
head.render(scale);
|
head.render(scale);
|
||||||
|
|
||||||
headwear.render(scale);
|
headwear.render(scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void renderHelmet(float scale) {
|
||||||
head.applyTransform(scale);
|
head.applyTransform(scale);
|
||||||
|
headwear.render(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderNeck(float scale) {
|
protected void renderNeck(float scale) {
|
||||||
|
@ -920,28 +937,29 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
*/
|
*/
|
||||||
protected void renderBody(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
protected void renderBody(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
||||||
body.render(scale);
|
body.render(scale);
|
||||||
if (textureHeight == 64) {
|
|
||||||
bodyOverlay.render(scale);
|
|
||||||
}
|
|
||||||
upperTorso.render(scale);
|
upperTorso.render(scale);
|
||||||
body.applyTransform(scale);
|
body.applyTransform(scale);
|
||||||
tail.renderPart(scale, entity.getUuid());
|
tail.renderPart(scale, entity.getUuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderLegs(float scale) {
|
protected void renderLegs(float scale) {
|
||||||
if (!isSneaking) body.applyTransform(scale);
|
if (!isSneaking) {
|
||||||
|
body.applyTransform(scale);
|
||||||
|
}
|
||||||
|
|
||||||
leftArm.render(scale);
|
leftArm.render(scale);
|
||||||
rightArm.render(scale);
|
rightArm.render(scale);
|
||||||
leftLeg.render(scale);
|
leftLeg.render(scale);
|
||||||
rightLeg.render(scale);
|
rightLeg.render(scale);
|
||||||
|
}
|
||||||
|
|
||||||
if (textureHeight == 64) {
|
protected void renderSleeves(float scale) {
|
||||||
leftArmOverlay.render(scale);
|
leftArmOverlay.render(scale);
|
||||||
rightArmOverlay.render(scale);
|
rightArmOverlay.render(scale);
|
||||||
leftLegOverlay.render(scale);
|
leftLegOverlay.render(scale);
|
||||||
rightArmOverlay.render(scale);
|
rightArmOverlay.render(scale);
|
||||||
}
|
bodyOverlay.render(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue