Class MobSpawnSettings.Builder

java.lang.Object
dev.wyck.biome.entity.MobSpawnSettings.Builder
Enclosing interface:
MobSpawnSettings

@AsOf("4.0.0") public static final class MobSpawnSettings.Builder extends Object
Builder for MobSpawnSettings.
Since:
4.0.0
  • Constructor Details

  • Method Details

    • addSpawn

      @AsOf("4.0.0") public MobSpawnSettings.Builder addSpawn(EntityType type, int weight, int minCount, int maxCount)
      Adds an entity using its natural mob category and an inclusive group-size range.
      Parameters:
      type - the entity type to spawn
      weight - the relative selection weight of the spawn entry
      minCount - the minimum group size
      maxCount - the maximum group size
      Returns:
      this builder
      Since:
      4.0.0
    • addSpawn

      @AsOf("4.0.0") public MobSpawnSettings.Builder addSpawn(EntityType type, int weight, IntProvider count)
      Adds an entity using its natural mob category.
      Parameters:
      type - the entity type to spawn
      weight - the relative selection weight of the spawn entry
      count - the provider used to select the group size
      Returns:
      this builder
      Since:
      4.0.0
    • addSpawn

      @AsOf("4.0.0") public MobSpawnSettings.Builder addSpawn(EntityType type, MobCategory category, int weight, IntProvider count)
      Adds an entity under an explicitly selected mob category.
      Parameters:
      type - the entity type to spawn
      category - the category under which the entry is defined
      weight - the relative selection weight of the spawn entry
      count - the provider used to select the group size
      Returns:
      this builder
      Since:
      4.0.0
    • addAllSpawns

      @AsOf("4.0.0") public MobSpawnSettings.Builder addAllSpawns(MobCategory category, WeightedList<SpawnerData> spawns)
      Adds every spawn entry in a weighted list to a category.
      Parameters:
      category - the category to update
      spawns - the spawn entries to add
      Returns:
      this builder
      Since:
      4.0.0
    • noSpawns

      @AsOf("4.0.0") public MobSpawnSettings.Builder noSpawns(MobCategory category)
      Explicitly disables natural spawning for a category.
      Parameters:
      category - the category to disable
      Returns:
      this builder
      Since:
      4.0.0
    • dontOverride

      @AsOf("4.0.0") public MobSpawnSettings.Builder dontOverride(MobCategory category)
      Removes an explicit category override.
      Parameters:
      category - the category that should inherit its surrounding settings
      Returns:
      this builder
      Since:
      4.0.0
    • addMobSpawnCost

      @AsOf("4.0.0") public MobSpawnSettings.Builder addMobSpawnCost(EntityType type, double charge, double energyBudget)
      Defines a mob spawn cost.
      Parameters:
      type - the entity type to update
      charge - the energy charged for each nearby mob of this type
      energyBudget - the maximum local energy budget available to the mob
      Returns:
      this builder
      Since:
      4.0.0
    • addAllCosts

      @AsOf("4.0.0") public MobSpawnSettings.Builder addAllCosts(Map<EntityType, MobSpawnCost> costs)
      Adds every supplied mob spawn cost.
      Parameters:
      costs - the spawn costs to add
      Returns:
      this builder
      Since:
      4.0.0
    • build

      @AsOf("4.0.0") public MobSpawnSettings build()
      Builds the mob spawn settings.
      Returns:
      the built mob spawn settings
      Since:
      4.0.0