diff --git a/patches/api/Add-Material-Tags.patch b/patches/api/Add-Material-Tags.patch index 71ac59c005..68757d6028 100644 --- a/patches/api/Add-Material-Tags.patch +++ b/patches/api/Add-Material-Tags.patch @@ -438,7 +438,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) + .endsWith("_SPAWN_EGG") -+ .ensureSize("SPAWN_EGGS", 78).lock(); ++ .ensureSize("SPAWN_EGGS", 80).lock(); + + /** + * Covers all colors of stained glass. diff --git a/patches/api/Add-missing-effects.patch b/patches/api/Add-missing-effects.patch index 6b951b3683..93bd7fbe4b 100644 --- a/patches/api/Add-missing-effects.patch +++ b/patches/api/Add-missing-effects.patch @@ -21,6 +21,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * additional info. */ POTION_BREAK(2002, Type.VISUAL, Color.class), +@@ -0,0 +0,0 @@ public enum Effect { + /** + * Particles displayed when a villager grows a plant, data + * is the number of particles ++ * @deprecated partially replaced by {@link #BEE_GROWTH} + */ ++ @Deprecated(forRemoval = true, since = "1.20.5") // Paper + VILLAGER_PLANT_GROW(2005, Type.VISUAL, Integer.class), + /** + * The sound/particles used by the enderdragon's breath @@ -0,0 +0,0 @@ public enum Effect { * block. */ @@ -128,6 +138,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + SHOOT_WHITE_SMOKE(2010, Type.VISUAL, BlockFace.class), + ++ /** ++ * {@link Integer} param is the number of particles ++ */ ++ BEE_GROWTH(2011, Type.VISUAL, Integer.class), ++ + PARTICLES_SCULK_CHARGE(3006, Type.VISUAL, Integer.class), + + PARTICLES_SCULK_SHRIEK(3007, Type.SOUND), @@ -136,6 +151,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + PARTICLES_EGG_CRACK(3009, Type.VISUAL), + ++ @Deprecated(forRemoval = true, since = "1.20.5") + GUST_DUST(3010, Type.VISUAL), + + TRIAL_SPAWNER_SPAWN(3011, Type.VISUAL), diff --git a/patches/server/Add-MaterialTagsTest.patch b/patches/server/Add-MaterialTagsTest.patch deleted file mode 100644 index 85beea954f..0000000000 --- a/patches/server/Add-MaterialTagsTest.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Sat, 4 Nov 2023 18:39:18 -0400 -Subject: [PATCH] Add MaterialTagsTest - - -diff --git a/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java b/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 ---- /dev/null -+++ b/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java -@@ -0,0 +0,0 @@ -+package io.papermc.paper.inventory.item; -+ -+import com.destroystokyo.paper.MaterialTags; -+import it.unimi.dsi.fastutil.objects.ObjectArrayList; -+import java.util.List; -+import java.util.stream.Collectors; -+import java.util.stream.Stream; -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.world.item.Item; -+import net.minecraft.world.item.enchantment.EnchantmentCategory; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.support.AbstractTestingBase; -+import org.jetbrains.annotations.NotNull; -+import org.junit.jupiter.api.Assertions; -+import org.junit.jupiter.params.ParameterizedTest; -+import org.junit.jupiter.params.provider.MethodSource; -+ -+public class MaterialTagsTest extends AbstractTestingBase { -+ -+ private final static EnchantmentCategory[] ENCHANTMENT_CATEGORIES = EnchantmentCategory.values(); -+ -+ @ParameterizedTest -+ @MethodSource("items") -+ public void testEnchantables(@NotNull final Item item) { -+ final List enchantableCategories = new ObjectArrayList<>(); -+ for (final EnchantmentCategory enchantmentCategory : ENCHANTMENT_CATEGORIES) { -+ if (enchantmentCategory.canEnchant(item)) enchantableCategories.add(enchantmentCategory); -+ } -+ -+ final boolean taggedAsEnchantable = MaterialTags.ENCHANTABLE.isTagged(CraftMagicNumbers.getMaterial(item)); -+ final boolean requiresTagByInternals = !enchantableCategories.isEmpty(); -+ Assertions.assertEquals( -+ requiresTagByInternals, -+ taggedAsEnchantable, -+ () -> "%s matches enchantment categories [%s] but was tagged by material tags as enchantable: %s".formatted( -+ item.getDescriptionId(), -+ enchantableCategories.stream().map(Enum::name).collect(Collectors.joining(", ")), -+ taggedAsEnchantable -+ ) -+ ); -+ } -+ -+ private static Stream items() { -+ return BuiltInRegistries.ITEM.stream(); -+ } -+} diff --git a/patches/server/Add-drops-to-shear-events.patch b/patches/server/Add-drops-to-shear-events.patch index 7893e47a4e..53ab26e5e3 100644 --- a/patches/server/Add-drops-to-shear-events.patch +++ b/patches/server/Add-drops-to-shear-events.patch @@ -232,6 +232,44 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } +diff --git a/src/main/java/net/minecraft/world/entity/monster/Bogged.java b/src/main/java/net/minecraft/world/entity/monster/Bogged.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Bogged.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Bogged.java +@@ -0,0 +0,0 @@ public class Bogged extends AbstractSkeleton implements Shearable { + } + + private void spawnShearedMushrooms() { ++ // Paper start - shear drops API ++ this.generateShearedMushrooms(this::spawnAtLocation); ++ } ++ private void generateShearedMushrooms(java.util.function.Consumer stackConsumer) { ++ // Paper end - shear drops API + if (this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { + LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(BuiltInLootTables.BOGGED_SHEAR); + LootParams lootParams = new LootParams.Builder(serverLevel) +@@ -0,0 +0,0 @@ public class Bogged extends AbstractSkeleton implements Shearable { + .create(LootContextParamSets.SHEARING); + + for (ItemStack itemStack : lootTable.getRandomItems(lootParams)) { +- this.spawnAtLocation(itemStack); ++ stackConsumer.accept(itemStack); // Paper + } + } + } + ++ // Paper start - shear drops API ++ @Override ++ public java.util.List generateDefaultDrops() { ++ final java.util.List drops = new java.util.ArrayList<>(); ++ this.generateShearedMushrooms(drops::add); ++ return drops; ++ } ++ // Paper end - shear drops API ++ + @Override + public boolean readyForShearing() { + return !this.isSheared() && this.isAlive(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/patches/server/Add-methods-to-get-translation-keys.patch b/patches/server/Add-methods-to-get-translation-keys.patch index 2887b15d86..abe2590391 100644 --- a/patches/server/Add-methods-to-get-translation-keys.patch +++ b/patches/server/Add-methods-to-get-translation-keys.patch @@ -5,7 +5,8 @@ Subject: [PATCH] Add methods to get translation keys == AT == public org.bukkit.craftbukkit.inventory.CraftMetaFirework -public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)I +public org.bukkit.craftbukkit.inventory.CraftMetaFirework power +public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)Lnet/minecraft/world/item/component/FireworkExplosion$Shape; Co-authored-by: MeFisto94 @@ -40,6 +41,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Paper end @Override +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +@@ -0,0 +0,0 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { + return new FireworkExplosion(CraftMetaFirework.getNBT(effect.getType()), colors, fadeColors, effect.hasTrail(), effect.hasFlicker()); + } + +- static FireworkExplosion.Shape getNBT(Type type) { ++ public static FireworkExplosion.Shape getNBT(Type type) { // Paper - package-private -> public + switch (type) { + case BALL: + return FireworkExplosion.Shape.SMALL_BALL; diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java @@ -101,8 +115,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Test + public void testFireworkEffectType() { -+ for (FireworkEffect.Type type : FireworkEffect.Type.values()) { -+ Assertions.assertEquals(net.minecraft.world.item.FireworkRocketItem.Shape.byId(org.bukkit.craftbukkit.inventory.CraftMetaFirework.getNBT(type)).getName(), org.bukkit.FireworkEffect.Type.NAMES.key(type), "translation key mismatch for " + type); ++ for (final FireworkEffect.Type type : FireworkEffect.Type.values()) { ++ final net.minecraft.world.item.component.FireworkExplosion.Shape nmsType = org.bukkit.craftbukkit.inventory.CraftMetaFirework.getNBT(type); ++ Assertions.assertTrue(nmsType.getName().getContents() instanceof TranslatableContents, "contents aren't translatable"); ++ Assertions.assertEquals(((TranslatableContents) nmsType.getName().getContents()).getKey(), type.translationKey(), "translation key mismatch for " + type); + } + } + diff --git a/patches/server/Add-missing-default-perms-for-commands.patch b/patches/server/Add-missing-default-perms-for-commands.patch index f1fbaec618..398302d05a 100644 --- a/patches/server/Add-missing-default-perms-for-commands.patch +++ b/patches/server/Add-missing-default-perms-for-commands.patch @@ -75,6 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "time", "Allows the user to change or query the world's game time", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "tick", "Allows the user to control the tick rate of the server", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "title", "Allows the user to manage screen titles", PermissionDefault.OP, commands); ++ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "transfer", "Allows the user to transfer to another server", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "weather", "Allows the user to set the weather", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "whitelist", "Allows the user to manage the server whitelist", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands); @@ -132,7 +133,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + CraftDefaultPermissions.registerCorePermissions(); + Set perms = collectMinecraftCommandPerms(); + -+ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.configurable(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET)); ++ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET)); + RootCommandNode root = commands.getDispatcher().getRoot(); + Set missing = new LinkedHashSet<>(); + Set foundPerms = new HashSet<>(); diff --git a/patches/server/Bandaid-fix-for-Effect.patch b/patches/server/Bandaid-fix-for-Effect.patch index 644376ea2d..eec81e8631 100644 --- a/patches/server/Bandaid-fix-for-Effect.patch +++ b/patches/server/Bandaid-fix-for-Effect.patch @@ -18,6 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 switch (effect) { + case PARTICLES_SCULK_CHARGE: // Paper - add missing effects + case TRIAL_SPAWNER_DETECT_PLAYER: // Paper - add missing effects ++ case BEE_GROWTH: // Paper - add missing effects case VILLAGER_PLANT_GROW: datavalue = (Integer) data; break; @@ -85,18 +86,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ +package org.bukkit; + ++import com.google.common.base.Joiner; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.HashMap; ++import java.util.HashSet; +import java.util.List; +import java.util.Map; ++import java.util.Set; +import net.minecraft.world.level.block.LevelEvent; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; ++import static org.junit.jupiter.api.Assertions.fail; + +public class EffectTest { + @@ -125,12 +130,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + ++ final Set missingEvents = new HashSet<>(); + for (final Integer event : collectNmsLevelEvents()) { -+ assertNotNull(toId.get(event), "missing API Effect: " + event); ++ if (toId.get(event) == null) { ++ missingEvents.add(event); ++ } ++ } ++ if (!missingEvents.isEmpty()) { ++ fail("Missing API Effects:\n" + Joiner.on("\n").join(missingEvents)); + } + } + -+ @SuppressWarnings("deprecation") + @Test + public void checkNoExtraApi() throws ReflectiveOperationException { + Map toId = new HashMap<>(); @@ -142,8 +152,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + final List nmsEvents = collectNmsLevelEvents(); ++ final Set extraApiEffects = new HashSet<>(); + for (final Map.Entry entry : toId.entrySet()) { -+ assertTrue(nmsEvents.contains(entry.getKey()), "Extra API Effect: " + entry.getValue()); ++ if (!nmsEvents.contains(entry.getKey())) { ++ extraApiEffects.add(entry.getValue()); ++ } ++ } ++ if (!extraApiEffects.isEmpty()) { ++ fail("Extra API Effects:\n" + Joiner.on("\n").join(extraApiEffects)); + } + } +} diff --git a/patches/server/Item-Rarity-API.patch b/patches/server/Item-Rarity-API.patch index f66b378adf..8da4053937 100644 --- a/patches/server/Item-Rarity-API.patch +++ b/patches/server/Item-Rarity-API.patch @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Test + public void testRarityFormatting() { + for (Rarity nmsRarity : Rarity.values()) { -+ assertEquals(nmsRarity.color, PaperAdventure.asVanilla(ItemRarity.values()[nmsRarity.ordinal()].color), "rarity formatting is mis-matched"); ++ assertEquals(nmsRarity.color(), PaperAdventure.asVanilla(ItemRarity.values()[nmsRarity.ordinal()].color), "rarity formatting is mis-matched"); + } + } +} diff --git a/patches/server/More-Enchantment-API.patch b/patches/server/More-Enchantment-API.patch index 2f7b689c21..1475ed4189 100644 --- a/patches/server/More-Enchantment-API.patch +++ b/patches/server/More-Enchantment-API.patch @@ -85,43 +85,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Paper end @Override -diff --git a/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java b/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 ---- /dev/null -+++ b/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java -@@ -0,0 +0,0 @@ -+package io.papermc.paper.entity; -+ -+import com.google.common.base.Joiner; -+import com.google.common.collect.Maps; -+import com.google.common.collect.Sets; -+import net.minecraft.world.entity.MobType; -+import org.bukkit.craftbukkit.entity.CraftLivingEntity; -+import org.bukkit.entity.EntityCategory; -+import org.junit.jupiter.api.Test; -+ -+import java.lang.reflect.Field; -+import java.util.Map; -+import java.util.Set; -+ -+import static org.junit.jupiter.api.Assertions.assertTrue; -+ -+public class EntityCategoryTest { -+ -+ @Test -+ public void test() throws IllegalAccessException { -+ -+ Map enumMonsterTypeFieldMap = Maps.newHashMap(); -+ for (Field field : MobType.class.getDeclaredFields()) { -+ if (field.getType() == MobType.class) { -+ enumMonsterTypeFieldMap.put( (MobType) field.get(null), field.getName()); -+ } -+ } -+ -+ for (EntityCategory entityCategory : EntityCategory.values()) { -+ enumMonsterTypeFieldMap.remove(CraftLivingEntity.fromBukkitEntityCategory(entityCategory)); -+ } -+ assertTrue(enumMonsterTypeFieldMap.size() == 0, MobType.class.getName() + " instance(s): " + Joiner.on(", ").join(enumMonsterTypeFieldMap.values()) + " do not have bukkit equivalents"); -+ } -+} diff --git a/patches/server/Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch b/patches/server/Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch new file mode 100644 index 0000000000..4d94c3ce12 --- /dev/null +++ b/patches/server/Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 26 Apr 2024 11:38:28 -0700 +Subject: [PATCH] Properly handle pdc and custom tags in ItemMeta + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + this.customTag = customData.copyTag(); + if (this.customTag.contains(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT)) { + CompoundTag compound = this.customTag.getCompound(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - remove PDC from custom tag ++ if (this.customTag.isEmpty()) this.customTag = null; // Paper - remove PDC from custom tag + Set keys = compound.getAllKeys(); + for (String key : keys) { + this.persistentDataContainer.put(key, compound.get(key).copy()); +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(custom)); + try { + this.customTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap()); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - ensure PDC isn't in custom tag ++ if (this.customTag.isEmpty()) this.customTag = null; // Paper - ensure PDC isn't in custom tag + } catch (IOException ex) { + Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); + } +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + + if (this.customTag != null) { + itemTag.put(CraftMetaItem.CUSTOM_DATA, CustomData.of(this.customTag)); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT); ++ if (this.customTag.isEmpty()) this.customTag = null; + } + } + diff --git a/patches/server/handle-converting-old-serialized-names-to-new-names.patch b/patches/server/handle-converting-old-serialized-names-to-new-names.patch new file mode 100644 index 0000000000..665c21ec8b --- /dev/null +++ b/patches/server/handle-converting-old-serialized-names-to-new-names.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 26 Apr 2024 11:38:40 -0700 +Subject: [PATCH] handle converting old serialized names to new names + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + enchantKey = "SWEEPING_EDGE"; + } + +- Enchantment enchantment = Enchantment.getByName(enchantKey); ++ Enchantment enchantment = Enchantment.getByName(org.bukkit.craftbukkit.legacy.FieldRename.convertEnchantmentName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, enchantKey)); // Paper - convert enchantment names + if ((enchantment != null) && (entry.getValue() instanceof Integer)) { + enchantments.put(enchantment, (Integer) entry.getValue()); + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +@@ -0,0 +0,0 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { + + String entityType = SerializableMeta.getString(map, CraftMetaSpawnEgg.ENTITY_ID.BUKKIT, true); + if (entityType != null) { +- this.spawnedType = EntityType.fromName(entityType); ++ this.spawnedType = EntityType.fromName(org.bukkit.craftbukkit.legacy.FieldRename.convertEntityTypeName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, entityType)); // Paper - handle old entity type field names + } + } +