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

When using custom spawn eggs made using new entity data component on a spawner, it ignores nbt data provided by the entity data component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21.1
    • None
    • Unconfirmed
    • Commands, Entities

      When you use a custom spawn egg generated by using the new entity data component on the ground, it would spawn the mob based on what you provided on the entity data component, for example, if you made a custom spawn egg that is supposed to spawn a skeleton with 400 hearts and it wears full diamond armor, it would spawn that. However, if you right click a spawner with your custom spawn egg, it would only take the id of the mob and none of the nbt data, spawning default mobs.

      Notes on Screenshots:

      The first screenshot shows an allay spawn egg that is customized to spawn a skeleton with 400 health, full diamond armor, and a netherite sword.

      The second screenshot shows me right clicking the spawner and it puts a skeleton on that spawner, when it spawns skeletons, it spawned default ones.

      How To Reproduce:

      1.  Generate a new world
      2. Give yourself a custom spawn egg with custom nbt data. (For Example: I made a custom spawn egg that spawns a skeleton with full diamond armor, a netherite sword, with 400 health. Here is a command for an example spawn egg I made for this experiment
      3. give @p minecraft:allay_spawn_egg[minecraft:entity_data={id:skeleton,attributes:[{id:"minecraft:generic.max_health",base:400}],Health:400,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:netherite_sword},{}]},minecraft:item_name='{text:"Example Spawn Egg"}'])
      1. Spawn your custom mob
      2. Give yourself an empty mob spawner
      3. Place It down
      4. Right click the spawner with your spawn egg and for it to spawn mobs. When it does, notice how it is a default mob instead of the custom one
      5. Analyze the difference between your custom mob and the default one

      Observed Results:

      Spawner ignores nbt data of custom spawn eggs.

      Expected Results:

      Spawner would take nbt data of your custom spawn egg and spawn mobs using that data

            Unassigned Unassigned
            CoolDogey27318 CoolDogey27318
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: