public class SpawnSettings extends Object
Modifier and Type | Class and 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 |
Modifier and Type | Field and 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 |
Modifier | Constructor and Description |
---|---|
private |
SpawnSettings(float creatureSpawnProbability,
Map<SpawnGroup,List<SpawnSettings.SpawnEntry>> spawners,
Map<EntityType<?>,SpawnSettings.SpawnDensity> spawnCosts,
boolean playerSpawnFriendly) |
Modifier and Type | Method and Description |
---|---|
float |
getCreatureSpawnProbability() |
SpawnSettings.SpawnDensity |
getSpawnDensity(EntityType<?> entityType) |
List<SpawnSettings.SpawnEntry> |
getSpawnEntry(SpawnGroup spawnGroup) |
boolean |
isPlayerSpawnFriendly() |
public static final Logger LOGGER
public static final SpawnSettings INSTANCE
public static final com.mojang.serialization.MapCodec<SpawnSettings> CODEC
private final float creatureSpawnProbability
private final Map<SpawnGroup,List<SpawnSettings.SpawnEntry>> spawners
private final Map<EntityType<?>,SpawnSettings.SpawnDensity> spawnCosts
private final boolean playerSpawnFriendly
private SpawnSettings(float creatureSpawnProbability, Map<SpawnGroup,List<SpawnSettings.SpawnEntry>> spawners, Map<EntityType<?>,SpawnSettings.SpawnDensity> spawnCosts, boolean playerSpawnFriendly)
public List<SpawnSettings.SpawnEntry> getSpawnEntry(SpawnGroup spawnGroup)
@Nullable public SpawnSettings.SpawnDensity getSpawnDensity(EntityType<?> entityType)
public float getCreatureSpawnProbability()
public boolean isPlayerSpawnFriendly()