diff options
Diffstat (limited to 'patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch')
-rw-r--r-- | patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch index 5eff519db0..4d26a59da4 100644 --- a/patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/server/0940-Fix-SpawnEggMeta-get-setSpawnedType.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnEggMeta#get/setSpawnedType diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index 7899af2b01112a7a8934fdae7c9f3a6854d1daa8..49fea9cea6c3be3be0313c2a1cf49118e95d0698 100644 +index 7899af2b01112a7a8934fdae7c9f3a6854d1daa8..ffc1bfa977a25c238418874c9cd87aad52518dad 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -217,6 +217,31 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { @@ -14,16 +14,16 @@ index 7899af2b01112a7a8934fdae7c9f3a6854d1daa8..49fea9cea6c3be3be0313c2a1cf49118 + // Paper start + @Override -+ public EntityType getCustomSpawnedType() { ++ public EntityType<?> getCustomSpawnedType() { + return java.util.Optional.ofNullable(this.entityTag) + .map(tag -> tag.getString(ENTITY_ID.NBT)) + .flatMap(net.minecraft.world.entity.EntityType::byString) -+ .map(org.bukkit.craftbukkit.util.CraftMagicNumbers::getEntityType) ++ .map(org.bukkit.craftbukkit.entity.CraftEntityType::minecraftToBukkit) + .orElse(null); + } + + @Override -+ public void setCustomSpawnedType(final EntityType type) { ++ public void setCustomSpawnedType(final EntityType<?> type) { + if (type == null) { + if (this.entityTag != null) { + this.entityTag.remove(ENTITY_ID.NBT); |