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

Ominous Item Spawner doesn't work with /item or /loot replace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.1
    • None
    • Confirmed
    • Commands
    • Normal
    • 1280530
    • Expansion B

      Ominous Item Spawners store their item nbt under "item" likely causing /item and /loot replace to be unable to affect them in any slot, the "contents" slot included, as other entities store their item nbt under "Item" capitalized (item, item_frame, etc)

      Steps to Reproduce:
      1. /summon ominous_item_spawner ~ ~ ~ {spawn_item_after_ticks:50,item:{id:"stone",count:1}}
      2a. /item replace entity @n[type=ominous_item_spawner] contents with dirt
      2b. /loot replace entity @n[type=ominous_item_spawner] contents loot blocks/dirt
      2c. /execute if items entity @n[type=ominous_item_spawner] contents stone

      Observed Results:
      The ominous_item_spawner and the item it drops remain stone; the commands in step 2 fail
      2a. "No targets accepted item [item] into slot 0"
      2b. "Dropped 0 items"
      2c. "Test failed"

      Expected Results:
      2a-b. The ominous_item_spawner and the item it drops change to dirt (or whatever is set)
      2c. "Test passed"

      While "contents" is the expected slot for this entity's nbt, the same result occurs with every other slot specifiable
      This is overall behavior likely due to the fact that ominous item spawners store their item under "item" instead of "Item" with a capital 'I' like other entities do


            Unassigned Unassigned
            RoarkCats Roark
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: