Class BiomeSpawner.Builder
java.lang.Object
dev.wyck.wrapper.entity.BiomeSpawner.Builder
- Enclosing interface:
BiomeSpawner
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the BiomeSpawner.creatureGenerationProbability(float creatureGenerationProbability) Sets the creature generation probability.spawnCost(EntityType type, double charge, double energyBudget) Adds a spawn cost to the builder.spawnCost(EntityType type, SpawnCost cost) Adds a spawn cost to the builder.spawnCosts(Map<EntityType, SpawnCost> costs) Adds multiple spawn costs to the builder.spawner(MobCategory category, int weight, NaturalSpawner spawner) Adds a spawner to the builder.spawner(MobCategory category, int weight, EntityType type, int minCount, int maxCount) Adds a spawner to the builder.spawner(MobCategory category, NaturalSpawner spawner) Adds a spawner to the builder.spawners(MobCategory category, WeightedList<NaturalSpawner> list) Adds multiple spawners to the builder.
-
Field Details
-
RANGE
-
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
spawner
Adds a spawner to the builder.- Parameters:
category- the category of the spawnerspawner- the spawner to add- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawner
@AsOf("2.3.0") public BiomeSpawner.Builder spawner(MobCategory category, int weight, NaturalSpawner spawner) Adds a spawner to the builder.- Parameters:
category- the category of the spawnerweight- the weight of the spawnerspawner- the spawner to add- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawner
@AsOf("2.3.0") public BiomeSpawner.Builder spawner(MobCategory category, int weight, EntityType type, int minCount, int maxCount) Adds a spawner to the builder.- Parameters:
category- the category of the spawnerweight- the weight of the spawnertype- the entity type of the spawnerminCount- the minimum number of entities to spawnmaxCount- the maximum number of entities to spawn- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawners
@AsOf("2.3.0") public BiomeSpawner.Builder spawners(MobCategory category, WeightedList<NaturalSpawner> list) Adds multiple spawners to the builder.- Parameters:
category- the category of the spawnerslist- the list of spawners to add- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawnCost
Adds a spawn cost to the builder.- Parameters:
type- the entity type to add the spawn cost forcost- the spawn cost to add- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawnCost
@AsOf("2.3.0") public BiomeSpawner.Builder spawnCost(EntityType type, double charge, double energyBudget) Adds a spawn cost to the builder.- Parameters:
type- the entity type to add the spawn cost forcharge- the charge to add to the spawn costenergyBudget- the energy budget to add to the spawn cost- Returns:
- the builder instance
- Since:
- 2.3.0
-
spawnCosts
Adds multiple spawn costs to the builder.- Parameters:
costs- the spawn costs to add- Returns:
- the builder instance
- Since:
- 2.3.0
-
creatureGenerationProbability
@AsOf("2.3.0") public BiomeSpawner.Builder creatureGenerationProbability(float creatureGenerationProbability) Sets the creature generation probability. Default is 0.1F. Range between 0.0F - 0.9999999F.- Parameters:
creatureGenerationProbability- The probability of spawning a creature.- Returns:
- The builder instance.
- Since:
- 2.3.0
-
build
Builds the BiomeSpawner.- Returns:
- The built BiomeSpawner.
- Since:
- 2.3.0
-