Package net.minecraft.world.level.chunk
Class ImposterProtoChunk
java.lang.Object
net.minecraft.world.level.chunk.ChunkAccess
net.minecraft.world.level.chunk.ProtoChunk
net.minecraft.world.level.chunk.ImposterProtoChunk
- All Implemented Interfaces:
BiomeManager.NoiseBiomeSource
,BlockGetter
,LightChunk
,StructureAccess
,LevelHeightAccessor
,IAttachmentHolder
,IBlockGetterExtension
During world generation, adjacent chunks may be fully generated (and thus be level chunks), but are often needed in proto chunk form. This wraps a completely generated chunk as a proto chunk.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.chunk.ChunkAccess
ChunkAccess.TicksToSave
-
Field Summary
FieldsFields inherited from class net.minecraft.world.level.chunk.ChunkAccess
blendingData, blockEntities, chunkPos, heightmaps, levelHeightAccessor, NO_FILLED_SECTION, noiseChunk, pendingBlockEntities, postProcessing, sections, skyLightSources, unsaved, upgradeData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addReferenceForStructure
(Structure pStructure, long pReference) void
fillBiomesFromNoise
(BiomeResolver pResolver, Climate.Sampler pSampler) void
findBlocks
(BiPredicate<BlockState, BlockPos> p_285465_, BiConsumer<BlockPos, BlockState> p_285030_) void
findBlocks
(Predicate<BlockState> pPredicate, BiConsumer<BlockPos, BlockState> pOutput) void
findBlocks
(Predicate<BlockState> p_285465_, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> p_285030_) private Heightmap.Types
fixType
(Heightmap.Types pType) getBlockEntity
(BlockPos pPos) getBlockEntityNbt
(BlockPos pPos) getBlockEntityNbtForSaving
(BlockPos pPos, HolderLookup.Provider pRegistries) getBlockState
(BlockPos pPos) getFluidState
(BlockPos pPos) int
getHeight
(Heightmap.Types pType, int pX, int pZ) int
getNoiseBiome
(int pX, int pY, int pZ) Gets the biome at the given quart positions.getPos()
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForStructure
(Structure p_223408_) getSection
(int pIndex) getStartForStructure
(Structure pStructure) void
boolean
boolean
void
void
removeBlockEntity
(BlockPos pPos) void
setAllReferences
(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> pStructureReferencesMap) void
setAllStarts
(Map<Structure, StructureStart> pStructureStarts) void
setBlendingData
(BlendingData pBlendingData) void
setBlockEntity
(BlockEntity pBlockEntity) void
setBlockEntityNbt
(CompoundTag pTag) setBlockState
(BlockPos pPos, BlockState pState, boolean pIsMoving) void
setHeightmap
(Heightmap.Types pType, long[] pData) void
setLightCorrect
(boolean pLightCorrect) void
setPersistedStatus
(ChunkStatus pStatus) void
setStartForStructure
(Structure pStructure, StructureStart pStructureStart) void
setUnsaved
(boolean pUnsaved) Methods inherited from class net.minecraft.world.level.chunk.ProtoChunk
addEntity, addPackedPostProcess, getBelowZeroRetrogen, getBlockEntities, getBlockEntityNbts, getEntities, getHeightAccessorForGeneration, packOffsetCoordinates, setBelowZeroRetrogen, setCarvingMask, setLightEngine, unpackBlockTicks, unpackFluidTicks, unpackOffsetCoordinates
Methods inherited from class net.minecraft.world.level.chunk.ChunkAccess
carverBiome, findBlockLightSources, getBlockEntitiesPos, getData, getExistingDataOrNull, getHeight, getHeightmaps, getHighestFilledSectionIndex, getHighestGeneratedStatus, getHighestSectionPosition, getInhabitedTime, getLevel, getListenerRegistry, getMinBuildHeight, getOrCreateNoiseChunk, getOrCreateOffsetList, getPostProcessing, getUpgradeData, hasAnyStructureReferences, hasAttachments, hasData, hasPrimedHeightmap, incrementInhabitedTime, isOldNoiseGeneration, isSectionEmpty, isUpgrading, isYSpaceEmpty, readAttachmentsFromNBT, removeData, setData, setInhabitedTime, writeAttachmentsToNBT
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, isBlockInLine
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelData
Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
wrapped
-
allowWrites
private final boolean allowWrites
-
-
Constructor Details
-
ImposterProtoChunk
-
-
Method Details
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceBlockGetter
- Overrides:
getBlockEntity
in classProtoChunk
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockGetter
- Overrides:
getBlockState
in classProtoChunk
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockGetter
- Overrides:
getFluidState
in classProtoChunk
-
getMaxLightLevel
public int getMaxLightLevel() -
getSection
- Overrides:
getSection
in classChunkAccess
-
setBlockState
- Overrides:
setBlockState
in classProtoChunk
-
setBlockEntity
- Overrides:
setBlockEntity
in classProtoChunk
-
addEntity
- Overrides:
addEntity
in classProtoChunk
-
setPersistedStatus
- Overrides:
setPersistedStatus
in classProtoChunk
-
getSections
- Overrides:
getSections
in classChunkAccess
-
setHeightmap
- Overrides:
setHeightmap
in classChunkAccess
-
fixType
-
getOrCreateHeightmapUnprimed
- Overrides:
getOrCreateHeightmapUnprimed
in classChunkAccess
-
getHeight
- Overrides:
getHeight
in classChunkAccess
-
getNoiseBiome
Gets the biome at the given quart positions. Note that the coordinates passed into this method are 1/4 the scale of block coordinates.- Specified by:
getNoiseBiome
in interfaceBiomeManager.NoiseBiomeSource
- Overrides:
getNoiseBiome
in classProtoChunk
-
getPos
- Overrides:
getPos
in classChunkAccess
-
getStartForStructure
- Specified by:
getStartForStructure
in interfaceStructureAccess
- Overrides:
getStartForStructure
in classChunkAccess
-
setStartForStructure
- Specified by:
setStartForStructure
in interfaceStructureAccess
- Overrides:
setStartForStructure
in classProtoChunk
-
getAllStarts
- Overrides:
getAllStarts
in classChunkAccess
-
setAllStarts
- Overrides:
setAllStarts
in classChunkAccess
-
getReferencesForStructure
- Specified by:
getReferencesForStructure
in interfaceStructureAccess
- Overrides:
getReferencesForStructure
in classChunkAccess
-
addReferenceForStructure
- Specified by:
addReferenceForStructure
in interfaceStructureAccess
- Overrides:
addReferenceForStructure
in classChunkAccess
-
getAllReferences
- Specified by:
getAllReferences
in interfaceStructureAccess
- Overrides:
getAllReferences
in classChunkAccess
-
setAllReferences
public void setAllReferences(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> pStructureReferencesMap) - Specified by:
setAllReferences
in interfaceStructureAccess
- Overrides:
setAllReferences
in classChunkAccess
-
setUnsaved
public void setUnsaved(boolean pUnsaved) - Overrides:
setUnsaved
in classChunkAccess
-
isUnsaved
public boolean isUnsaved()- Overrides:
isUnsaved
in classChunkAccess
-
getPersistedStatus
- Overrides:
getPersistedStatus
in classProtoChunk
-
removeBlockEntity
- Overrides:
removeBlockEntity
in classProtoChunk
-
markPosForPostprocessing
- Overrides:
markPosForPostprocessing
in classProtoChunk
-
setBlockEntityNbt
- Overrides:
setBlockEntityNbt
in classChunkAccess
-
getBlockEntityNbt
- Overrides:
getBlockEntityNbt
in classChunkAccess
-
getBlockEntityNbtForSaving
@Nullable public CompoundTag getBlockEntityNbtForSaving(BlockPos pPos, HolderLookup.Provider pRegistries) - Overrides:
getBlockEntityNbtForSaving
in classProtoChunk
-
findBlocks
- Overrides:
findBlocks
in classChunkAccess
-
findBlocks
public void findBlocks(BiPredicate<BlockState, BlockPos> p_285465_, BiConsumer<BlockPos, BlockState> p_285030_) - Overrides:
findBlocks
in classChunkAccess
-
findBlocks
public void findBlocks(Predicate<BlockState> p_285465_, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> p_285030_) - Overrides:
findBlocks
in classChunkAccess
-
getBlockTicks
- Overrides:
getBlockTicks
in classProtoChunk
-
getFluidTicks
- Overrides:
getFluidTicks
in classProtoChunk
-
getTicksForSerialization
- Overrides:
getTicksForSerialization
in classProtoChunk
-
getBlendingData
- Overrides:
getBlendingData
in classChunkAccess
-
setBlendingData
- Overrides:
setBlendingData
in classChunkAccess
-
getCarvingMask
- Overrides:
getCarvingMask
in classProtoChunk
-
getOrCreateCarvingMask
- Overrides:
getOrCreateCarvingMask
in classProtoChunk
-
getWrapped
-
isLightCorrect
public boolean isLightCorrect()- Overrides:
isLightCorrect
in classChunkAccess
-
setLightCorrect
public void setLightCorrect(boolean pLightCorrect) - Overrides:
setLightCorrect
in classChunkAccess
-
fillBiomesFromNoise
- Overrides:
fillBiomesFromNoise
in classChunkAccess
-
initializeLightSources
public void initializeLightSources()- Overrides:
initializeLightSources
in classChunkAccess
-
getSkyLightSources
- Specified by:
getSkyLightSources
in interfaceLightChunk
- Overrides:
getSkyLightSources
in classChunkAccess
-
getAttachmentHolder
- Overrides:
getAttachmentHolder
in classChunkAccess
-