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,ScheduledTickAccess,ServerLevelAccessor,SignalGetter,WorldGenLevel,IBlockAndTintGetterExtension,IBlockGetterExtension,ILevelReaderExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiomeManagerprivate final WorldGenTickAccess<Block> private final StaticCache2D<GenerationChunkHolder> private final ChunkAccessprivate final DimensionTypeprivate final WorldGenTickAccess<Fluid> private final ChunkStepprivate final ServerLevelprivate final LevelDataprivate static final org.slf4j.Loggerprivate final RandomSourceprivate final longprivate final AtomicLongprivate static final ResourceLocationFields inherited from interface net.minecraft.world.level.BlockGetter
MAX_BLOCK_ITERATIONS_ALONG_TRAVELFields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionWorldGenRegion(ServerLevel pLevel, StaticCache2D<GenerationChunkHolder> pCache, ChunkStep pGeneratingStep, ChunkAccess pCenter) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddFreshEntity(Entity pEntity) voidaddParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) booleandestroyBlock(BlockPos pPos, boolean pDropBlock, Entity pEntity, int pRecursionLeft) booleanensureCanWrite(BlockPos pPos) voidgameEvent(Holder<GameEvent> pGameEvent, Vec3 pPos, GameEvent.Context pContext) getBlockEntity(BlockPos pPos) getBlockState(BlockPos pPos) getChunk(int pChunkX, int pChunkZ) getChunk(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) getEntities(Entity pEntity, AABB pBoundingBox, Predicate<? super Entity> pPredicate) Gets all entities within the specified AABB excluding the one passed into it.getEntities(EntityTypeTest<Entity, T> pEntityTypeTest, AABB pBounds, Predicate<? super T> pPredicate) getFluidState(BlockPos pPos) intintgetHeight(Heightmap.Types pHeightmapType, int pX, int pZ) getLevel()Deprecated.intgetMinY()getNearestPlayer(double pX, double pY, double pZ, double pDistance, Predicate<Entity> pPredicate) intlonggetSeed()floatintgetUncachedNoiseBiome(int pX, int pY, int pZ) booleanhasChunk(int pChunkX, int pChunkZ) booleanbooleanisFluidAtPosition(BlockPos pPos, Predicate<FluidState> pPredicate) booleanisOldChunkAround(ChunkPos pPos, int pRadius) booleanisStateAtPosition(BlockPos pPos, Predicate<BlockState> pState) voidlevelEvent(Entity pEntity, int pType, BlockPos pPos, int pData) private voidlongplayers()voidplaySound(Entity pEntity, BlockPos pPos, SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) booleanremoveBlock(BlockPos pPos, boolean pIsMoving) booleansetBlock(BlockPos pPos, BlockState pState, int pFlags, int pRecursionLeft) voidsetCurrentlyGenerating(Supplier<String> pCurrentlyGenerating) 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, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
clipIncludingBorder, collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockAndLiquidCollisions, getBlockCollisions, getCollisions, getEntityCollisions, getPreMoveCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, 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, 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.neoforged.neoforge.common.extensions.ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface net.minecraft.world.level.LevelAccessor
createTick, createTick, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, levelEvent, neighborShapeChanged, playSound, updateNeighborsAtMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunkForCollisions, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, 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.ScheduledTickAccess
scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods 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
-
level
-
seed
private final long seed -
levelData
-
random
-
dimensionType
-
blockTicks
-
fluidTicks
-
biomeManager
-
generatingStep
-
currentlyGenerating
-
subTickCount
-
WORLDGEN_REGION_RANDOM
-
-
Constructor Details
-
WorldGenRegion
public WorldGenRegion(ServerLevel pLevel, StaticCache2D<GenerationChunkHolder> pCache, ChunkStep pGeneratingStep, ChunkAccess pCenter)
-
-
Method Details
-
isOldChunkAround
-
getCenter
-
setCurrentlyGenerating
- Specified by:
setCurrentlyGeneratingin interfaceWorldGenLevel
-
getChunk
- Specified by:
getChunkin interfaceLevelReader
-
getChunk
@Nullable public ChunkAccess getChunk(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) - Specified by:
getChunkin interfaceLevelReader
-
hasChunk
public boolean hasChunk(int pChunkX, int pChunkZ) - Specified by:
hasChunkin interfaceLevelAccessor- Specified by:
hasChunkin interfaceLevelReader
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
getNearestPlayer
@Nullable public Player getNearestPlayer(double pX, double pY, double pZ, double pDistance, Predicate<Entity> pPredicate) - 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 pPos, boolean pDropBlock, @Nullable Entity pEntity, int pRecursionLeft) - 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 interfaceScheduledTickAccess
-
getFluidTicks
- Specified by:
getFluidTicksin interfaceScheduledTickAccess
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfaceLevelReader
-
getRandom
- Specified by:
getRandomin interfaceLevelAccessor
-
getHeight
- Specified by:
getHeightin interfaceLevelReader
-
playSound
public void playSound(@Nullable Entity pEntity, BlockPos pPos, SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) - Specified by:
playSoundin interfaceLevelAccessor
-
addParticle
public void addParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) - 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> pEntityTypeTest, AABB pBounds, Predicate<? super T> pPredicate) - Specified by:
getEntitiesin interfaceEntityGetter
-
getEntities
public List<Entity> getEntities(@Nullable Entity pEntity, AABB pBoundingBox, @Nullable Predicate<? super Entity> pPredicate) Gets all entities within the specified AABB excluding the one passed into it.- Specified by:
getEntitiesin interfaceEntityGetter
-
players
- Specified by:
playersin interfaceEntityGetter
-
getMinY
public int getMinY()- Specified by:
getMinYin interfaceLevelHeightAccessor- Specified by:
getMinYin interfaceLevelReader
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLevelHeightAccessor- Specified by:
getHeightin interfaceLevelReader
-
nextSubTickCount
public long nextSubTickCount()- Specified by:
nextSubTickCountin interfaceLevelAccessor
-