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

/loot can spawn air items that instantly despawn

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.1
    • None
    • Confirmed
    • (Unassigned)

      Spawned item entities from a mobs loot table may not save their "Item" tag resulting in the item entities getting killed immediately after they have spawned. I have noticed this happening with the loot command. I don't know if the same applies to a natural scenario.

      Reproduce

      1. Spawn in any mob whose loot table can drop items (e.g. creeper)
      2. Setup a command block chain:
        1. Impulse
          Set to: "Needs Redstone"
        2. Chain
          Set to: "Always Active"
          Command:
          loot spawn <pos> kill <the mob entity>
        3. Chain
          Set to: "Always Active"
          Command:
          execute as @e[type=item] unless data entity @s Item run say hi

          Make sure the @e selector won't catch any other existing entities.

      3. Activate the impulse command block (probably multiple times)

      You may notice the "Item" tag sometimes being omitted in the chat message.

            Unassigned Unassigned
            Teixon Teixon
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: