Package net.minecraft.world.spawner
Class WorldEntitySpawner
- java.lang.Object
-
- net.minecraft.world.spawner.WorldEntitySpawner
-
public final class WorldEntitySpawner extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorldEntitySpawner.EntityDensityManager
static interface
WorldEntitySpawner.IDensityCheck
static interface
WorldEntitySpawner.IInitialDensityAdder
static interface
WorldEntitySpawner.IOnSpawnDensityAdder
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Logger
LOGGER
private static int
MAGIC_NUMBER
private static EntityClassification[]
SPAWNING_CATEGORIES
-
Constructor Summary
Constructors Constructor Description WorldEntitySpawner()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canSpawnAtBody(EntitySpawnPlacementRegistry.PlacementType p_209382_0_, IWorldReader p_209382_1_, BlockPos p_209382_2_, EntityType<?> p_209382_3_)
private static boolean
canSpawnMobAt(ServerWorld p_234976_0_, StructureManager p_234976_1_, ChunkGenerator p_234976_2_, EntityClassification p_234976_3_, MobSpawnInfo.Spawners p_234976_4_, BlockPos p_234976_5_)
static WorldEntitySpawner.EntityDensityManager
createState(int p_234964_0_, java.lang.Iterable<Entity> p_234964_1_, WorldEntitySpawner.IInitialDensityAdder p_234964_2_)
private static MobEntity
getMobForSpawn(ServerWorld p_234973_0_, EntityType<?> p_234973_1_)
private static BlockPos
getRandomPosWithin(World p_222262_0_, Chunk p_222262_1_)
private static MobSpawnInfo.Spawners
getRandomSpawnMobAt(ServerWorld p_234977_0_, StructureManager p_234977_1_, ChunkGenerator p_234977_2_, EntityClassification p_234977_3_, java.util.Random p_234977_4_, BlockPos p_234977_5_)
private static Biome
getRoughBiome(BlockPos p_234980_0_, IChunk p_234980_1_)
private static BlockPos
getTopNonCollidingPos(IWorldReader p_208498_0_, EntityType<?> p_208498_1_, int p_208498_2_, int p_208498_3_)
private static boolean
isRightDistanceToPlayerAndSpawnPoint(ServerWorld p_234978_0_, IChunk p_234978_1_, BlockPos.Mutable p_234978_2_, double p_234978_3_)
static boolean
isSpawnPositionOk(EntitySpawnPlacementRegistry.PlacementType p_209382_0_, IWorldReader p_209382_1_, BlockPos p_209382_2_, EntityType<?> p_209382_3_)
static boolean
isValidEmptySpawnBlock(IBlockReader p_234968_0_, BlockPos p_234968_1_, BlockState p_234968_2_, FluidState p_234968_3_, EntityType<?> p_234968_4_)
private static boolean
isValidPositionForMob(ServerWorld p_234974_0_, MobEntity p_234974_1_, double p_234974_2_)
private static boolean
isValidSpawnPostitionForType(ServerWorld p_234975_0_, EntityClassification p_234975_1_, StructureManager p_234975_2_, ChunkGenerator p_234975_3_, MobSpawnInfo.Spawners p_234975_4_, BlockPos.Mutable p_234975_5_, double p_234975_6_)
private static java.util.List<MobSpawnInfo.Spawners>
mobsAt(ServerWorld p_241463_0_, StructureManager p_241463_1_, ChunkGenerator p_241463_2_, EntityClassification p_241463_3_, BlockPos p_241463_4_, Biome p_241463_5_)
static void
spawnCategoryForChunk(EntityClassification p_234967_0_, ServerWorld p_234967_1_, Chunk p_234967_2_, WorldEntitySpawner.IDensityCheck p_234967_3_, WorldEntitySpawner.IOnSpawnDensityAdder p_234967_4_)
static void
spawnCategoryForPosition(EntityClassification p_234966_0_, ServerWorld p_234966_1_, IChunk p_234966_2_, BlockPos p_234966_3_, WorldEntitySpawner.IDensityCheck p_234966_4_, WorldEntitySpawner.IOnSpawnDensityAdder p_234966_5_)
static void
spawnForChunk(ServerWorld p_234979_0_, Chunk p_234979_1_, WorldEntitySpawner.EntityDensityManager p_234979_2_, boolean p_234979_3_, boolean p_234979_4_, boolean p_234979_5_)
static void
spawnMobsForChunkGeneration(IServerWorld p_77191_0_, Biome p_77191_1_, int p_77191_2_, int p_77191_3_, java.util.Random p_77191_4_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
MAGIC_NUMBER
private static final int MAGIC_NUMBER
-
SPAWNING_CATEGORIES
private static final EntityClassification[] SPAWNING_CATEGORIES
-
-
Method Detail
-
createState
public static WorldEntitySpawner.EntityDensityManager createState(int p_234964_0_, java.lang.Iterable<Entity> p_234964_1_, WorldEntitySpawner.IInitialDensityAdder p_234964_2_)
-
spawnForChunk
public static void spawnForChunk(ServerWorld p_234979_0_, Chunk p_234979_1_, WorldEntitySpawner.EntityDensityManager p_234979_2_, boolean p_234979_3_, boolean p_234979_4_, boolean p_234979_5_)
-
spawnCategoryForChunk
public static void spawnCategoryForChunk(EntityClassification p_234967_0_, ServerWorld p_234967_1_, Chunk p_234967_2_, WorldEntitySpawner.IDensityCheck p_234967_3_, WorldEntitySpawner.IOnSpawnDensityAdder p_234967_4_)
-
spawnCategoryForPosition
public static void spawnCategoryForPosition(EntityClassification p_234966_0_, ServerWorld p_234966_1_, IChunk p_234966_2_, BlockPos p_234966_3_, WorldEntitySpawner.IDensityCheck p_234966_4_, WorldEntitySpawner.IOnSpawnDensityAdder p_234966_5_)
-
isRightDistanceToPlayerAndSpawnPoint
private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerWorld p_234978_0_, IChunk p_234978_1_, BlockPos.Mutable p_234978_2_, double p_234978_3_)
-
isValidSpawnPostitionForType
private static boolean isValidSpawnPostitionForType(ServerWorld p_234975_0_, EntityClassification p_234975_1_, StructureManager p_234975_2_, ChunkGenerator p_234975_3_, MobSpawnInfo.Spawners p_234975_4_, BlockPos.Mutable p_234975_5_, double p_234975_6_)
-
getMobForSpawn
@Nullable private static MobEntity getMobForSpawn(ServerWorld p_234973_0_, EntityType<?> p_234973_1_)
-
isValidPositionForMob
private static boolean isValidPositionForMob(ServerWorld p_234974_0_, MobEntity p_234974_1_, double p_234974_2_)
-
getRandomSpawnMobAt
@Nullable private static MobSpawnInfo.Spawners getRandomSpawnMobAt(ServerWorld p_234977_0_, StructureManager p_234977_1_, ChunkGenerator p_234977_2_, EntityClassification p_234977_3_, java.util.Random p_234977_4_, BlockPos p_234977_5_)
-
canSpawnMobAt
private static boolean canSpawnMobAt(ServerWorld p_234976_0_, StructureManager p_234976_1_, ChunkGenerator p_234976_2_, EntityClassification p_234976_3_, MobSpawnInfo.Spawners p_234976_4_, BlockPos p_234976_5_)
-
mobsAt
private static java.util.List<MobSpawnInfo.Spawners> mobsAt(ServerWorld p_241463_0_, StructureManager p_241463_1_, ChunkGenerator p_241463_2_, EntityClassification p_241463_3_, BlockPos p_241463_4_, @Nullable Biome p_241463_5_)
-
getRandomPosWithin
private static BlockPos getRandomPosWithin(World p_222262_0_, Chunk p_222262_1_)
-
isValidEmptySpawnBlock
public static boolean isValidEmptySpawnBlock(IBlockReader p_234968_0_, BlockPos p_234968_1_, BlockState p_234968_2_, FluidState p_234968_3_, EntityType<?> p_234968_4_)
-
isSpawnPositionOk
public static boolean isSpawnPositionOk(EntitySpawnPlacementRegistry.PlacementType p_209382_0_, IWorldReader p_209382_1_, BlockPos p_209382_2_, @Nullable EntityType<?> p_209382_3_)
-
canSpawnAtBody
public static boolean canSpawnAtBody(EntitySpawnPlacementRegistry.PlacementType p_209382_0_, IWorldReader p_209382_1_, BlockPos p_209382_2_, @Nullable EntityType<?> p_209382_3_)
-
spawnMobsForChunkGeneration
public static void spawnMobsForChunkGeneration(IServerWorld p_77191_0_, Biome p_77191_1_, int p_77191_2_, int p_77191_3_, java.util.Random p_77191_4_)
-
getTopNonCollidingPos
private static BlockPos getTopNonCollidingPos(IWorldReader p_208498_0_, EntityType<?> p_208498_1_, int p_208498_2_, int p_208498_3_)
-
-