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

Custom Spawn egg: Providing NBT does not prevent entity equipment and randomization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w16a, Minecraft 18w21a, Minecraft 18w22a, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 1.13.1-pre1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w03b, Minecraft 19w03c, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Omitting or inserting NBT data into a custom spawn egg as well as a summon-command can still have randomized outcomes.

      Details and examples:

      • The plain summon-command, e.g. for Zombies, can spawn also Zombies including equipment (armour, weapons, tools) as well as Zombie babies.
        Summon-command-example:
        /summon minecraft:zombie ~ ~ ~
        
      • If you use this summon-command though:
        /summon minecraft:zombie ~ ~ ~ {}
        

        it will not summon randomized Zombies (e.g. babies or with equipment), only regular adult Zombies without any form of equipment whatsoever.
        Iirc this was an issue in previous MC versions, but not anymore (thanks to Panda4994, making me aware )

      • (See Searge's comment on MC-86172: "If you specify a NBT tag, it won't automatically add the default equipment to mobs. In this case you have to specify it in the NBT") to verify it being WaI.)
      • Plain regular Spawn Eggs from the Creative menu can spawn entities with randomized NBT data (as they apparently should), but if you spawn Zombies with a custom zombie spawn egg, it will also randomize Zombies in swapping equipment (right-handed Zombie becoming left-handed) and even also spawn baby zombies, even though you e.g. inserted specifically that the Age of the Zombie should only result in an adult type.

      Example: Custom Spawn Eggs with defined NBT can still have random outcomes, e.g. a custom spawn egg with:

      /give @p zombie_spawn_egg{EntityTag:{}}
      

      can still spawn zombies with equipment

      as well as baby zombies

      and

      • a custom spawn egg with distinct specified equipment can also have random outcomes, e.g.:
        /give @p zombie_spawn_egg{EntityTag:{IsBaby:0b,ArmorItems:[{id:golden_boots,Count:1b,tag:{ench:[{id:0,lvl:1}]}},{id:chainmail_leggings,Count:1b,tag:{ench:[{id:0,lvl:1}]}},{id:chainmail_chestplate,Count:1b,tag:{ench:[{id:0,lvl:1}]}},{id:lapis_block,Count:1b}],HandItems:[{id:bone,Count:1b},{id:shield,Count:1b}],PersistenceRequired:1,NoAI:1,Silent:1}}
        

        this should only spawn an Adult Zombie with a bone in its right and a shield in its left hand (and a lapis block on its head).

      However, it can also spawn as lefthanded, basically it swaps the bone and shield; this seems to occur with an estimated chance of roughly 10-15%.

      But not only the handedness can be affected, but it can also spawn a baby zombie with the same equipment.

      And also both can happen (handedness-swap and baby zombie).

      Note: The equipment is not a visual inconsistency as described in MC-87661, it's real equipment which appears if you run an entitydata (or rather now a data get), as you can see in the attached screenshots.

        Attachments

        1. 2018-01-19_16.34.41.png
          2018-01-19_16.34.41.png
          1.30 MB
        2. 2018-01-19_16.34.50.png
          2018-01-19_16.34.50.png
          1.82 MB
        3. 2018-01-19_16.35.06.png
          2018-01-19_16.35.06.png
          2.00 MB
        4. 2018-01-19_16.35.39.png
          2018-01-19_16.35.39.png
          1.21 MB
        5. 2018-01-19_16.36.12.png
          2018-01-19_16.36.12.png
          1.33 MB
        6. 2018-01-19_17.41.26.png
          2018-01-19_17.41.26.png
          1.61 MB
        7. 2018-01-19_17.42.02.png
          2018-01-19_17.42.02.png
          1.21 MB
        8. 2018-01-19_18.00.00.png
          2018-01-19_18.00.00.png
          2.17 MB
        9. 2018-01-19_18.01.10.png
          2018-01-19_18.01.10.png
          1014 kB
        10. 2018-01-23_15.33.52.png
          2018-01-23_15.33.52.png
          1.31 MB
        11. 2018-01-23_15.36.29.png
          2018-01-23_15.36.29.png
          1.31 MB
        12. 2018-01-23_15.36.43.png
          2018-01-23_15.36.43.png
          1.31 MB
        13. 2018-01-23_15.37.36.png
          2018-01-23_15.37.36.png
          799 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                LapisDemon Meri Diana
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: