#947: Add missing spawn eggs for SpawnEggMeta

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot 2021-10-30 18:34:04 +11:00
parent a2a88c50af
commit 1f5735df63
3 changed files with 12 additions and 0 deletions

View File

@ -122,6 +122,7 @@ public final class CraftItemFactory implements ItemFactory {
case YELLOW_BANNER:
case YELLOW_WALL_BANNER:
return meta instanceof CraftMetaBanner ? meta : new CraftMetaBanner(meta);
case AXOLOTL_SPAWN_EGG:
case BAT_SPAWN_EGG:
case BEE_SPAWN_EGG:
case BLAZE_SPAWN_EGG:
@ -140,6 +141,8 @@ public final class CraftItemFactory implements ItemFactory {
case EVOKER_SPAWN_EGG:
case FOX_SPAWN_EGG:
case GHAST_SPAWN_EGG:
case GLOW_SQUID_SPAWN_EGG:
case GOAT_SPAWN_EGG:
case GUARDIAN_SPAWN_EGG:
case HOGLIN_SPAWN_EGG:
case HORSE_SPAWN_EGG:
@ -152,6 +155,7 @@ public final class CraftItemFactory implements ItemFactory {
case PANDA_SPAWN_EGG:
case PARROT_SPAWN_EGG:
case PHANTOM_SPAWN_EGG:
case PIGLIN_BRUTE_SPAWN_EGG:
case PIGLIN_SPAWN_EGG:
case PIG_SPAWN_EGG:
case PILLAGER_SPAWN_EGG:

View File

@ -392,6 +392,7 @@ public final class CraftItemStack extends ItemStack {
case YELLOW_BANNER:
case YELLOW_WALL_BANNER:
return new CraftMetaBanner(item.getTag());
case AXOLOTL_SPAWN_EGG:
case BAT_SPAWN_EGG:
case BEE_SPAWN_EGG:
case BLAZE_SPAWN_EGG:
@ -410,6 +411,8 @@ public final class CraftItemStack extends ItemStack {
case EVOKER_SPAWN_EGG:
case FOX_SPAWN_EGG:
case GHAST_SPAWN_EGG:
case GLOW_SQUID_SPAWN_EGG:
case GOAT_SPAWN_EGG:
case GUARDIAN_SPAWN_EGG:
case HOGLIN_SPAWN_EGG:
case HORSE_SPAWN_EGG:
@ -422,6 +425,7 @@ public final class CraftItemStack extends ItemStack {
case PANDA_SPAWN_EGG:
case PARROT_SPAWN_EGG:
case PHANTOM_SPAWN_EGG:
case PIGLIN_BRUTE_SPAWN_EGG:
case PIGLIN_SPAWN_EGG:
case PIG_SPAWN_EGG:
case PILLAGER_SPAWN_EGG:

View File

@ -112,6 +112,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
@Override
boolean applicableTo(Material type) {
switch (type) {
case AXOLOTL_SPAWN_EGG:
case BAT_SPAWN_EGG:
case BEE_SPAWN_EGG:
case BLAZE_SPAWN_EGG:
@ -130,6 +131,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
case EVOKER_SPAWN_EGG:
case FOX_SPAWN_EGG:
case GHAST_SPAWN_EGG:
case GLOW_SQUID_SPAWN_EGG:
case GOAT_SPAWN_EGG:
case GUARDIAN_SPAWN_EGG:
case HOGLIN_SPAWN_EGG:
case HORSE_SPAWN_EGG:
@ -142,6 +145,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
case PANDA_SPAWN_EGG:
case PARROT_SPAWN_EGG:
case PHANTOM_SPAWN_EGG:
case PIGLIN_BRUTE_SPAWN_EGG:
case PIGLIN_SPAWN_EGG:
case PIG_SPAWN_EGG:
case PILLAGER_SPAWN_EGG: