Fix worn head placement

Also shrink the headwear to be closer to vanilla. It helps to hide it while wearing the head.
This commit is contained in:
Matthew Messinger 2019-07-05 00:49:16 -04:00
parent 460e8c56b4
commit ef2052a23e
2 changed files with 5 additions and 5 deletions

View file

@ -534,7 +534,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
headwear = new PonyRenderer(this, 32, 0) headwear = new PonyRenderer(this, 32, 0)
.offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z) .offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2)
.box(-4, -4, -4, 8, 8, 8, stretch + 0.7504F); .box(-4, -4, -4, 8, 8, 8, stretch + 0.5F);
snout = new PonySnout(this); snout = new PonySnout(this);
snout.init(yOffset, stretch); snout.init(yOffset, stretch);

View file

@ -45,7 +45,7 @@ public class LayerPonyCustomHead<T extends LivingEntity, M extends EntityModel<T
model.getHead().applyTransform(0.0625f); model.getHead().applyTransform(0.0625f);
if (model instanceof AbstractPonyModel) { if (model instanceof AbstractPonyModel) {
translatef(0, 0.2F, 0); translatef(0, 0.225F, 0);
} else { } else {
translatef(0, 0, 0.15F); translatef(0, 0, 0.15F);
} }
@ -80,7 +80,7 @@ public class LayerPonyCustomHead<T extends LivingEntity, M extends EntityModel<T
if (isVillager) { if (isVillager) {
translatef(0, 0.0625F, 0); translatef(0, 0.0625F, 0);
} }
translatef(0, 0, -0.05F);
GameProfile profile = null; GameProfile profile = null;
if (itemstack.hasTag()) { if (itemstack.hasTag()) {
@ -98,12 +98,12 @@ public class LayerPonyCustomHead<T extends LivingEntity, M extends EntityModel<T
SkullType type = ((AbstractSkullBlock) ((BlockItem) itemstack.getItem()).getBlock()).getSkullType(); SkullType type = ((AbstractSkullBlock) ((BlockItem) itemstack.getItem()).getBlock()).getSkullType();
PonySkullRenderer.resolve().render(-0.5F, 0, -0.45F, Direction.UP, 180, type, profile, -1, limbSwing); PonySkullRenderer.resolve().render(-0.5F, 0, -0.5F, null, 180, type, profile, -1, limbSwing);
} }
@Override @Override
public boolean hasHurtOverlay() { public boolean hasHurtOverlay() {
return true; return false;
} }
} }