-
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:
- Generate a new world
- 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
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"}'])
- Spawn your custom mob
- Give yourself an empty mob spawner
- Place It down
- 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
- 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
- duplicates
-
MC-87184 Changing spawner with spawn egg only overrides id
- Resolved