net.minecraft.world.chunk

public abstract class Chunk

implements LightSourceView, StructureHolder, BiomeAccess$Storage

net.minecraft.world.level.chunk.ChunkAccess
net.minecraft.class_2791
net.minecraft.world.chunk.Chunk

Field summary

Modifier and TypeField
public static final int
NO_FILLED_SECTION
field_44632
MISSING_SECTION
private static final org.slf4j.Logger
LOGGER
field_34548
LOGGER
private static final it.unimi.dsi.fastutil.longs.LongSet
EMPTY_REFERENCE_SET
field_37052
EMPTY_STRUCTURE_REFERENCES
protected final it.unimi.dsi.fastutil.shorts.ShortList[]
postProcessing
field_34536
postProcessingLists
private volatile boolean
unsaved
field_34537
needsSaving
private volatile boolean
isLightCorrect
field_34549
lightOn
protected final ChunkPos
chunkPos
field_34538
pos
private long
inhabitedTime
field_34550
inhabitedTime
private GenerationSettings
carverBiomeSettings
field_39411
generationSettings
protected ChunkNoiseSampler
noiseChunk
field_34539
chunkNoiseSampler
protected final UpgradeData
upgradeData
field_34540
upgradeData
protected final BlendingData
blendingData
field_35468
blendingData
protected final Map<Heightmap$Type, Heightmap>
heightmaps
field_34541
heightmaps
protected ChunkSkyLight
skyLightSources
field_44708
chunkSkyLight
private final Map<Structure, StructureStart>
structureStarts
field_34552
structureStarts
private final Map<Structure, it.unimi.dsi.fastutil.longs.LongSet>
structuresRefences
field_34553
structureReferences
protected final Map<BlockPos, NbtCompound>
pendingBlockEntities
field_34542
blockEntityNbts
protected final Map<BlockPos, BlockEntity>
blockEntities
field_34543
blockEntities
protected final HeightLimitView
levelHeightAccessor
field_34544
heightLimitView
protected final ChunkSection[]
sections
field_34545
sectionArray

Constructor summary

ModifierConstructor
public (ChunkPos pos, UpgradeData upgradeData, HeightLimitView heightLimitView, PalettesFactory palettesFactory, long inhabitedTime, ChunkSection[] sectionArray, BlendingData blendingData)

Method summary

