-
Bug
-
Resolution: Unresolved
-
None
-
1.21
-
None
-
Confirmed
-
Commands, Items, Networking
-
Low
-
Platform
Compasses can be set to point towards a lodestone. When in a dimension different from the set position of the loadstone, the compass will spin randomly, as intended.
To illustrate this point, in the compass's minecraft:lodestone_tracker component, you can set the dimension to a nonexistent dimension and the target pos to 0 0 0 in this nonexistent dimension so the compass always spins.
Constantly replacing any compass (that has a real target), in the mainhand, with one that has a dummy target (and constantly spins) results in the expected component behavior, however if done repeatedly on a slot, visually the compass will stay pointing at the old target until it has its slot changed.
To Reproduce
- Get a compass and set it to a nearby lodestone position
- Place a repeating command block and have it constantly swap normal compasses in a players mainhand with spinning compasses (command shown bellow). Activate the command block.
- Enter survival mode and hold the normal compass. It should now turn into a spinning compass (expected)
- ...
Issue: when holding the spinning compass and using on a lodestone, it stays aimed at that lodestone.
Expected: when holding the spinning compass and using on a lodestone, it stay's spinning (because the command swapped it with a spinning one).
The command
execute as @p at @s if items entity @s weapon.mainhand minecraft:compass[!minecraft:lodestone_tracker={target:{pos:[I;0,0,0],dimension:""}}] run item replace entity @s weapon.mainhand with compass[lodestone_tracker={target:{dimension:"",pos:[I;0,0,0]}}] 1
Running "/data get entity @s SelectedItem" shows the nbt of a spinning compass, but it is not spinning.
Dropping, clicking on, or sending to offhand immediately updates this visual bug.