Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-274635

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21, 1.21.1
    • 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

      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.

       

       

       

       

        1. 2024-07-23_23.26.15.png
          1.10 MB
          Hero_Steven
        2. 2024-07-23_23.26.27.png
          1.24 MB
          Hero_Steven
        3. image-2024-07-25-01-48-32-277.png
          2.01 MB
          BugTracker

            Unassigned Unassigned
            Hero_Steven Hero_Steven
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: