Skip to content

Commit 75ff36e

Browse files
committed
Rotate player NPC bodies too
1 parent 82b245b commit 75ff36e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/de/erethon/aether/creature/AetherPlayer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,14 @@ public float getPreciseBodyRotation(float partialTick) {
100100
@Override
101101
public void lookAt(Entity entity, float maxYRotIncrease, float maxXRotIncrease) {
102102
super.lookAt(entity, maxYRotIncrease, maxXRotIncrease);
103-
yBodyRot = Mth.rotateIfNecessary(yBodyRot, yHeadRot, (float) getMaxHeadYRot());
103+
yBodyRot = Mth.rotateIfNecessary(yBodyRot, yHeadRot, maxYRotIncrease);
104+
}
105+
106+
@Override
107+
public void tick() {
108+
super.tick();
109+
// Rotate the NPC
110+
setYRot(yBodyRot);
104111
}
105112

106113
private void sendPlayerStuff(ServerPlayer serverPlayer) {

0 commit comments

Comments
 (0)