mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix SpawnEggMeta#get/setSpawnedType
This commit is contained in:
parent
39c27c3661
commit
26780d3ac6
1 changed files with 18 additions and 2 deletions
|
@ -17,7 +17,7 @@ public interface SpawnEggMeta extends ItemMeta {
|
||||||
* @return The entity type. May be null for implementation specific default.
|
* @return The entity type. May be null for implementation specific default.
|
||||||
* @deprecated different types are different items
|
* @deprecated different types are different items
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "1.13")
|
@Deprecated(since = "1.13", forRemoval = true) // Paper
|
||||||
@Contract("-> fail")
|
@Contract("-> fail")
|
||||||
EntityType getSpawnedType();
|
EntityType getSpawnedType();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public interface SpawnEggMeta extends ItemMeta {
|
||||||
* default.
|
* default.
|
||||||
* @deprecated different types are different items
|
* @deprecated different types are different items
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "1.13")
|
@Deprecated(since = "1.13", forRemoval = true) // Paper
|
||||||
@Contract("_ -> fail")
|
@Contract("_ -> fail")
|
||||||
void setSpawnedType(EntityType type);
|
void setSpawnedType(EntityType type);
|
||||||
|
|
||||||
|
@ -54,6 +54,22 @@ public interface SpawnEggMeta extends ItemMeta {
|
||||||
*/
|
*/
|
||||||
void setSpawnedEntity(@NotNull EntitySnapshot snapshot);
|
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
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
SpawnEggMeta clone();
|
SpawnEggMeta clone();
|
||||||
|
|
Loading…
Reference in a new issue