PaperMC/patches/api/0336-Add-ItemFactory-getMonsterEgg-API.patch
Josh Roy c1d14dc076 all api patches done*
*still waiting for leaf to port datafixer to 1.18 so i can do entity serialization
2021-11-30 19:26:33 +01:00

25 lines
1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 14 Oct 2021 12:09:28 -0500
Subject: [PATCH] Add ItemFactory#getMonsterEgg API
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 0a4466c6ca519c3a5da76ff870fb2a4e3a06effd..8677e273641a46aae7107361f23f6ded59a50dc0 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -241,5 +241,14 @@ public interface ItemFactory {
@NotNull
@Deprecated
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
+
+ /**
+ * Get a spawn egg ItemStack from an EntityType
+ *
+ * @param type EntityType
+ * @return ItemStack spawner egg
+ */
+ @Nullable
+ ItemStack getSpawnEgg(@Nullable org.bukkit.entity.EntityType type);
// Paper end
}