Modifier and TypeMethod
private static void
replaceMissingSections(PalettedContainerFactory containerFactory, LevelChunkSection[] sections)
method_38256(class_11897 arg0, class_2826[] arg1)
fillSectionArray(PalettesFactory palettesFactory, ChunkSection[] sectionArray)
public GameEventDispatcher
getListenerRegistry(int section)
method_32914(int arg0)
getGameEventDispatcher(int ySectionCoord)
public BlockState
setBlockState(BlockPos pos, BlockState state)
method_66480(class_2338 arg0, class_2680 arg1)
setBlockState(BlockPos pos, BlockState state)
public abstract BlockState
setBlockState(BlockPos pos, BlockState state, int flags)
method_12010(class_2338 arg0, class_2680 arg1, int arg2)
setBlockState(BlockPos pos, BlockState state, int flags)
public abstract void
setBlockEntity(BlockEntity blockEntity)
method_12007(class_2586 arg0)
setBlockEntity(BlockEntity blockEntity)
public abstract void
addEntity(Entity entity)
method_12002(class_1297 arg0)
addEntity(Entity entity)
public int
getHighestFilledSectionIndex()
method_12040()
getHighestNonEmptySection()
public int
getHighestSectionPosition()
method_12031()
getHighestNonEmptySectionYOffset()
public Set<BlockPos>
getBlockEntitiesPos()
method_12021()
getBlockEntityPositions()
public ChunkSection[]
getSections()
method_12006()
getSectionArray()
public ChunkSection
getSection(int sectionIndex)
method_38259(int arg0)
getSection(int yIndex)
public Collection<Map$Entry<Heightmap$Type, Heightmap>>
getHeightmaps()
method_12011()
getHeightmaps()
public void
setHeightmap(Heightmap$Types key, long[] data)
method_12037(class_2902$class_2903 arg0, long[] arg1)
setHeightmap(Heightmap$Type type, long[] heightmap)
public Heightmap
getOrCreateHeightmapUnprimed(Heightmap$Types type)
method_12032(class_2902$class_2903 arg0)
getHeightmap(Heightmap$Type type)
public boolean
hasPrimedHeightmap(Heightmap$Types type)
method_39295(class_2902$class_2903 arg0)
hasHeightmap(Heightmap$Type type)
public int
getHeight(Heightmap$Types type, int x, int z)
method_12005(class_2902$class_2903 arg0, int arg1, int arg2)
sampleHeightmap(Heightmap$Type type, int x, int z)
public ChunkPos
getPos()
method_12004()
getPos()
public StructureStart
getStartForStructure(Structure structure)
method_12181(class_3195 arg0)
getStructureStart(Structure arg0)
public void
setStartForStructure(Structure structure, StructureStart structureStart)
method_12184(class_3195 arg0, class_3449 arg1)
setStructureStart(Structure arg0, StructureStart arg1)
public Map<Structure, StructureStart>
getAllStarts()
method_12016()
getStructureStarts()
public void
setAllStarts(Map<Structure, StructureStart> starts)
method_12034(Map<class_3195, class_3449> arg0)
setStructureStarts(Map<Structure, StructureStart> structureStarts)
public it.unimi.dsi.fastutil.longs.LongSet
getReferencesForStructure(Structure structure)
method_12180(class_3195 arg0)
getStructureReferences(Structure arg0)
public void
addReferenceForStructure(Structure structure, long reference)
method_12182(class_3195 arg0, long arg1)
addStructureReference(Structure arg0, long arg1)
public Map<Structure, it.unimi.dsi.fastutil.longs.LongSet>
getAllReferences()
method_12179()
getStructureReferences()
public void
setAllReferences(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> data)
method_12183(Map<class_3195, it.unimi.dsi.fastutil.longs.LongSet> arg0)
setStructureReferences(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> arg0)
public boolean
isYSpaceEmpty(int yStartInclusive, int yEndInclusive)
method_12228(int arg0, int arg1)
areSectionsEmptyBetween(int lowerHeight, int upperHeight)
public void
markUnsaved()
method_65063()
markNeedsSaving()
public boolean
tryMarkSaved()
method_65064()
tryMarkSaved()
public boolean
isUnsaved()
method_12044()
needsSaving()
public abstract ChunkStatus
getPersistedStatus()
method_12009()
getStatus()
public ChunkStatus
getHighestGeneratedStatus()
method_51526()
getMaxStatus()
public abstract void
removeBlockEntity(BlockPos pos)
method_12041(class_2338 arg0)
removeBlockEntity(BlockPos pos)
public void
markPosForPostprocessing(BlockPos blockPos)
method_12039(class_2338 arg0)
markBlockForPostProcessing(BlockPos pos)
public it.unimi.dsi.fastutil.shorts.ShortList[]
getPostProcessing()
method_12012()
getPostProcessingLists()
public void
addPackedPostProcess(it.unimi.dsi.fastutil.shorts.ShortList packedOffsets, int sectionIndex)
method_12029(it.unimi.dsi.fastutil.shorts.ShortList arg0, int arg1)
markBlocksForPostProcessing(it.unimi.dsi.fastutil.shorts.ShortList packedPositions, int index)
public void
setBlockEntityNbt(CompoundTag entityTag)
method_12042(class_2487 arg0)
addPendingBlockEntityNbt(NbtCompound nbt)
public NbtCompound
getBlockEntityNbt(BlockPos blockPos)
method_12024(class_2338 arg0)
getBlockEntityNbt(BlockPos pos)
public abstract NbtCompound
getBlockEntityNbtForSaving(BlockPos blockPos, HolderLookup$Provider registryAccess)
method_20598(class_2338 arg0, class_7225$class_7874 arg1)
getPackedBlockEntityNbt(BlockPos pos, RegistryWrapper$WrapperLookup registries)
public final void
findBlockLightSources(BiConsumer<BlockPos, BlockState> consumer)
method_51524(BiConsumer<class_2338, class_2680> arg0)
forEachLightSource(BiConsumer<BlockPos, BlockState> arg0)
public void
findBlocks(Predicate<BlockState> predicate, BiConsumer<BlockPos, BlockState> consumer)
method_51525(Predicate<class_2680> arg0, BiConsumer<class_2338, class_2680> arg1)
forEachBlockMatchingPredicate(Predicate<BlockState> predicate, BiConsumer<BlockPos, BlockState> consumer)
public abstract BasicTickScheduler<Block>
getBlockTicks()
method_12013()
getBlockTickScheduler()
public abstract BasicTickScheduler<Fluid>
getFluidTicks()
method_12014()
getFluidTickScheduler()
public boolean
canBeSerialized()
method_65069()
isSerializable()
public abstract Chunk$TickSchedulers
getTicksForSerialization(long currentTick)
method_39296(long arg0)
getTickSchedulers(long time)
public UpgradeData
getUpgradeData()
method_12003()
getUpgradeData()
public boolean
isOldNoiseGeneration()
method_39297()
usesOldNoise()
public BlendingData
getBlendingData()
method_39299()
getBlendingData()
public long
getInhabitedTime()
method_12033()
getInhabitedTime()
public void
incrementInhabitedTime(long inhabitedTimeDelta)
method_38870(long arg0)
increaseInhabitedTime(long timeDelta)
public void
setInhabitedTime(long inhabitedTime)
method_12028(long arg0)
setInhabitedTime(long inhabitedTime)
public static it.unimi.dsi.fastutil.shorts.ShortList
getOrCreateOffsetList(it.unimi.dsi.fastutil.shorts.ShortList[] list, int sectionIndex)
method_12026(it.unimi.dsi.fastutil.shorts.ShortList[] arg0, int arg1)
getList(it.unimi.dsi.fastutil.shorts.ShortList[] lists, int index)
public boolean
isLightCorrect()
method_12038()
isLightOn()
public void
setLightCorrect(boolean isLightCorrect)
method_12020(boolean arg0)
setLightOn(boolean lightOn)
public int
getMinY()
method_31607()
getBottomY()
public int
getHeight()
method_31605()
getHeight()
public ChunkNoiseSampler
getOrCreateNoiseChunk(Function<ChunkAccess, NoiseChunk> factory)
method_38255(Function<class_2791, class_6568> arg0)
getOrCreateChunkNoiseSampler(Function<Chunk, ChunkNoiseSampler> chunkNoiseSamplerCreator)
public GenerationSettings
carverBiome(Supplier<BiomeGenerationSettings> source)
method_44214(Supplier<class_5485> arg0)
getOrCreateGenerationSettings(Supplier<GenerationSettings> generationSettingsCreator)
public RegistryEntry<Biome>
getNoiseBiome(int quartX, int quartY, int quartZ)
method_16359(int arg0, int arg1, int arg2)
getBiomeForNoiseGen(int arg0, int arg1, int arg2)
public void
fillBiomesFromNoise(BiomeResolver biomeResolver, Climate$Sampler sampler)
method_38257(class_6780 arg0, class_6544$class_6552 arg1)
populateBiomes(BiomeSupplier biomeSupplier, MultiNoiseUtil$MultiNoiseSampler sampler)
public boolean
hasAnyStructureReferences()
method_38871()
hasStructureReferences()
public BelowZeroRetrogen
getBelowZeroRetrogen()
method_39300()
getBelowZeroRetrogen()
public boolean
isUpgrading()
method_39461()
hasBelowZeroRetrogen()
public HeightLimitView
getHeightAccessorForGeneration()
method_39460()
getHeightLimitView()
public void
initializeLightSources()
method_51522()
refreshSurfaceY()
public ChunkSkyLight
getSkyLightSources()
method_12018()
getChunkSkyLight()
public static ErrorReporter$Context
problemPath(ChunkPos pos)
method_71413(class_1923 arg0)
createErrorReporterContext(ChunkPos pos)
public ErrorReporter$Context
problemPath()
method_71412()
getErrorReporterContext()
private String
lambda$getNoiseBiome$0(int arg0, int arg1, int arg2)
method_38254(int arg0, int arg1, int arg2)
method_38254(int arg0, int arg1, int arg2)
private static boolean
lambda$findBlockLightSources$0(BlockState arg0)
method_51523(class_2680 arg0)
method_51523(BlockState blockState)
private static it.unimi.dsi.fastutil.longs.LongSet
lambda$addReferenceForStructure$0(Structure arg0)
method_38261(class_3195 arg0)
method_38261(Structure type2)
private Heightmap
lambda$getOrCreateHeightmapUnprimed$0(Heightmap$Types arg0)
method_38260(class_2902$class_2903 arg0)
method_38260(Heightmap$Type type2)