13
0
geforkt von Mirrors/Paper

Fix SpawnEggMeta#get/setSpawnedType

Dieser Commit ist enthalten in:
Jake Potrebic 2023-02-26 07:14:19 -08:00
Ursprung 39c27c3661
Commit 26780d3ac6

Datei anzeigen

@ -17,7 +17,7 @@ public interface SpawnEggMeta extends ItemMeta {
* @return The entity type. May be null for implementation specific default.
* @deprecated different types are different items
*/
@Deprecated(since = "1.13")
@Deprecated(since = "1.13", forRemoval = true) // Paper
@Contract("-> fail")
EntityType getSpawnedType();
@ -28,7 +28,7 @@ public interface SpawnEggMeta extends ItemMeta {
* default.
* @deprecated different types are different items
*/
@Deprecated(since = "1.13")
@Deprecated(since = "1.13", forRemoval = true) // Paper
@Contract("_ -> fail")
void setSpawnedType(EntityType type);
@ -54,6 +54,22 @@ public interface SpawnEggMeta extends ItemMeta {
*/
void setSpawnedEntity(@NotNull EntitySnapshot snapshot);
// Paper start
/**
* Get the custom type of entity this egg will spawn.
*
* @return the entity type or null if no custom type is set
*/
@org.jetbrains.annotations.Nullable EntityType getCustomSpawnedType();
/**
* Set the custom type of entity this egg will spawn.
*
* @param type the entity type or null to clear the custom type
*/
void setCustomSpawnedType(@org.jetbrains.annotations.Nullable EntityType type);
// Paper end
@NotNull
@Override
SpawnEggMeta clone();