Package net.minecraft.world.level.chunk
Class LevelChunk
java.lang.Object
net.minecraft.world.level.chunk.ChunkAccess
net.minecraft.world.level.chunk.LevelChunk
- All Implemented Interfaces:
- BiomeManager.NoiseBiomeSource,- BlockGetter,- LightChunk,- StructureAccess,- LevelHeightAccessor,- IAttachmentHolder,- IBlockGetterExtension
- Direct Known Subclasses:
- EmptyLevelChunk
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) classstatic enumstatic interface(package private) classNested classes/interfaces inherited from class net.minecraft.world.level.chunk.ChunkAccessChunkAccess.TicksToSave
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final LevelChunkAuxiliaryLightManagerprivate final LevelChunkTicks<Block>private final LevelChunkTicks<Fluid>private Supplier<FullChunkStatus>private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<GameEventListenerRegistry>(package private) final Levelprivate boolean(package private) static final org.slf4j.Loggerprivate static final TickingBlockEntityprivate LevelChunk.PostLoadProcessorprivate final Map<BlockPos,LevelChunk.RebindableTickingBlockEntityWrapper> Fields inherited from class net.minecraft.world.level.chunk.ChunkAccessblendingData, blockEntities, chunkPos, heightmaps, levelHeightAccessor, NO_FILLED_SECTION, noiseChunk, pendingBlockEntities, postProcessing, sections, skyLightSources, unsaved, upgradeData
- 
Constructor SummaryConstructorsConstructorDescriptionLevelChunk(ServerLevel p_196850_, ProtoChunk p_196851_, LevelChunk.PostLoadProcessor p_196852_) LevelChunk(Level p_187945_, ChunkPos p_187946_) LevelChunk(Level p_196854_, ChunkPos p_196855_, UpgradeData p_196856_, LevelChunkTicks<Block> p_196857_, LevelChunkTicks<Fluid> p_196858_, long p_196859_, LevelChunkSection[] p_196860_, LevelChunk.PostLoadProcessor p_196861_, BlendingData p_196862_) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAndRegisterBlockEntity(BlockEntity p_156391_) voidDeprecated.private <T extends BlockEntity>
 voidaddGameEventListener(T p_223416_, ServerLevel p_223417_) voidprivate BlockEntitycreateBlockEntity(BlockPos p_62935_) private <T extends BlockEntity>
 TickingBlockEntitycreateTicker(T p_156376_, BlockEntityTicker<T> p_156377_) Get theAuxiliaryLightManagerof the chunk at the givenChunkPos.getBlockEntity(BlockPos p_62912_) getBlockEntity(BlockPos p_62868_, LevelChunk.EntityCreationType p_62869_) getBlockEntityNbtForSaving(BlockPos p_62932_) getBlockState(BlockPos p_62923_) getFluidState(int p_62815_, int p_62816_, int p_62817_) getFluidState(BlockPos p_62895_) getLevel()getListenerRegistry(int p_251193_) booleanisEmpty()private boolean(package private) booleanvoidprivate BlockEntitypromotePendingBlockEntity(BlockPos p_62871_, CompoundTag p_62872_) voidvoidregisterTickContainerInLevel(ServerLevel p_187959_) voidremoveBlockEntity(BlockPos p_62919_) private voidremoveBlockEntityTicker(BlockPos p_156413_) private <T extends BlockEntity>
 voidremoveGameEventListener(T p_223413_, ServerLevel p_223414_) private voidremoveGameEventListenerRegistry(int p_283355_) voidreplaceBiomes(FriendlyByteBuf p_275574_) voidreplaceWithPacketData(FriendlyByteBuf p_187972_, CompoundTag p_187973_, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> p_187974_) voidvoidsetBlockEntity(BlockEntity p_156374_) setBlockState(BlockPos p_62865_, BlockState p_62866_, boolean p_62867_) voidsetFullStatus(Supplier<FullChunkStatus> p_62880_) voidsetLoaded(boolean p_62914_) voidunpackTicks(long p_187986_) voidunregisterTickContainerFromLevel(ServerLevel p_187980_) private <T extends BlockEntity>
 voidupdateBlockEntityTicker(T p_156407_) Methods inherited from class net.minecraft.world.level.chunk.ChunkAccessaddPackedPostProcess, addReferenceForStructure, carverBiome, fillBiomesFromNoise, findBlockLightSources, findBlocks, findBlocks, getAllReferences, getAllStarts, getAttachmentHolder, getBelowZeroRetrogen, getBlendingData, getBlockEntitiesPos, getBlockEntityNbt, getData, getHeight, getHeight, getHeightAccessorForGeneration, getHeightmaps, getHighestFilledSectionIndex, getHighestGeneratedStatus, getHighestSectionPosition, getInhabitedTime, getMinBuildHeight, getNoiseBiome, getOrCreateHeightmapUnprimed, getOrCreateNoiseChunk, getOrCreateOffsetList, getPos, getPostProcessing, getReferencesForStructure, getSection, getSections, getSkyLightSources, getStartForStructure, getUpgradeData, hasAnyStructureReferences, hasAttachments, hasData, hasPrimedHeightmap, incrementInhabitedTime, initializeLightSources, isLightCorrect, isOldNoiseGeneration, isUnsaved, isUpgrading, isYSpaceEmpty, markPosForPostprocessing, readAttachmentsFromNBT, removeData, setAllReferences, setAllStarts, setBlendingData, setBlockEntityNbt, setData, setHeightmap, setInhabitedTime, setLightCorrect, setStartForStructure, setUnsaved, writeAttachmentsToNBTMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockGetterclip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, getData, hasAttachments, hasData, hasData, removeData, removeData, setData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtensiongetAuxLightManager, getModelDataManagerMethods inherited from interface net.minecraft.world.level.LevelHeightAccessorgetMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
