Package net.minecraft.server.level
Class WorldGenRegion
java.lang.Object
net.minecraft.server.level.WorldGenRegion
- All Implemented Interfaces:
BiomeManager.NoiseBiomeSource
,BlockAndTintGetter
,BlockGetter
,CollisionGetter
,CommonLevelAccessor
,EntityGetter
,LevelAccessor
,LevelHeightAccessor
,LevelReader
,LevelSimulatedReader
,LevelSimulatedRW
,LevelTimeAccess
,LevelWriter
,ServerLevelAccessor
,WorldGenLevel
-
Field Summary
Modifier and TypeFieldDescriptionprivate BiomeManager
private List<ChunkAccess>
private ChunkPos
private DimensionType
private ChunkPos
private ChunkStatus
private ChunkPos
private ServerLevel
private LevelData
private static org.apache.logging.log4j.Logger
private Random
private long
private int
private StructureFeatureManager
private int
-
Constructor Summary
ConstructorDescriptionWorldGenRegion(ServerLevel p_143484_, List<ChunkAccess> p_143485_, ChunkStatus p_143486_, int p_143487_)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addFreshEntity(Entity p_9580_)
void
addParticle(ParticleOptions p_9561_, double p_9562_, double p_9563_, double p_9564_, double p_9565_, double p_9566_, double p_9567_)
boolean
destroyBlock(BlockPos p_9550_, boolean p_9551_, Entity p_9552_, int p_9553_)
boolean
ensureCanWrite(BlockPos p_181031_)
void
getBlockEntity(BlockPos p_9582_)
getBlockState(BlockPos p_9587_)
getChunk(int p_9507_, int p_9508_)
getChunk(int p_9514_, int p_9515_, ChunkStatus p_9516_, boolean p_9517_)
getCurrentDifficultyAt(BlockPos p_9585_)
getEntities(Entity p_9519_, AABB p_9520_, Predicate<? super Entity> p_9521_)
getEntities(EntityTypeTest<Entity,T> p_143494_, AABB p_143495_, Predicate<? super T> p_143496_)
getFluidState(BlockPos p_9577_)
int
int
getHeight(Heightmap.Types p_9535_, int p_9536_, int p_9537_)
getLevel()
Deprecated.int
getNearestPlayer(double p_9501_, double p_9502_, double p_9503_, double p_9504_, Predicate<Entity> p_9505_)
int
long
getSeed()
float
int
getUncachedNoiseBiome(int p_9510_, int p_9511_, int p_9512_)
boolean
hasChunk(int p_9574_, int p_9575_)
boolean
boolean
isFluidAtPosition(BlockPos p_143500_, Predicate<FluidState> p_143501_)
boolean
isStateAtPosition(BlockPos p_9544_, Predicate<BlockState> p_9545_)
void
levelEvent(Player p_9523_, int p_9524_, BlockPos p_9525_, int p_9526_)
private void
markPosForPostprocessing(BlockPos p_9592_)
players()
void
playSound(Player p_9528_, BlockPos p_9529_, SoundEvent p_9530_, SoundSource p_9531_, float p_9532_, float p_9533_)
boolean
removeBlock(BlockPos p_9547_, boolean p_9548_)
boolean
setBlock(BlockPos p_9539_, BlockState p_9540_, int p_9541_, int p_9542_)
void
setCurrentlyGenerating(Supplier<String> p_143498_)
Stream<? extends StructureStart<?>>
startsForFeature(SectionPos p_9558_, StructureFeature<?> p_9559_)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.biome.BiomeManager.NoiseBiomeSource
getPrimaryBiome
Methods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightness
Methods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLine
Methods inherited from interface net.minecraft.world.level.CollisionGetter
findFreePosition, getBlockCollisions, getBlockCollisions, getCollisions, getEntityCollisions, hasBlockCollision, isUnobstructed, isUnobstructed, isUnobstructed, noCollision, noCollision, noCollision, noCollision
Methods inherited from interface net.minecraft.world.level.CommonLevelAccessor
getBiomeName, getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructed
Methods inherited from interface net.minecraft.world.level.EntityGetter
getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer
Methods inherited from interface net.minecraft.world.level.LevelAccessor
blockUpdated, dayTime, gameEvent, gameEvent, gameEvent, getDifficulty, getLogicalHeight, levelEvent
Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
Methods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getBrightness, getChunk, getChunk, getChunkForCollisions, getDirectSignal, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, isAreaLoaded, isEmptyBlock, isWaterAt
Methods inherited from interface net.minecraft.world.level.LevelTimeAccess
getMoonBrightness, getMoonPhase, getTimeOfDay
Methods inherited from interface net.minecraft.world.level.LevelWriter
destroyBlock, destroyBlock, setBlock
Methods inherited from interface net.minecraft.world.level.ServerLevelAccessor
addFreshEntityWithPassengers
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
cache
-
center
-
size
private final int size -
level
-
seed
private final long seed -
levelData
-
random
-
dimensionType
-
blockTicks
-
liquidTicks
-
biomeManager
-
firstPos
-
lastPos
-
structureFeatureManager
-
generatingStatus
-
writeRadiusCutoff
private final int writeRadiusCutoff -
currentlyGenerating
-
-
Constructor Details
-
WorldGenRegion
public WorldGenRegion(ServerLevel p_143484_, List<ChunkAccess> p_143485_, ChunkStatus p_143486_, int p_143487_)
-
-
Method Details
-
getCenter
-
setCurrentlyGenerating
-
getChunk
- Specified by:
getChunk
in interfaceLevelReader
-
getChunk
@Nullable public ChunkAccess getChunk(int p_9514_, int p_9515_, ChunkStatus p_9516_, boolean p_9517_)- Specified by:
getChunk
in interfaceLevelReader
-
hasChunk
public boolean hasChunk(int p_9574_, int p_9575_)- Specified by:
hasChunk
in interfaceLevelAccessor
- Specified by:
hasChunk
in interfaceLevelReader
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockGetter
-
getNearestPlayer
@Nullable public Player getNearestPlayer(double p_9501_, double p_9502_, double p_9503_, double p_9504_, Predicate<Entity> p_9505_)- Specified by:
getNearestPlayer
in interfaceEntityGetter
-
getSkyDarken
public int getSkyDarken()- Specified by:
getSkyDarken
in interfaceLevelReader
-
getBiomeManager
- Specified by:
getBiomeManager
in interfaceLevelReader
-
getUncachedNoiseBiome
- Specified by:
getUncachedNoiseBiome
in interfaceLevelReader
-
getShade
- Specified by:
getShade
in interfaceBlockAndTintGetter
-
getLightEngine
- Specified by:
getLightEngine
in interfaceBlockAndTintGetter
-
destroyBlock
public boolean destroyBlock(BlockPos p_9550_, boolean p_9551_, @Nullable Entity p_9552_, int p_9553_)- Specified by:
destroyBlock
in interfaceLevelWriter
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceBlockGetter
-
ensureCanWrite
- Specified by:
ensureCanWrite
in interfaceWorldGenLevel
-
setBlock
- Specified by:
setBlock
in interfaceLevelWriter
-
markPosForPostprocessing
-
addFreshEntity
- Specified by:
addFreshEntity
in interfaceLevelWriter
-
removeBlock
- Specified by:
removeBlock
in interfaceLevelWriter
-
getWorldBorder
- Specified by:
getWorldBorder
in interfaceCollisionGetter
-
isClientSide
public boolean isClientSide()- Specified by:
isClientSide
in interfaceLevelReader
-
getLevel
Deprecated.- Specified by:
getLevel
in interfaceServerLevelAccessor
-
registryAccess
- Specified by:
registryAccess
in interfaceCommonLevelAccessor
-
getLevelData
- Specified by:
getLevelData
in interfaceLevelAccessor
-
getCurrentDifficultyAt
- Specified by:
getCurrentDifficultyAt
in interfaceLevelAccessor
-
getServer
- Specified by:
getServer
in interfaceLevelAccessor
-
getChunkSource
- Specified by:
getChunkSource
in interfaceLevelAccessor
-
getSeed
public long getSeed()- Specified by:
getSeed
in interfaceWorldGenLevel
-
getBlockTicks
- Specified by:
getBlockTicks
in interfaceLevelAccessor
-
getLiquidTicks
- Specified by:
getLiquidTicks
in interfaceLevelAccessor
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevel
in interfaceLevelReader
-
getRandom
- Specified by:
getRandom
in interfaceLevelAccessor
-
getHeight
- Specified by:
getHeight
in interfaceLevelReader
-
playSound
public void playSound(@Nullable Player p_9528_, BlockPos p_9529_, SoundEvent p_9530_, SoundSource p_9531_, float p_9532_, float p_9533_)- Specified by:
playSound
in interfaceLevelAccessor
-
addParticle
public void addParticle(ParticleOptions p_9561_, double p_9562_, double p_9563_, double p_9564_, double p_9565_, double p_9566_, double p_9567_)- Specified by:
addParticle
in interfaceLevelAccessor
-
levelEvent
- Specified by:
levelEvent
in interfaceLevelAccessor
-
gameEvent
- Specified by:
gameEvent
in interfaceLevelAccessor
-
dimensionType
- Specified by:
dimensionType
in interfaceLevelReader
-
isStateAtPosition
- Specified by:
isStateAtPosition
in interfaceLevelSimulatedReader
-
isFluidAtPosition
- Specified by:
isFluidAtPosition
in interfaceLevelSimulatedReader
-
getEntities
public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity,T> p_143494_, AABB p_143495_, Predicate<? super T> p_143496_)- Specified by:
getEntities
in interfaceEntityGetter
-
getEntities
public List<Entity> getEntities(@Nullable Entity p_9519_, AABB p_9520_, @Nullable Predicate<? super Entity> p_9521_)- Specified by:
getEntities
in interfaceEntityGetter
-
players
- Specified by:
players
in interfaceEntityGetter
-
startsForFeature
public Stream<? extends StructureStart<?>> startsForFeature(SectionPos p_9558_, StructureFeature<?> p_9559_)- Specified by:
startsForFeature
in interfaceWorldGenLevel
-
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeight
in interfaceLevelHeightAccessor
- Specified by:
getMinBuildHeight
in interfaceLevelReader
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceLevelHeightAccessor
- Specified by:
getHeight
in interfaceLevelReader
-