From a713b811ed8dd1158f20fd2503e0f9e79af08c23 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 2 Mar 2016 07:03:45 +1100 Subject: [PATCH] SPIGOT-1592: Deprecate SpawnEgg spawnedType methods since they cannot be fixed in their current state. By: md_5 --- paper-api/src/main/java/org/bukkit/material/SpawnEgg.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/material/SpawnEgg.java b/paper-api/src/main/java/org/bukkit/material/SpawnEgg.java index 4260627170..596d08ae87 100644 --- a/paper-api/src/main/java/org/bukkit/material/SpawnEgg.java +++ b/paper-api/src/main/java/org/bukkit/material/SpawnEgg.java @@ -2,6 +2,7 @@ package org.bukkit.material; import org.bukkit.Material; import org.bukkit.entity.EntityType; +import org.bukkit.inventory.meta.ItemMeta; /** * Represents a spawn egg that can be used to spawn mobs @@ -40,7 +41,9 @@ public class SpawnEgg extends MaterialData { * Get the type of entity this egg will spawn. * * @return The entity type. + * @deprecated This is now stored in {@link ItemMeta}. See SPIGOT-1592. */ + @Deprecated public EntityType getSpawnedType() { return EntityType.fromId(getData()); } @@ -49,7 +52,9 @@ public class SpawnEgg extends MaterialData { * Set the type of entity this egg will spawn. * * @param type The entity type. + * @deprecated This is now stored in {@link ItemMeta}. See SPIGOT-1592. */ + @Deprecated public void setSpawnedType(EntityType type) { setData((byte) type.getTypeId()); }