Interface SpawnerData

All Superinterfaces:
Wrapper

@NullMarked @AsOf("4.0.0") public interface SpawnerData extends Wrapper
Describes an entity type and the number of entities in one natural spawn attempt.
Since:
4.0.0
  • Method Details

    • type

      @AsOf("4.0.0") EntityType type()
      The entity type spawned by this entry.
      Returns:
      the entity type to spawn
      Since:
      4.0.0
    • count

      @AsOf("4.0.0") IntProvider count()
      The provider used to select the number of entities in a spawn attempt.
      Returns:
      the spawn count provider
      Since:
      4.0.0
    • naturalCategory

      @AsOf("4.0.0") MobCategory naturalCategory()
      The natural mob category assigned to type() by Minecraft.
      Returns:
      the entity type's natural mob category
      Since:
      4.0.0
    • of

      @AsOf("4.0.0") static SpawnerData of(EntityType type, int count)
      Creates spawn data with a fixed group size.
      Parameters:
      type - the entity type to spawn
      count - the fixed number of entities to spawn
      Returns:
      new spawn data
      Since:
      4.0.0
    • of

      @AsOf("4.0.0") static SpawnerData of(EntityType type, IntProvider count)
      Creates spawn data with a configurable group size.
      Parameters:
      type - the entity type to spawn
      count - the provider used to select the number of entities to spawn
      Returns:
      new spawn data
      Since:
      4.0.0
    • decode

      @AsOf("4.0.0") static SpawnerData decode(Object minecraftSpawnerData)
      Reads Minecraft spawner data.
      Parameters:
      minecraftSpawnerData - the Minecraft spawner data to read
      Returns:
      the wrapped spawner data
      Since:
      4.0.0