- 
Field Details- 
LOGGERstatic final org.slf4j.Logger LOGGER
- 
NULL_TICKER
- 
tickersInLevel
- 
loadedprivate boolean loaded
- 
level
- 
fullStatus
- 
postLoad
- 
gameEventListenerRegistrySectionsprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap<GameEventListenerRegistry> gameEventListenerRegistrySections
- 
blockTicks
- 
fluidTicks
- 
auxLightManager
 
- 
- 
Constructor Details- 
LevelChunk
- 
LevelChunkpublic LevelChunk(Level p_196854_, ChunkPos p_196855_, UpgradeData p_196856_, LevelChunkTicks<Block> p_196857_, LevelChunkTicks<Fluid> p_196858_, long p_196859_, @Nullable LevelChunkSection[] p_196860_, @Nullable LevelChunk.PostLoadProcessor p_196861_, @Nullable BlendingData p_196862_) 
- 
LevelChunkpublic LevelChunk(ServerLevel p_196850_, ProtoChunk p_196851_, @Nullable LevelChunk.PostLoadProcessor p_196852_) 
 
- 
- 
Method Details- 
getBlockTicks- Specified by:
- getBlockTicksin class- ChunkAccess
 
- 
getFluidTicks- Specified by:
- getFluidTicksin class- ChunkAccess
 
- 
getTicksForSerialization- Specified by:
- getTicksForSerializationin class- ChunkAccess
 
- 
getListenerRegistry- Overrides:
- getListenerRegistryin class- ChunkAccess
 
- 
getBlockState- Specified by:
- getBlockStatein interface- BlockGetter
 
- 
getFluidState- Specified by:
- getFluidStatein interface- BlockGetter
 
- 
getFluidState
- 
setBlockState- Specified by:
- setBlockStatein class- ChunkAccess
 
- 
addEntityDeprecated.- Specified by:
- addEntityin class- ChunkAccess
 
- 
createBlockEntity
- 
getBlockEntity- Specified by:
- getBlockEntityin interface- BlockGetter
 
- 
getBlockEntity@Nullable public BlockEntity getBlockEntity(BlockPos p_62868_, LevelChunk.EntityCreationType p_62869_) 
- 
addAndRegisterBlockEntity
- 
isInLevelprivate boolean isInLevel()
- 
isTicking
- 
setBlockEntity- Specified by:
- setBlockEntityin class- ChunkAccess
 
- 
getBlockEntityNbtForSaving- Specified by:
- getBlockEntityNbtForSavingin class- ChunkAccess
 
- 
removeBlockEntity- Specified by:
- removeBlockEntityin class- ChunkAccess
 
- 
removeGameEventListener
- 
removeGameEventListenerRegistryprivate void removeGameEventListenerRegistry(int p_283355_) 
- 
removeBlockEntityTicker
- 
runPostLoadpublic void runPostLoad()
- 
isEmptypublic boolean isEmpty()
- 
replaceWithPacketDatapublic void replaceWithPacketData(FriendlyByteBuf p_187972_, CompoundTag p_187973_, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> p_187974_) 
- 
replaceBiomes
- 
setLoadedpublic void setLoaded(boolean p_62914_) 
- 
getLevel
- 
getBlockEntities
- 
postProcessGenerationpublic void postProcessGeneration()
- 
promotePendingBlockEntity
- 
unpackTickspublic void unpackTicks(long p_187986_) 
- 
registerTickContainerInLevel
- 
unregisterTickContainerFromLevel
- 
getStatus- Specified by:
- getStatusin class- ChunkAccess
 
- 
getFullStatus
- 
setFullStatus
- 
clearAllBlockEntitiespublic void clearAllBlockEntities()
- 
registerAllBlockEntitiesAfterLevelLoadpublic void registerAllBlockEntitiesAfterLevelLoad()
- 
addGameEventListener
- 
updateBlockEntityTicker
- 
createTickerprivate <T extends BlockEntity> TickingBlockEntity createTicker(T p_156376_, BlockEntityTicker<T> p_156377_) 
- 
getAuxLightManagerDescription copied from interface:IBlockGetterExtensionGet theAuxiliaryLightManagerof the chunk at the givenChunkPos.The light manager must be used to hold light values controlled by dynamic data from BlockEntitys to ensure access to the light data is thread-safe and the data is available during chunk load from disk whereBlockEntitys are not yet added to the chunk.- Specified by:
- getAuxLightManagerin interface- IBlockGetterExtension
- Parameters:
- pos- The position of the chunk from which the light manager is requested
- Returns:
- the light manager or nullif the chunk is not accessible (ChunkSource.getChunkForLighting(int, int)returnednull) or the given implementation ofBlockGetterdoes not implement this method
 
- 
getWorldForge- Overrides:
- getWorldForgein class- ChunkAccess
 
 
-