Package net.minecraft.world.level.chunk
Class LevelChunk
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<LevelChunk>
net.minecraft.world.level.chunk.LevelChunk
- All Implemented Interfaces:
BlockGetter,ChunkAccess,FeatureAccess,LevelHeightAccessor,ICapabilityProvider,IForgeLevelChunk
- Direct Known Subclasses:
EmptyLevelChunk
public class LevelChunk
extends CapabilityProvider<LevelChunk>
implements ChunkAccess, IForgeLevelChunk
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classstatic class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChunkBiomeContainerprivate Map<BlockPos,BlockEntity>private ChunkPosstatic LevelChunkSectionprivate Supplier<ChunkHolder.FullChunkStatus>private it.unimi.dsi.fastutil.ints.Int2ObjectMap<GameEventDispatcher>private Map<Heightmap.Types,Heightmap>private longprivate boolean(package private) Levelprivate boolean(package private) static org.apache.logging.log4j.Loggerprivate static TickingBlockEntityprivate Map<BlockPos,CompoundTag>private Consumer<LevelChunk>private it.unimi.dsi.fastutil.shorts.ShortList[]private LevelChunkSection[]private Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet>private Map<StructureFeature<?>,StructureStart<?>>private booleanprivate UpgradeData -
Constructor Summary
ConstructorsConstructorDescriptionLevelChunk(ServerLevel p_156365_, ProtoChunk p_156366_, Consumer<LevelChunk> p_156367_)LevelChunk(Level p_62796_, ChunkPos p_62797_, ChunkBiomeContainer p_62798_)LevelChunk(Level p_62800_, ChunkPos p_62801_, ChunkBiomeContainer p_62802_, UpgradeData p_62803_, TickList<Block> p_62804_, TickList<Fluid> p_62805_, long p_62806_, LevelChunkSection[] p_62807_, Consumer<LevelChunk> p_62808_) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAndRegisterBlockEntity(BlockEntity p_156391_)voidDeprecated.private <T extends BlockEntity>
voidaddGameEventListener(T p_156405_)voidaddReferenceForFeature(StructureFeature<?> p_62856_, long p_62857_)private BlockEntitycreateBlockEntity(BlockPos p_62935_)private <T extends BlockEntity>
TickingBlockEntitycreateTicker(T p_156376_, BlockEntityTicker<T> p_156377_)Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet>Map<StructureFeature<?>,StructureStart<?>>getBlockEntity(BlockPos p_62912_)getBlockEntity(BlockPos p_62868_, LevelChunk.EntityCreationType p_62869_)getBlockEntityNbt(BlockPos p_62929_)getBlockEntityNbtForSaving(BlockPos p_62932_)getBlockState(BlockPos p_62923_)getEventDispatcher(int p_156372_)getFluidState(int p_62815_, int p_62816_, int p_62817_)getFluidState(BlockPos p_62895_)getHeighestPosition(Heightmap.Types p_156393_)intintgetHeight(Heightmap.Types p_62847_, int p_62848_, int p_62849_)longgetLevel()intgetOrCreateHeightmapUnprimed(Heightmap.Types p_62845_)getPos()it.unimi.dsi.fastutil.shorts.ShortList[]it.unimi.dsi.fastutil.longs.LongSetgetReferencesForFeature(StructureFeature<?> p_62893_)getStartForFeature(StructureFeature<?> p_62854_)voidbooleanisEmpty()private booleanboolean(package private) booleanbooleanvoidprivate voidonBlockEntityRemove(BlockEntity p_156401_)voidpackTicks(ServerLevel p_62824_)voidprivate BlockEntitypromotePendingBlockEntity(BlockPos p_62871_, CompoundTag p_62872_)voidreadCapsFromNBT(CompoundTag tag)Deprecated.voidvoidremoveBlockEntity(BlockPos p_62919_)private voidremoveBlockEntityTicker(BlockPos p_156413_)private <T extends BlockEntity>
voidremoveGameEventListener(T p_156397_)voidreplaceWithPacketData(ChunkBiomeContainer p_156384_, FriendlyByteBuf p_156385_, CompoundTag p_156386_, BitSet p_156387_)voidvoidsetAllReferences(Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> p_62897_)voidsetAllStarts(Map<StructureFeature<?>,StructureStart<?>> p_62878_)voidsetBlockEntity(BlockEntity p_156374_)voidsetBlockEntityNbt(CompoundTag p_62882_)setBlockState(BlockPos p_62865_, BlockState p_62866_, boolean p_62867_)voidsetFullStatus(Supplier<ChunkHolder.FullChunkStatus> p_62880_)voidsetInhabitedTime(long p_62890_)voidsetLightCorrect(boolean p_62899_)voidsetLoaded(boolean p_62914_)voidsetStartForFeature(StructureFeature<?> p_62859_, StructureStart<?> p_62860_)voidsetUnsaved(boolean p_62884_)voidprivate <T extends BlockEntity>
voidupdateBlockEntityTicker(T p_156407_)Deprecated.Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.minecraft.world.level.chunk.ChunkAccess
addPackedPostProcess, getHighestSection, getHighestSectionPosition, getOrCreateSection, isYSpaceEmpty, markPosForPostprocessing, setHeightmapMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
NULL_TICKER
-
EMPTY_SECTION
-
sections
-
biomes
-
pendingBlockEntities
-
tickersInLevel
-
loaded
private boolean loaded -
level
-
heightmaps
-
upgradeData
-
blockEntities
-
structureStarts
-
structuresRefences
-
postProcessing
private final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessing -
blockTicks
-
liquidTicks
-
unsaved
private volatile boolean unsaved -
inhabitedTime
private long inhabitedTime -
fullStatus
-
postLoad
-
chunkPos
-
isLightCorrect
private volatile boolean isLightCorrect -
gameEventDispatcherSections
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<GameEventDispatcher> gameEventDispatcherSections
-
-
Constructor Details
-
LevelChunk
-
LevelChunk
public LevelChunk(Level p_62800_, ChunkPos p_62801_, ChunkBiomeContainer p_62802_, UpgradeData p_62803_, TickList<Block> p_62804_, TickList<Fluid> p_62805_, long p_62806_, @Nullable LevelChunkSection[] p_62807_, @Nullable Consumer<LevelChunk> p_62808_) -
LevelChunk
public LevelChunk(ServerLevel p_156365_, ProtoChunk p_156366_, @Nullable Consumer<LevelChunk> p_156367_)
-
-
Method Details
-
getEventDispatcher
- Specified by:
getEventDispatcherin interfaceChunkAccess
-
getOrCreateHeightmapUnprimed
- Specified by:
getOrCreateHeightmapUnprimedin interfaceChunkAccess
-
getBlockEntitiesPos
- Specified by:
getBlockEntitiesPosin interfaceChunkAccess
-
getSections
- Specified by:
getSectionsin interfaceChunkAccess
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
getFluidState
-
setBlockState
@Nullable public BlockState setBlockState(BlockPos p_62865_, BlockState p_62866_, boolean p_62867_)- Specified by:
setBlockStatein interfaceChunkAccess
-
addEntity
Deprecated.- Specified by:
addEntityin interfaceChunkAccess
-
getHeight
- Specified by:
getHeightin interfaceChunkAccess
-
getHeighestPosition
- Specified by:
getHeighestPositionin interfaceChunkAccess
-
createBlockEntity
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter
-
getBlockEntity
@Nullable public BlockEntity getBlockEntity(BlockPos p_62868_, LevelChunk.EntityCreationType p_62869_) -
addAndRegisterBlockEntity
-
isInLevel
private boolean isInLevel() -
isTicking
-
setBlockEntity
- Specified by:
setBlockEntityin interfaceChunkAccess
-
setBlockEntityNbt
- Specified by:
setBlockEntityNbtin interfaceChunkAccess
-
getBlockEntityNbtForSaving
- Specified by:
getBlockEntityNbtForSavingin interfaceChunkAccess
-
removeBlockEntity
- Specified by:
removeBlockEntityin interfaceChunkAccess
-
removeGameEventListener
-
removeBlockEntityTicker
-
runPostLoad
public void runPostLoad() -
markUnsaved
public void markUnsaved() -
isEmpty
public boolean isEmpty() -
getPos
- Specified by:
getPosin interfaceChunkAccess
-
replaceWithPacketData
public void replaceWithPacketData(@Nullable ChunkBiomeContainer p_156384_, FriendlyByteBuf p_156385_, CompoundTag p_156386_, BitSet p_156387_) -
onBlockEntityRemove
-
getBiomes
- Specified by:
getBiomesin interfaceChunkAccess
-
setLoaded
public void setLoaded(boolean p_62914_) -
getLevel
-
getHeightmaps
- Specified by:
getHeightmapsin interfaceChunkAccess
-
getBlockEntities
-
getBlockEntityNbt
- Specified by:
getBlockEntityNbtin interfaceChunkAccess
-
getLights
- Specified by:
getLightsin interfaceChunkAccess
-
getBlockTicks
- Specified by:
getBlockTicksin interfaceChunkAccess
-
getLiquidTicks
- Specified by:
getLiquidTicksin interfaceChunkAccess
-
setUnsaved
public void setUnsaved(boolean p_62884_)- Specified by:
setUnsavedin interfaceChunkAccess
-
isUnsaved
public boolean isUnsaved()- Specified by:
isUnsavedin interfaceChunkAccess
-
getStartForFeature
- Specified by:
getStartForFeaturein interfaceFeatureAccess
-
setStartForFeature
- Specified by:
setStartForFeaturein interfaceFeatureAccess
-
getAllStarts
- Specified by:
getAllStartsin interfaceChunkAccess
-
setAllStarts
- Specified by:
setAllStartsin interfaceChunkAccess
-
getReferencesForFeature
- Specified by:
getReferencesForFeaturein interfaceFeatureAccess
-
addReferenceForFeature
- Specified by:
addReferenceForFeaturein interfaceFeatureAccess
-
getAllReferences
- Specified by:
getAllReferencesin interfaceFeatureAccess
-
setAllReferences
public void setAllReferences(Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> p_62897_)- Specified by:
setAllReferencesin interfaceFeatureAccess
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTimein interfaceChunkAccess
-
setInhabitedTime
public void setInhabitedTime(long p_62890_)- Specified by:
setInhabitedTimein interfaceChunkAccess
-
postProcessGeneration
public void postProcessGeneration() -
promotePendingBlockEntity
-
getUpgradeData
- Specified by:
getUpgradeDatain interfaceChunkAccess
-
getPostProcessing
public it.unimi.dsi.fastutil.shorts.ShortList[] getPostProcessing()- Specified by:
getPostProcessingin interfaceChunkAccess
-
unpackTicks
public void unpackTicks() -
packTicks
-
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeightin interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLevelHeightAccessor
-
getStatus
- Specified by:
getStatusin interfaceChunkAccess
-
getFullStatus
-
setFullStatus
-
isLightCorrect
public boolean isLightCorrect()- Specified by:
isLightCorrectin interfaceChunkAccess
-
setLightCorrect
public void setLightCorrect(boolean p_62899_)- Specified by:
setLightCorrectin interfaceChunkAccess
-
invalidateAllBlockEntities
public void invalidateAllBlockEntities() -
registerAllBlockEntitiesAfterLevelLoad
public void registerAllBlockEntitiesAfterLevelLoad() -
addGameEventListener
-
updateBlockEntityTicker
-
createTicker
private <T extends BlockEntity> TickingBlockEntity createTicker(T p_156376_, BlockEntityTicker<T> p_156377_) -
writeCapsToNBT
Deprecated.FOR INTERNAL USE ONLYOnly public for use in
ChunkSerializer. -
readCapsFromNBT
Deprecated.FOR INTERNAL USE ONLYOnly public for use in
ChunkSerializer. -
getWorldForge
- Specified by:
getWorldForgein interfaceChunkAccess
-