2022-06-08 22:25:47 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
|
|
|
Date: Wed, 8 Jun 2022 15:58:20 -0400
|
|
|
|
Subject: [PATCH] Add missing spawn eggs
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
2022-12-07 23:10:51 +01:00
|
|
|
index 4214420d6670b394758f14dbf6de628420c56e3b..0fb3a165ba564c83a9337cdd003457b5181ae4c6 100644
|
2022-06-08 22:25:47 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
2022-12-07 23:10:51 +01:00
|
|
|
@@ -198,6 +198,17 @@ public final class CraftItemFactory implements ItemFactory {
|
2022-06-08 22:25:47 +02:00
|
|
|
case ZOMBIE_SPAWN_EGG:
|
|
|
|
case ZOMBIE_VILLAGER_SPAWN_EGG:
|
|
|
|
case ZOMBIFIED_PIGLIN_SPAWN_EGG:
|
|
|
|
+ // Paper start
|
|
|
|
+ case ALLAY_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case CAMEL_SPAWN_EGG:
|
|
|
|
+ case ENDER_DRAGON_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case FROG_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case IRON_GOLEM_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case TADPOLE_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case SNOW_GOLEM_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case WARDEN_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case WITHER_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ // Paper end
|
|
|
|
return meta instanceof CraftMetaSpawnEgg ? meta : new CraftMetaSpawnEgg(meta);
|
|
|
|
case ARMOR_STAND:
|
|
|
|
return meta instanceof CraftMetaArmorStand ? meta : new CraftMetaArmorStand(meta);
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
2022-12-07 23:10:51 +01:00
|
|
|
index 2d0e828687e9f4e860348eb10b1a40e12a654f2a..7ddca6f734fb5d75824503282c528904064b7480 100644
|
2022-06-08 22:25:47 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
2022-12-07 23:10:51 +01:00
|
|
|
@@ -430,6 +430,17 @@ public final class CraftItemStack extends ItemStack {
|
2022-06-08 22:25:47 +02:00
|
|
|
case ZOMBIE_SPAWN_EGG:
|
|
|
|
case ZOMBIE_VILLAGER_SPAWN_EGG:
|
|
|
|
case ZOMBIFIED_PIGLIN_SPAWN_EGG:
|
|
|
|
+ // Paper start
|
|
|
|
+ case ALLAY_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case CAMEL_SPAWN_EGG:
|
|
|
|
+ case ENDER_DRAGON_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case FROG_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case IRON_GOLEM_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case TADPOLE_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case SNOW_GOLEM_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ case WARDEN_SPAWN_EGG:
|
2022-12-07 23:10:51 +01:00
|
|
|
+ case WITHER_SPAWN_EGG:
|
2022-06-08 22:25:47 +02:00
|
|
|
+ // Paper end
|
|
|
|
return new CraftMetaSpawnEgg(item.getTag());
|
|
|
|
case ARMOR_STAND:
|
|
|
|
return new CraftMetaArmorStand(item.getTag());
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
2022-12-07 23:10:51 +01:00
|
|
|
index 155e2b50df754021acdd29a870342db8ad6d1f41..89eb3b30c13e51967e201ad1fdeb37ba9ae93496 100644
|
2022-06-08 22:25:47 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
2022-12-07 23:10:51 +01:00
|
|
|
@@ -18,6 +18,17 @@ import org.bukkit.material.MaterialData;
|
2022-09-12 13:31:45 +02:00
|
|
|
public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
|
|
|
|
|
|
|
private static final Set<Material> SPAWN_EGG_MATERIALS = Sets.newHashSet(
|
2022-06-08 22:25:47 +02:00
|
|
|
+ // Paper start
|
2022-12-07 23:10:51 +01:00
|
|
|
+ Material.ALLAY_SPAWN_EGG,
|
|
|
|
+ Material.CAMEL_SPAWN_EGG,
|
|
|
|
+ Material.ENDER_DRAGON_SPAWN_EGG,
|
|
|
|
+ Material.FROG_SPAWN_EGG,
|
|
|
|
+ Material.IRON_GOLEM_SPAWN_EGG,
|
|
|
|
+ Material.TADPOLE_SPAWN_EGG,
|
|
|
|
+ Material.SNOW_GOLEM_SPAWN_EGG,
|
|
|
|
+ Material.WARDEN_SPAWN_EGG,
|
|
|
|
+ Material.WITHER_SPAWN_EGG,
|
2022-06-08 22:25:47 +02:00
|
|
|
+ // Paper end
|
2022-09-12 13:31:45 +02:00
|
|
|
Material.AXOLOTL_SPAWN_EGG,
|
|
|
|
Material.BAT_SPAWN_EGG,
|
|
|
|
Material.BEE_SPAWN_EGG,
|