Package net.minecraft.world.level.chunk
Class ProtoChunk
java.lang.Object
net.minecraft.world.level.chunk.ProtoChunk
- All Implemented Interfaces:
BlockGetter
,ChunkAccess
,FeatureAccess
,LevelHeightAccessor
- Direct Known Subclasses:
ImposterProtoChunk
-
Field Summary
Modifier and TypeFieldDescriptionprivate ChunkBiomeContainer
private Map<BlockPos,BlockEntity>
private Map<BlockPos,CompoundTag>
private ProtoTickList<Block>
private Map<GenerationStep.Carving,BitSet>
private ChunkPos
private List<CompoundTag>
private Map<Heightmap.Types,Heightmap>
private long
private boolean
private boolean
private LevelHeightAccessor
private LevelLightEngine
private ProtoTickList<Fluid>
private static org.apache.logging.log4j.Logger
private it.unimi.dsi.fastutil.shorts.ShortList[]
private LevelChunkSection[]
private ChunkStatus
private Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet>
private Map<StructureFeature<?>,StructureStart<?>>
private UpgradeData
-
Constructor Summary
ConstructorDescriptionProtoChunk(ChunkPos p_156481_, UpgradeData p_156482_, LevelChunkSection[] p_156483_, ProtoTickList<Block> p_156484_, ProtoTickList<Fluid> p_156485_, LevelHeightAccessor p_156486_)
ProtoChunk(ChunkPos p_156477_, UpgradeData p_156478_, LevelHeightAccessor p_156479_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntity(CompoundTag p_63243_)
void
void
addLight(short p_63245_, int p_63246_)
void
void
addPackedPostProcess(short p_63225_, int p_63226_)
void
addReferenceForFeature(StructureFeature<?> p_63204_, long p_63205_)
Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet>
Map<StructureFeature<?>,StructureStart<?>>
getBlockEntity(BlockPos p_63257_)
getBlockEntityNbt(BlockPos p_63272_)
getBlockEntityNbtForSaving(BlockPos p_63275_)
getBlockState(BlockPos p_63264_)
getCarvingMask(GenerationStep.Carving p_63188_)
getFluidState(BlockPos p_63239_)
getHeighestPosition(Heightmap.Types p_156490_)
int
int
getHeight(Heightmap.Types p_63195_, int p_63196_, int p_63197_)
long
int
getOrCreateCarvingMask(GenerationStep.Carving p_63235_)
getOrCreateHeightmapUnprimed(Heightmap.Types p_63193_)
it.unimi.dsi.fastutil.shorts.ShortList[]
getPos()
it.unimi.dsi.fastutil.shorts.ShortList[]
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForFeature(StructureFeature<?> p_63237_)
getStartForFeature(StructureFeature<?> p_63202_)
boolean
boolean
void
markPosForPostprocessing(BlockPos p_63266_)
static short
packOffsetCoordinates(BlockPos p_63281_)
void
removeBlockEntity(BlockPos p_63262_)
void
setAllReferences(Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> p_63241_)
void
setAllStarts(Map<StructureFeature<?>,StructureStart<?>> p_63221_)
void
setBiomes(ChunkBiomeContainer p_63186_)
void
setBlockEntity(BlockEntity p_156488_)
void
setBlockEntityNbt(CompoundTag p_63223_)
setBlockState(BlockPos p_63217_, BlockState p_63218_, boolean p_63219_)
void
setCarvingMask(GenerationStep.Carving p_63190_, BitSet p_63191_)
void
setInhabitedTime(long p_63234_)
void
setLightCorrect(boolean p_63248_)
void
setLightEngine(LevelLightEngine p_63210_)
void
setStartForFeature(StructureFeature<?> p_63207_, StructureStart<?> p_63208_)
void
setStatus(ChunkStatus p_63187_)
void
setUnsaved(boolean p_63232_)
static BlockPos
unpackOffsetCoordinates(short p_63228_, int p_63229_, ChunkPos p_63230_)
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, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLine
Methods inherited from interface net.minecraft.world.level.chunk.ChunkAccess
getEventDispatcher, getHighestSection, getHighestSectionPosition, getOrCreateSection, getWorldForge, isYSpaceEmpty, setHeightmap
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.apache.logging.log4j.Logger LOGGER -
chunkPos
-
isDirty
private volatile boolean isDirty -
biomes
-
lightEngine
-
heightmaps
-
status
-
blockEntities
-
blockEntityNbts
-
sections
-
entities
-
lights
-
postProcessing
private final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessing -
structureStarts
-
structuresRefences
-
upgradeData
-
blockTicks
-
liquidTicks
-
levelHeightAccessor
-
inhabitedTime
private long inhabitedTime -
carvingMasks
-
isLightCorrect
private volatile boolean isLightCorrect
-
-
Constructor Details
-
ProtoChunk
-
ProtoChunk
public ProtoChunk(ChunkPos p_156481_, UpgradeData p_156482_, @Nullable LevelChunkSection[] p_156483_, ProtoTickList<Block> p_156484_, ProtoTickList<Fluid> p_156485_, LevelHeightAccessor p_156486_)
-
-
Method Details
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockGetter
-
getLights
- Specified by:
getLights
in interfaceChunkAccess
-
getPackedLights
public it.unimi.dsi.fastutil.shorts.ShortList[] getPackedLights() -
addLight
public void addLight(short p_63245_, int p_63246_) -
addLight
-
setBlockState
@Nullable public BlockState setBlockState(BlockPos p_63217_, BlockState p_63218_, boolean p_63219_)- Specified by:
setBlockState
in interfaceChunkAccess
-
setBlockEntity
- Specified by:
setBlockEntity
in interfaceChunkAccess
-
getBlockEntitiesPos
- Specified by:
getBlockEntitiesPos
in interfaceChunkAccess
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceBlockGetter
-
getBlockEntities
-
addEntity
-
addEntity
- Specified by:
addEntity
in interfaceChunkAccess
-
getEntities
-
setBiomes
-
getBiomes
- Specified by:
getBiomes
in interfaceChunkAccess
-
setUnsaved
public void setUnsaved(boolean p_63232_)- Specified by:
setUnsaved
in interfaceChunkAccess
-
isUnsaved
public boolean isUnsaved()- Specified by:
isUnsaved
in interfaceChunkAccess
-
getStatus
- Specified by:
getStatus
in interfaceChunkAccess
-
setStatus
-
getSections
- Specified by:
getSections
in interfaceChunkAccess
-
getHeightmaps
- Specified by:
getHeightmaps
in interfaceChunkAccess
-
getOrCreateHeightmapUnprimed
- Specified by:
getOrCreateHeightmapUnprimed
in interfaceChunkAccess
-
getHeight
- Specified by:
getHeight
in interfaceChunkAccess
-
getHeighestPosition
- Specified by:
getHeighestPosition
in interfaceChunkAccess
-
getPos
- Specified by:
getPos
in interfaceChunkAccess
-
getStartForFeature
- Specified by:
getStartForFeature
in interfaceFeatureAccess
-
setStartForFeature
- Specified by:
setStartForFeature
in interfaceFeatureAccess
-
getAllStarts
- Specified by:
getAllStarts
in interfaceChunkAccess
-
setAllStarts
- Specified by:
setAllStarts
in interfaceChunkAccess
-
getReferencesForFeature
- Specified by:
getReferencesForFeature
in interfaceFeatureAccess
-
addReferenceForFeature
- Specified by:
addReferenceForFeature
in interfaceFeatureAccess
-
getAllReferences
- Specified by:
getAllReferences
in interfaceFeatureAccess
-
setAllReferences
public void setAllReferences(Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> p_63241_)- Specified by:
setAllReferences
in interfaceFeatureAccess
-
packOffsetCoordinates
-
unpackOffsetCoordinates
-
markPosForPostprocessing
- Specified by:
markPosForPostprocessing
in interfaceChunkAccess
-
getPostProcessing
public it.unimi.dsi.fastutil.shorts.ShortList[] getPostProcessing()- Specified by:
getPostProcessing
in interfaceChunkAccess
-
addPackedPostProcess
public void addPackedPostProcess(short p_63225_, int p_63226_)- Specified by:
addPackedPostProcess
in interfaceChunkAccess
-
getBlockTicks
- Specified by:
getBlockTicks
in interfaceChunkAccess
-
getLiquidTicks
- Specified by:
getLiquidTicks
in interfaceChunkAccess
-
getUpgradeData
- Specified by:
getUpgradeData
in interfaceChunkAccess
-
setInhabitedTime
public void setInhabitedTime(long p_63234_)- Specified by:
setInhabitedTime
in interfaceChunkAccess
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTime
in interfaceChunkAccess
-
setBlockEntityNbt
- Specified by:
setBlockEntityNbt
in interfaceChunkAccess
-
getBlockEntityNbts
-
getBlockEntityNbt
- Specified by:
getBlockEntityNbt
in interfaceChunkAccess
-
getBlockEntityNbtForSaving
- Specified by:
getBlockEntityNbtForSaving
in interfaceChunkAccess
-
removeBlockEntity
- Specified by:
removeBlockEntity
in interfaceChunkAccess
-
getCarvingMask
-
getOrCreateCarvingMask
-
setCarvingMask
-
setLightEngine
-
isLightCorrect
public boolean isLightCorrect()- Specified by:
isLightCorrect
in interfaceChunkAccess
-
setLightCorrect
public void setLightCorrect(boolean p_63248_)- Specified by:
setLightCorrect
in interfaceChunkAccess
-
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeight
in interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceLevelHeightAccessor
-