Package net.minecraft.world.biome
Class SpawnSettings.SpawnDensity
java.lang.Object
net.minecraft.world.biome.SpawnSettings.SpawnDensity
- Enclosing class:
- SpawnSettings
public static class SpawnSettings.SpawnDensity extends Object
Embodies the density limit information of a type of entity in entity
spawning logic. The density field is generated for all entities spawned
than a specific type of entity.
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<SpawnSettings.SpawnDensity>
CODEC
private double
gravityLimit
private double
mass
-
Constructor Summary
Constructors Modifier Constructor Description private
SpawnDensity(double gravityLimit, double mass)
-
Method Summary
Modifier and Type Method Description double
getGravityLimit()
Represents the cap of gravity as inGravityField.calculate(BlockPos, double)
for entity spawning.double
getMass()
Represents the mass of each entity spawned.
-
Field Details
-
CODEC
-
gravityLimit
private final double gravityLimit -
mass
private final double mass
-
-
Constructor Details
-
SpawnDensity
private SpawnDensity(double gravityLimit, double mass)
-
-
Method Details
-
getGravityLimit
public double getGravityLimit()Represents the cap of gravity as inGravityField.calculate(BlockPos, double)
for entity spawning. If the cap is exceeded, the entity spawning attempt will skip. -
getMass
public double getMass()Represents the mass of each entity spawned. Will affect gravity calculation.
-