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

Testing for a specific number of an item in an inventory does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a
    • None
    • Unconfirmed

      When you enter the command (while having a wheat in your inventory):
      /testfor @p {Inventory:[

      {id:"minecraft:wheat",Count:1}

      ]}
      The command returns:
      <@p> did not match the required data structure

      What I expected to happen was...:
      After following the above procedure, the command should be successful.

      What actually happened was...:
      Instead, the command returns with <@p> did not match the required data structure.

      Steps to Reproduce:
      1. Carry wheat
      2. Place a command block
      3. Place a redstone comparator next to the command block, pointed away from it
      4. Enter the command: /testfor @p {Inventory:[

      {id:"minecraft:wheat",Count:1}

      ]}
      5. Activate the command block
      6. Review output for command

            Unassigned Unassigned
            976Altair 976Altair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: