Mojira Archive
MC-274635

Compass won't update when replaced with spinning compass in the same slot

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

  1. Get a compass and set it to a nearby lodestone position
  2. 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.
  3. Enter survival mode and hold the normal compass. It should now turn into a spinning compass (expected)
  4. ...

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.

 

 

 

 

Unresolved

Hero_Steven

2024-07-24, 04:29 AM

2024-09-11, 06:10 PM

1

1

Confirmed

Low

Platform

Commands, Items, Networking

1.21, 1.21.1

-