-
Bug
-
Resolution: Unresolved
-
None
-
1.20.70.25 Preview
-
Confirmed
-
Multiple
-
1201260
The bug
The setRotation function changes the direction an entity is looking. It works fine for other mobs, but does nothing when used on the player. No error or warning, it just does nothing.
How to reproduce
1. Download and open the attached world
2. Run /reload one or multiple times
Expected results
All entities, including the player, are turned to face straight south
Observed results
Other entities do, but the player doesn't
Relevant script
import {world} from "@minecraft/server" let overworld = world.getDimension("overworld"); let players = world.getPlayers(); let entities = overworld.getEntities(); for (let player of players) { player.setRotation({"x":0, "y":0}); } for (let entity of entities) { entity.setRotation({"x":0, "y":0}); }