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

The predicate entity_properties.equipment ignores "items" if one drop the item on the slot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1
    • None
    • Unconfirmed
    • (Unassigned)

      Create a datapack with a predicate like test:1

      {
        "condition": "minecraft:entity_properties",
        "entity": "this",
        "predicate": {
          "equipment": {
            "mainhand":{
              "nbt": "{id:\"cpp:broom\"}"
            }
          }
        }
      }

      Then run

      /give @s carrot_on_a_stick{id:"cpp:broom"}

      and put it on mainhand, this predicate will pass.
      Then drop the item, this predicate will still pass, but now there is no item on mainhand.
       
      If one add

       "items": ["minecraft:carrot_on_a_stick"], 

      in this predicate, the predicate works well.

       

      Moreover, if you have two predicates, one for mainhand, one for offhand. Then you drop the item from your mainhand, you can still press F to switch the predicate you can pass.

            Unassigned Unassigned
            ruhuasiyu wayne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: