The bug
When a world containing spawn eggs for certain non-mob entities is upgraded from 1.12.2 to the 1.20.5 development versions, they are converted in an unexpected way when translating to the component system. Some spawn eggs become pig spawn eggs with extra components to specify the target entity, whereas others become wither spawn eggs with such components.
How to reproduce
Load up 1.12.2
Give yourself a "blank" spawn egg:
/give @s spawn_egg
Give yourself an end crystal spawn egg:
/give @s spawn_egg 1 0 {EntityTag:{id:"minecraft:ender_crystal"}}
Give yourself a lightning bolt spawn egg:
/give @s spawn_egg 1 0 {EntityTag:{id:"minecraft:lightning_bolt"}}
Load this world in 1.20.5
Expected results
All three spawn eggs would upgrade to the same item ID with component distinguishers.
Actual results
Some upgrade to pig spawn eggs and others upgrade to wither spawn eggs.
How to fix
Either make all such spawn eggs become pig spawn eggs or wither spawn eggs.
However, a preferable option would be to introduce a new item ID for these (minecraft:custom_spawn_egg), and upgrade them to that instead. This item ID could have other functionalities, for example the spawn egg colours could be customizable as components.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki