Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 19:40:07 +01:00
ef0e5a642d
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API 48c0c547 PR-786: Add methods to get sounds from entities CraftBukkit Changes: 5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event 4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation 4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API e5d6a9bbf PR-1100: Add methods to get sounds from entities b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta Spigot Changes: 4c157bb4 Rebuild patches
58 Zeilen
3.0 KiB
Diff
58 Zeilen
3.0 KiB
Diff
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
|
|
index ce64286ac5b836283318ac1ac0bd4afb29db9bb7..09b6475b77ebc7f43c13861aa2af26e2f6e6a8b5 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
@@ -196,6 +196,12 @@ public final class CraftItemFactory implements ItemFactory {
|
|
case ZOMBIE_SPAWN_EGG:
|
|
case ZOMBIE_VILLAGER_SPAWN_EGG:
|
|
case ZOMBIFIED_PIGLIN_SPAWN_EGG:
|
|
+ // Paper start
|
|
+ case ALLAY_SPAWN_EGG:
|
|
+ case FROG_SPAWN_EGG:
|
|
+ case TADPOLE_SPAWN_EGG:
|
|
+ case WARDEN_SPAWN_EGG:
|
|
+ // 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
|
|
index c7c5f18cde7a4ad4dd821e452de3068c2e2187d1..f5363a753e5d24ccda946a9d65132eed28f19172 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
|
@@ -424,6 +424,12 @@ public final class CraftItemStack extends ItemStack {
|
|
case ZOMBIE_SPAWN_EGG:
|
|
case ZOMBIE_VILLAGER_SPAWN_EGG:
|
|
case ZOMBIFIED_PIGLIN_SPAWN_EGG:
|
|
+ // Paper start
|
|
+ case ALLAY_SPAWN_EGG:
|
|
+ case FROG_SPAWN_EGG:
|
|
+ case TADPOLE_SPAWN_EGG:
|
|
+ case WARDEN_SPAWN_EGG:
|
|
+ // 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
|
|
index 155e2b50df754021acdd29a870342db8ad6d1f41..de141f94214838dc049c1797bbdb0dbdac048112 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
|
@@ -18,6 +18,12 @@ import org.bukkit.material.MaterialData;
|
|
public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
|
|
|
private static final Set<Material> SPAWN_EGG_MATERIALS = Sets.newHashSet(
|
|
+ // Paper start
|
|
+ Material. ALLAY_SPAWN_EGG,
|
|
+ Material. FROG_SPAWN_EGG,
|
|
+ Material. TADPOLE_SPAWN_EGG,
|
|
+ Material. WARDEN_SPAWN_EGG,
|
|
+ // Paper end
|
|
Material.AXOLOTL_SPAWN_EGG,
|
|
Material.BAT_SPAWN_EGG,
|
|
Material.BEE_SPAWN_EGG,
|