Interface SpawnEggMeta

All Superinterfaces:
Cloneable, ConfigurationSerializable, ItemMeta, PersistentDataHolder

public interface SpawnEggMeta extends ItemMeta
Represents a spawn egg and it's spawned type.
  • Method Details

    • getSpawnedType

      @Deprecated(forRemoval=true) @Contract("-> fail") EntityType getSpawnedType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      different types are different items
      Get the type of entity this egg will spawn.
      Returns:
      The entity type. May be null for implementation specific default.
    • setSpawnedType

      @Deprecated(forRemoval=true) @Contract("_ -> fail") void setSpawnedType(EntityType type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      different types are different items
      Set the type of entity this egg will spawn.
      Parameters:
      type - The entity type. May be null for implementation specific default.
    • getCustomSpawnedType

      @Nullable @Nullable EntityType getCustomSpawnedType()
      Get the custom type of entity this egg will spawn.
      Returns:
      the entity type or null if no custom type is set
    • setCustomSpawnedType

      void setCustomSpawnedType(@Nullable @Nullable EntityType type)
      Set the custom type of entity this egg will spawn.
      Parameters:
      type - the entity type or null to clear the custom type
    • clone

      Specified by:
      clone in interface ItemMeta