fix broken player position setting

This commit is contained in:
gnembon committed 2025-03-11 23:13:17 +01:00
1 parent da5b937e78
commit ce4cfc5db0
1 file changed
+1 -6
@@ -903,12 +903,7 @@ public class EntityValue extends Value
} }
if (e instanceof ServerPlayer sp) if (e instanceof ServerPlayer sp)
{ {
// this forces position but doesn't angles for some reason. Need both in the API in the future. sp.connection.teleport(x, y, z, yaw, pitch);
EnumSet<Relative> set = EnumSet.noneOf(Relative.class);
set.add(Relative.X_ROT);
set.add(Relative.Y_ROT);
sp.connection.teleport(new PositionMoveRotation(new Vec3(x, y, z), Vec3.ZERO, yaw, pitch), set);
} }
else else
{ {