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

Clear fails to work more than once when checking for a specific item in a specific slot.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.15.2
    • None
    • OS: Windows 10 Standard
    • Unconfirmed
    • (Unassigned)

      Bug discovered in 1.15.2, possibly in other versions.

      Using the following command block setup I discoverd a bug that continued to show results even with modified setups.

      This setup aims to ensure that if a compass is moved out of hotbar slot 9 (hotbar.8), it is placed back in slot 9. It works, but only once. After moving the "restored" compass, the clear command does not activate unless the compass is first moved back to slot 9. The same issue occured when my friend tried to replicate the setup on a singleplayer world.

      CB1: Repeat|Unconditional|AlwaysActive: execute as @a unless entity @s[nbt={Inventory:[

      {id:"minecraft:compass",Slot:8b}

      ]}] run clear @s minecraft:compass

      CB2: Chain|Conditional|AlwaysActive (Runs after CB1 succeeds): replaceitem entity @a hotbar.8 minecraft:compass

            Unassigned Unassigned
            ZeroNoey Ryan Perry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: