aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0332-Add-ItemFactory-getMonsterEgg-API.patch
blob: 972e376f186ddbd079ee1d37dfd6195bcbc4e74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 34c13845f4916fb167fc9d83fe792975e5c52bdc..2acafae468fcbb7213d6b6c30803a3924a3bbc30 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -261,5 +261,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
 }