Mojira Archive
MC-270990

When upgrading nonstandard spawn eggs from 1.12.2, some become pig spawn eggs and others become wither spawn eggs

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

  1. Load up 1.12.2
  2. Give yourself a "blank" spawn egg:
    /give @s spawn_egg
  3. Give yourself an end crystal spawn egg:
    /give @s spawn_egg 1 0 {EntityTag:{id:"minecraft:ender_crystal"}}
  4. Give yourself a lightning bolt spawn egg:
    /give @s spawn_egg 1 0 {EntityTag:{id:"minecraft:lightning_bolt"}}
  5. 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.

Won't Fix

Connor Steppie

2024-04-20, 11:25 PM

2024-04-23, 07:21 AM

2024-04-23, 07:21 AM

1

1

Plausible

Datafixer

data-fixer

1.20.5 Release Candidate 2

-