Class MobSpawnSettings.Builder
java.lang.Object
dev.wyck.biome.entity.MobSpawnSettings.Builder
- Enclosing interface:
MobSpawnSettings
Builder for
MobSpawnSettings.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllCosts(Map<EntityType, MobSpawnCost> costs) Adds every supplied mob spawn cost.addAllSpawns(MobCategory category, WeightedList<SpawnerData> spawns) Adds every spawn entry in a weighted list to a category.addMobSpawnCost(EntityType type, double charge, double energyBudget) Defines a mob spawn cost.addSpawn(EntityType type, int weight, int minCount, int maxCount) Adds an entity using its natural mob category and an inclusive group-size range.addSpawn(EntityType type, int weight, IntProvider count) Adds an entity using its natural mob category.addSpawn(EntityType type, MobCategory category, int weight, IntProvider count) Adds an entity under an explicitly selected mob category.build()Builds the mob spawn settings.dontOverride(MobCategory category) Removes an explicit category override.noSpawns(MobCategory category) Explicitly disables natural spawning for a category.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
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 spawnweight- the relative selection weight of the spawn entryminCount- the minimum group sizemaxCount- 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 spawnweight- the relative selection weight of the spawn entrycount- 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 spawncategory- the category under which the entry is definedweight- the relative selection weight of the spawn entrycount- 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 updatespawns- the spawn entries to add- Returns:
- this builder
- Since:
- 4.0.0
-
noSpawns
Explicitly disables natural spawning for a category.- Parameters:
category- the category to disable- Returns:
- this builder
- Since:
- 4.0.0
-
dontOverride
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 updatecharge- the energy charged for each nearby mob of this typeenergyBudget- the maximum local energy budget available to the mob- Returns:
- this builder
- Since:
- 4.0.0
-
addAllCosts
Adds every supplied mob spawn cost.- Parameters:
costs- the spawn costs to add- Returns:
- this builder
- Since:
- 4.0.0
-
build
Builds the mob spawn settings.- Returns:
- the built mob spawn settings
- Since:
- 4.0.0
-