Package net.minecraft.world.level.chunk
Class ChunkAccess
java.lang.Object
net.minecraft.world.level.chunk.ChunkAccess
- All Implemented Interfaces:
BiomeManager.NoiseBiomeSource
,BlockGetter
,FeatureAccess
,LevelHeightAccessor
,IForgeBlockGetter
- Direct Known Subclasses:
LevelChunk
,ProtoChunk
public abstract class ChunkAccess
extends Object
implements BlockGetter, BiomeManager.NoiseBiomeSource, FeatureAccess
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected BlendingData
protected final Map<BlockPos,
BlockEntity> Deprecated.protected final ChunkPos
private static final it.unimi.dsi.fastutil.longs.LongSet
protected final Map<Heightmap.Types,
Heightmap> private long
private boolean
protected final LevelHeightAccessor
private static final org.slf4j.Logger
protected NoiseChunk
protected final Map<BlockPos,
CompoundTag> protected final it.unimi.dsi.fastutil.shorts.ShortList[]
protected final LevelChunkSection[]
private final Map<ConfiguredStructureFeature<?,
?>, it.unimi.dsi.fastutil.longs.LongSet> private final Map<ConfiguredStructureFeature<?,
?>, StructureStart> protected boolean
protected final UpgradeData
-
Constructor Summary
ConstructorDescriptionChunkAccess
(ChunkPos p_187621_, UpgradeData p_187622_, LevelHeightAccessor p_187623_, Registry<Biome> p_187624_, long p_187625_, LevelChunkSection[] p_187626_, BlendingData p_187627_) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
void
addPackedPostProcess
(short p_62092_, int p_62093_) void
addReferenceForFeature
(ConfiguredStructureFeature<?, ?> p_207946_, long p_207947_) carverBiome
(Supplier<Holder<Biome>> p_204345_) Deprecated.void
fillBiomesFromNoise
(BiomeResolver p_187638_, Climate.Sampler p_187639_) Map<ConfiguredStructureFeature<?,
?>, it.unimi.dsi.fastutil.longs.LongSet> getBlockEntityNbt
(BlockPos p_62103_) abstract CompoundTag
getBlockEntityNbtForSaving
(BlockPos p_62104_) abstract TickContainerAccess<Block>
getEventDispatcher
(int p_156113_) abstract TickContainerAccess<Fluid>
int
int
getHeight
(Heightmap.Types p_62080_, int p_62081_, int p_62082_) int
long
int
getNoiseBiome
(int p_204347_, int p_204348_, int p_204349_) getOrCreateHeightmapUnprimed
(Heightmap.Types p_62079_) getOrCreateNoiseChunk
(NoiseRouter p_207938_, Supplier<DensityFunctions.BeardifierOrMarker> p_207939_, NoiseGeneratorSettings p_207940_, Aquifer.FluidPicker p_207941_, Blender p_207942_) static it.unimi.dsi.fastutil.shorts.ShortList
getOrCreateOffsetList
(it.unimi.dsi.fastutil.shorts.ShortList[] p_62096_, int p_62097_) getPos()
it.unimi.dsi.fastutil.shorts.ShortList[]
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForFeature
(ConfiguredStructureFeature<?, ?> p_207952_) getSection
(int p_187657_) getStartForFeature
(ConfiguredStructureFeature<?, ?> p_207944_) abstract ChunkStatus
abstract ChunkAccess.TicksToSave
boolean
boolean
hasPrimedHeightmap
(Heightmap.Types p_187659_) void
incrementInhabitedTime
(long p_187633_) boolean
boolean
boolean
boolean
boolean
isYSpaceEmpty
(int p_62075_, int p_62076_) void
markPosForPostprocessing
(BlockPos p_62102_) abstract void
removeBlockEntity
(BlockPos p_62101_) private static void
replaceMissingSections
(LevelHeightAccessor p_187635_, Registry<Biome> p_187636_, LevelChunkSection[] p_187637_) void
setAllReferences
(Map<ConfiguredStructureFeature<?, ?>, it.unimi.dsi.fastutil.longs.LongSet> p_187663_) void
setAllStarts
(Map<ConfiguredStructureFeature<?, ?>, StructureStart> p_62090_) void
setBlendingData
(BlendingData p_187646_) abstract void
setBlockEntity
(BlockEntity p_156114_) void
setBlockEntityNbt
(CompoundTag p_62091_) abstract BlockState
setBlockState
(BlockPos p_62087_, BlockState p_62088_, boolean p_62089_) void
setHeightmap
(Heightmap.Types p_62083_, long[] p_62084_) void
setInhabitedTime
(long p_62099_) void
setLightCorrect
(boolean p_62100_) void
setStartForFeature
(ConfiguredStructureFeature<?, ?> p_207949_, StructureStart p_207950_) void
setUnsaved
(boolean p_62094_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockState, getBlockStates, getFluidState, getLightEmission, getMaxLightLevel, isBlockInLine
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockGetter
getExistingBlockEntity
Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
EMPTY_REFERENCE_SET
private static final it.unimi.dsi.fastutil.longs.LongSet EMPTY_REFERENCE_SET -
postProcessing
protected final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessing -
unsaved
protected volatile boolean unsaved -
isLightCorrect
private volatile boolean isLightCorrect -
chunkPos
-
inhabitedTime
private long inhabitedTime -
carverBiome
Deprecated. -
noiseChunk
-
upgradeData
-
blendingData
-
heightmaps
-
structureStarts
-
structuresRefences
private final Map<ConfiguredStructureFeature<?,?>, structuresRefencesit.unimi.dsi.fastutil.longs.LongSet> -
pendingBlockEntities
-
blockEntities
-
levelHeightAccessor
-
sections
-
-
Constructor Details
-
ChunkAccess
public ChunkAccess(ChunkPos p_187621_, UpgradeData p_187622_, LevelHeightAccessor p_187623_, Registry<Biome> p_187624_, long p_187625_, @Nullable LevelChunkSection[] p_187626_, @Nullable BlendingData p_187627_)
-
-
Method Details
-
replaceMissingSections
private static void replaceMissingSections(LevelHeightAccessor p_187635_, Registry<Biome> p_187636_, LevelChunkSection[] p_187637_) -
getEventDispatcher
-
setBlockState
@Nullable public abstract BlockState setBlockState(BlockPos p_62087_, BlockState p_62088_, boolean p_62089_) -
setBlockEntity
-
addEntity
-
getHighestSection
-
getHighestSectionPosition
public int getHighestSectionPosition() -
getBlockEntitiesPos
-
getSections
-
getSection
-
getHeightmaps
-
setHeightmap
-
getOrCreateHeightmapUnprimed
-
hasPrimedHeightmap
-
getHeight
-
getPos
-
getStartForFeature
- Specified by:
getStartForFeature
in interfaceFeatureAccess
-
setStartForFeature
- Specified by:
setStartForFeature
in interfaceFeatureAccess
-
getAllStarts
-
setAllStarts
-
getReferencesForFeature
public it.unimi.dsi.fastutil.longs.LongSet getReferencesForFeature(ConfiguredStructureFeature<?, ?> p_207952_) - Specified by:
getReferencesForFeature
in interfaceFeatureAccess
-
addReferenceForFeature
- Specified by:
addReferenceForFeature
in interfaceFeatureAccess
-
getAllReferences
- Specified by:
getAllReferences
in interfaceFeatureAccess
-
setAllReferences
public void setAllReferences(Map<ConfiguredStructureFeature<?, ?>, it.unimi.dsi.fastutil.longs.LongSet> p_187663_) - Specified by:
setAllReferences
in interfaceFeatureAccess
-
isYSpaceEmpty
public boolean isYSpaceEmpty(int p_62075_, int p_62076_) -
setUnsaved
public void setUnsaved(boolean p_62094_) -
isUnsaved
public boolean isUnsaved() -
getStatus
-
removeBlockEntity
-
markPosForPostprocessing
-
getPostProcessing
public it.unimi.dsi.fastutil.shorts.ShortList[] getPostProcessing() -
addPackedPostProcess
public void addPackedPostProcess(short p_62092_, int p_62093_) -
setBlockEntityNbt
-
getBlockEntityNbt
-
getBlockEntityNbtForSaving
-
getLights
-
getBlockTicks
-
getFluidTicks
-
getTicksForSerialization
-
getUpgradeData
-
isOldNoiseGeneration
public boolean isOldNoiseGeneration() -
getBlendingData
-
setBlendingData
-
getInhabitedTime
public long getInhabitedTime() -
incrementInhabitedTime
public void incrementInhabitedTime(long p_187633_) -
setInhabitedTime
public void setInhabitedTime(long p_62099_) -
getOrCreateOffsetList
public static it.unimi.dsi.fastutil.shorts.ShortList getOrCreateOffsetList(it.unimi.dsi.fastutil.shorts.ShortList[] p_62096_, int p_62097_) -
isLightCorrect
public boolean isLightCorrect() -
setLightCorrect
public void setLightCorrect(boolean p_62100_) -
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeight
in interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceLevelHeightAccessor
-
getOrCreateNoiseChunk
public NoiseChunk getOrCreateNoiseChunk(NoiseRouter p_207938_, Supplier<DensityFunctions.BeardifierOrMarker> p_207939_, NoiseGeneratorSettings p_207940_, Aquifer.FluidPicker p_207941_, Blender p_207942_) -
carverBiome
Deprecated. -
getNoiseBiome
- Specified by:
getNoiseBiome
in interfaceBiomeManager.NoiseBiomeSource
-
fillBiomesFromNoise
-
hasAnyStructureReferences
public boolean hasAnyStructureReferences() -
getBelowZeroRetrogen
-
isUpgrading
public boolean isUpgrading() -
getHeightAccessorForGeneration
-
getWorldForge
-