Package net.minecraft.world.biome
Class SpawnSettings
java.lang.Object
net.minecraft.world.biome.SpawnSettings
public class SpawnSettings extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SpawnSettings.Builder
static class
SpawnSettings.SpawnDensity
Embodies the density limit information of a type of entity in entity spawning logic.static class
SpawnSettings.SpawnEntry
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.MapCodec<SpawnSettings>
CODEC
private float
creatureSpawnProbability
static SpawnSettings
INSTANCE
static Logger
LOGGER
private boolean
playerSpawnFriendly
private Map<EntityType<?>,SpawnSettings.SpawnDensity>
spawnCosts
private Map<SpawnGroup,List<SpawnSettings.SpawnEntry>>
spawners
-
Constructor Summary
Constructors Modifier Constructor Description private
SpawnSettings(float creatureSpawnProbability, Map<SpawnGroup,List<SpawnSettings.SpawnEntry>> spawners, Map<EntityType<?>,SpawnSettings.SpawnDensity> spawnCosts, boolean playerSpawnFriendly)
-
Method Summary
Modifier and Type Method Description float
getCreatureSpawnProbability()
SpawnSettings.SpawnDensity
getSpawnDensity(EntityType<?> entityType)
List<SpawnSettings.SpawnEntry>
getSpawnEntry(SpawnGroup spawnGroup)
boolean
isPlayerSpawnFriendly()
-
Field Details
-
LOGGER
-
INSTANCE
-
CODEC
-
creatureSpawnProbability
private final float creatureSpawnProbability -
spawners
-
spawnCosts
-
playerSpawnFriendly
private final boolean playerSpawnFriendly
-
-
Constructor Details
-
SpawnSettings
private SpawnSettings(float creatureSpawnProbability, Map<SpawnGroup,List<SpawnSettings.SpawnEntry>> spawners, Map<EntityType<?>,SpawnSettings.SpawnDensity> spawnCosts, boolean playerSpawnFriendly)
-
-
Method Details
-
getSpawnEntry
-
getSpawnDensity
-
getCreatureSpawnProbability
public float getCreatureSpawnProbability() -
isPlayerSpawnFriendly
public boolean isPlayerSpawnFriendly()
-