Fixed horn positioning

This commit is contained in:
Sollace 2023-06-02 21:04:49 +01:00
parent 0fb95a34da
commit cab3477693
2 changed files with 9 additions and 3 deletions

View file

@ -81,10 +81,10 @@ public class HornFeatureRenderer<E extends LivingEntity> implements AccessoryFea
.cuboid(-4, -8, -4, 8, 8, 8, dilation), ModelTransform.NONE);
head.addChild("horn", ModelPartBuilder.create()
.uv(0, 3)
.cuboid(-0.5F, -11, -3.5F, 1, 4, 1, dilation), ModelTransform.rotation(29 * MathHelper.RADIANS_PER_DEGREE, 0, 0));
.cuboid(-0.5F, -12, -0.5F, 1, 4, 1, dilation), ModelTransform.rotation(29 * MathHelper.RADIANS_PER_DEGREE, 0, 0));
head.addChild("magic", ModelPartBuilder.create()
.uv(0, 3)
.cuboid(-0.5F, -11, -3.5F, 1, 4, 1, dilation.add(0.5F)), ModelTransform.rotation(29 * MathHelper.RADIANS_PER_DEGREE, 0, 0));
.cuboid(-0.5F, -12, -0.5F, 1, 4, 1, dilation.add(0.5F)), ModelTransform.rotation(29 * MathHelper.RADIANS_PER_DEGREE, 0, 0));
return TexturedModelData.of(data, 64, 64);
}

View file

@ -59,6 +59,11 @@ public class PlayerPoser {
}
switch (animation) {
case NECK_SNAP: {
head.yaw += 3F;
head.pitch *= -1;
break;
}
case WOLOLO: {
float roll = MathHelper.sin(player.age / 10F);
float yaw = MathHelper.cos(player.age / 10F);
@ -237,7 +242,8 @@ public class PlayerPoser {
KICK(USounds.ENTITY_PLAYER_KICK, 5),
STOMP(5),
WIGGLE_NOSE(6),
SPREAD_WINGS(6);
SPREAD_WINGS(6),
NECK_SNAP(50);
private final int duration;
private final Optional<SoundEvent> sound;