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, LevelWriter, ScheduledTickAccess, ServerLevelAccessor, SignalGetter, WorldGenLevel, IBlockAndTintGetterExtension, IBlockGetterExtension, ILevelReaderExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface 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 IdentifierFields inherited from interface SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionWorldGenRegion(ServerLevel level, StaticCache2D<GenerationChunkHolder> cache, ChunkStep generatingStep, ChunkAccess center) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddFreshEntity(Entity entity) voidaddParticle(ParticleOptions particle, double x, double y, double z, double xd, double yd, double zd) booleandestroyBlock(BlockPos pos, boolean dropResources, @Nullable Entity breaker, int updateLimit) booleanensureCanWrite(BlockPos pos) voidgameEvent(Holder<GameEvent> gameEvent, Vec3 position, GameEvent.Context context) @Nullable BlockEntitygetBlockEntity(BlockPos pos) getBlockState(BlockPos pos) getChunk(int chunkX, int chunkZ) @Nullable ChunkAccessgetChunk(int chunkX, int chunkZ, ChunkStatus targetStatus, boolean loadOrGenerate) getEntities(@Nullable Entity except, AABB bb, @Nullable Predicate<? super Entity> selector) Gets all entities within the specified AABB excluding the one passed into it.getEntities(EntityTypeTest<Entity, T> type, AABB bb, Predicate<? super T> selector) getFluidState(BlockPos pos) intintgetHeight(Heightmap.Types type, int x, int z) getLevel()Deprecated.intgetMinY()@Nullable PlayergetNearestPlayer(double x, double y, double z, double maxDist, @Nullable Predicate<Entity> predicate) intlonggetSeed()@Nullable MinecraftServerfloatintgetUncachedNoiseBiome(int quartX, int quartY, int quartZ) booleanhasChunk(int chunkX, int chunkZ) booleanbooleanisFluidAtPosition(BlockPos pos, Predicate<FluidState> predicate) booleanisOldChunkAround(ChunkPos pos, int range) booleanisStateAtPosition(BlockPos pos, Predicate<BlockState> predicate) voidlevelEvent(@Nullable Entity source, int type, BlockPos pos, int data) private voidmarkPosForPostprocessing(BlockPos blockPos) longplayers()voidplaySound(@Nullable Entity except, BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch) booleanremoveBlock(BlockPos pos, boolean movedByPiston) booleansetBlock(BlockPos pos, BlockState blockState, int updateFlags, int updateLimit) voidsetCurrentlyGenerating(@Nullable Supplier<String> currentlyGenerating) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface BlockGetter
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLineMethods inherited from interface CollisionGetter
clipIncludingBorder, collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockAndLiquidCollisions, getBlockCollisions, getCollisions, getPreMoveCollisions, isUnobstructed, isUnobstructed, noBlockCollision, noBlockCollision, noBorderCollision, noCollision, noCollision, noCollision, noCollision, noEntityCollisionMethods inherited from interface CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface EntityGetter
getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayerMethods inherited from interface IBlockAndTintGetterExtension
getShadeMethods inherited from interface IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface LevelAccessor
createTick, createTick, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, getGameTime, levelEvent, neighborShapeChanged, playSound, updateNeighborsAtMethods inherited from interface LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunkForCollisions, getEffectiveSkyBrightness, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isEmptyBlock, isWaterAtMethods inherited from interface LevelWriter
destroyBlock, destroyBlock, setBlockMethods inherited from interface ScheduledTickAccess
scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface ServerLevelAccessor
addFreshEntityWithPassengersMethods inherited from interface 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 level, StaticCache2D<GenerationChunkHolder> cache, ChunkStep generatingStep, ChunkAccess center)
-
-
Method Details
-
isOldChunkAround
-
getCenter
-
setCurrentlyGenerating
- Specified by:
setCurrentlyGeneratingin interfaceWorldGenLevel
-
getChunk
- Specified by:
getChunkin interfaceLevelReader
-
getChunk
public @Nullable ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus targetStatus, boolean loadOrGenerate) - Specified by:
getChunkin interfaceLevelReader
-
hasChunk
public boolean hasChunk(int chunkX, int chunkZ) - Specified by:
hasChunkin interfaceLevelAccessor- Specified by:
hasChunkin interfaceLevelReader
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
getNearestPlayer
public @Nullable Player getNearestPlayer(double x, double y, double z, double maxDist, @Nullable Predicate<Entity> predicate) - 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 pos, boolean dropResources, @Nullable Entity breaker, int updateLimit) - 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 interfaceServerLevelAccessor
-
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 except, BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch) - Specified by:
playSoundin interfaceLevelAccessor
-
addParticle
public void addParticle(ParticleOptions particle, double x, double y, double z, double xd, double yd, double zd) - 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> type, AABB bb, Predicate<? super T> selector) - Specified by:
getEntitiesin interfaceEntityGetter
-
getEntities
public List<Entity> getEntities(@Nullable Entity except, AABB bb, @Nullable Predicate<? super Entity> selector) 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
-
environmentAttributes
- Specified by:
environmentAttributesin interfaceLevelReader
-