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,SignalGetter,WorldGenLevel,IBlockAndTintGetterExtension,IBlockGetterExtension
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiomeManagerprivate final WorldGenTickAccess<Block> private final List<ChunkAccess> private final ChunkAccessprivate final DimensionTypeprivate final ChunkPosprivate final WorldGenTickAccess<Fluid> private final ChunkStatusprivate final ChunkPosprivate final ServerLevelprivate final LevelDataprivate static final org.slf4j.Loggerprivate final RandomSourceprivate final longprivate final intprivate final AtomicLongprivate static final ResourceLocationprivate final intFields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionWorldGenRegion(ServerLevel p_143484_, List<ChunkAccess> p_143485_, ChunkStatus p_330790_, int p_143487_) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddFreshEntity(Entity p_9580_) voidaddParticle(ParticleOptions p_9561_, double p_9562_, double p_9563_, double p_9564_, double p_9565_, double p_9566_, double p_9567_) booleandestroyBlock(BlockPos p_9550_, boolean p_9551_, Entity p_9552_, int p_9553_) booleanensureCanWrite(BlockPos p_181031_) voidgameEvent(Holder<GameEvent> p_316792_, Vec3 p_215164_, GameEvent.Context p_215165_) getBlockEntity(BlockPos p_9582_) getBlockState(BlockPos p_9587_) getChunk(int p_9507_, int p_9508_) getChunk(int p_9514_, int p_9515_, ChunkStatus p_331853_, 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_) intintgetHeight(Heightmap.Types p_9535_, int p_9536_, int p_9537_) getLevel()Deprecated.intgetNearestPlayer(double p_9501_, double p_9502_, double p_9503_, double p_9504_, Predicate<Entity> p_9505_) intlonggetSeed()floatintgetUncachedNoiseBiome(int p_203787_, int p_203788_, int p_203789_) booleanhasChunk(int p_9574_, int p_9575_) booleanbooleanisFluidAtPosition(BlockPos p_143500_, Predicate<FluidState> p_143501_) booleanisOldChunkAround(ChunkPos p_215160_, int p_215161_) booleanisStateAtPosition(BlockPos p_9544_, Predicate<BlockState> p_9545_) voidlevelEvent(Player p_9523_, int p_9524_, BlockPos p_9525_, int p_9526_) private voidmarkPosForPostprocessing(BlockPos p_9592_) longplayers()voidplaySound(Player p_9528_, BlockPos p_9529_, SoundEvent p_9530_, SoundSource p_9531_, float p_9532_, float p_9533_) booleanremoveBlock(BlockPos p_9547_, boolean p_9548_) booleansetBlock(BlockPos p_9539_, BlockState p_9540_, int p_9541_, int p_9542_) voidsetCurrentlyGenerating(Supplier<String> p_143498_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, getEntityCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, noCollision, noCollisionMethods inherited from interface net.minecraft.world.level.CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface net.minecraft.world.level.EntityGetter
getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayerMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension
getShadeMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface net.minecraft.world.level.LevelAccessor
blockUpdated, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, levelEvent, neighborShapeChanged, playSound, scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunkForCollisions, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isAreaLoaded, isEmptyBlock, isWaterAtMethods inherited from interface net.minecraft.world.level.LevelTimeAccess
getMoonBrightness, getMoonPhase, getTimeOfDayMethods inherited from interface net.minecraft.world.level.LevelWriter
destroyBlock, destroyBlock, setBlockMethods inherited from interface net.minecraft.world.level.ServerLevelAccessor
addFreshEntityWithPassengersMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
cache
-
center
-
size
private final int size -
level
-
seed
private final long seed -
levelData
-
random
-
dimensionType
-
blockTicks
-
fluidTicks
-
biomeManager
-
firstPos
-
lastPos
-
generatingStatus
-
writeRadiusCutoff
private final int writeRadiusCutoff -
currentlyGenerating
-
subTickCount
-
WORLDGEN_REGION_RANDOM
-
-
Constructor Details
-
WorldGenRegion
public WorldGenRegion(ServerLevel p_143484_, List<ChunkAccess> p_143485_, ChunkStatus p_330790_, int p_143487_)
-
-
Method Details
-
isOldChunkAround
-
getCenter
-
setCurrentlyGenerating
- Specified by:
setCurrentlyGeneratingin interfaceWorldGenLevel
-
getChunk
- Specified by:
getChunkin interfaceLevelReader
-
getChunk
@Nullable public ChunkAccess getChunk(int p_9514_, int p_9515_, ChunkStatus p_331853_, boolean p_9517_) - Specified by:
getChunkin interfaceLevelReader
-
hasChunk
public boolean hasChunk(int p_9574_, int p_9575_) - Specified by:
hasChunkin interfaceLevelAccessor- Specified by:
hasChunkin interfaceLevelReader
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
getNearestPlayer
@Nullable public Player getNearestPlayer(double p_9501_, double p_9502_, double p_9503_, double p_9504_, Predicate<Entity> p_9505_) - Specified by:
getNearestPlayerin interfaceEntityGetter
-
getSkyDarken
public int getSkyDarken()- Specified by:
getSkyDarkenin interfaceLevelReader
-
getBiomeManager
- Specified by:
getBiomeManagerin interfaceLevelReader
-
getUncachedNoiseBiome
- Specified by:
getUncachedNoiseBiomein interfaceLevelReader
-
getShade
- Specified by:
getShadein interfaceBlockAndTintGetter
-
getLightEngine
- Specified by:
getLightEnginein interfaceBlockAndTintGetter
-
destroyBlock
public boolean destroyBlock(BlockPos p_9550_, boolean p_9551_, @Nullable Entity p_9552_, int p_9553_) - Specified by:
destroyBlockin interfaceLevelWriter
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter
-
ensureCanWrite
- Specified by:
ensureCanWritein interfaceWorldGenLevel
-
setBlock
- Specified by:
setBlockin interfaceLevelWriter
-
markPosForPostprocessing
-
addFreshEntity
- Specified by:
addFreshEntityin interfaceLevelWriter
-
removeBlock
- Specified by:
removeBlockin interfaceLevelWriter
-
getWorldBorder
- Specified by:
getWorldBorderin interfaceCollisionGetter
-
isClientSide
public boolean isClientSide()- Specified by:
isClientSidein interfaceLevelReader
-
getLevel
Deprecated.- Specified by:
getLevelin interfaceServerLevelAccessor
-
registryAccess
- Specified by:
registryAccessin interfaceLevelReader
-
enabledFeatures
- Specified by:
enabledFeaturesin interfaceLevelReader
-
getLevelData
- Specified by:
getLevelDatain interfaceLevelAccessor
-
getCurrentDifficultyAt
- Specified by:
getCurrentDifficultyAtin interfaceLevelAccessor
-
getServer
- Specified by:
getServerin interfaceLevelAccessor
-
getChunkSource
- Specified by:
getChunkSourcein interfaceLevelAccessor
-
getSeed
public long getSeed()- Specified by:
getSeedin interfaceWorldGenLevel
-
getBlockTicks
- Specified by:
getBlockTicksin interfaceLevelAccessor
-
getFluidTicks
- Specified by:
getFluidTicksin interfaceLevelAccessor
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfaceLevelReader
-
getRandom
- Specified by:
getRandomin interfaceLevelAccessor
-
getHeight
- Specified by:
getHeightin 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:
playSoundin 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:
addParticlein interfaceLevelAccessor
-
levelEvent
- Specified by:
levelEventin interfaceLevelAccessor
-
gameEvent
- Specified by:
gameEventin interfaceLevelAccessor
-
dimensionType
- Specified by:
dimensionTypein interfaceLevelReader
-
isStateAtPosition
- Specified by:
isStateAtPositionin interfaceLevelSimulatedReader
-
isFluidAtPosition
- Specified by:
isFluidAtPositionin interfaceLevelSimulatedReader
-
getEntities
public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> p_143494_, AABB p_143495_, Predicate<? super T> p_143496_) - Specified by:
getEntitiesin interfaceEntityGetter
-
getEntities
public List<Entity> getEntities(@Nullable Entity p_9519_, AABB p_9520_, @Nullable Predicate<? super Entity> p_9521_) - Specified by:
getEntitiesin interfaceEntityGetter
-
players
- Specified by:
playersin interfaceEntityGetter
-
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeightin interfaceLevelHeightAccessor- Specified by:
getMinBuildHeightin interfaceLevelReader
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLevelHeightAccessor- Specified by:
getHeightin interfaceLevelReader
-
nextSubTickCount
public long nextSubTickCount()- Specified by:
nextSubTickCountin interfaceLevelAccessor
-