mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
Fix SpawnEggMeta#get/setSpawnedType
This commit is contained in:
parent
39c27c3661
commit
26780d3ac6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user