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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.20.5 Release Candidate 2
    • Plausible
    • Datafixer

      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.

        1. 2024-04-21_00.15.32.png
          2024-04-21_00.15.32.png
          40 kB
        2. 2024-04-21_00.15.33.png
          2024-04-21_00.15.33.png
          38 kB
        3. 2024-04-21_00.15.34.png
          2024-04-21_00.15.34.png
          39 kB
        4. 2024-04-21_00.18.07.png
          2024-04-21_00.18.07.png
          92 kB
        5. 2024-04-21_00.18.09.png
          2024-04-21_00.18.09.png
          89 kB
        6. 2024-04-21_00.18.06.png
          2024-04-21_00.18.06.png
          94 kB
        7. anothereggupgradeexperiment.zip
          93 kB

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: