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 structure, long reference) void
fillBiomesFromNoise
(BiomeResolver resolver, Climate.Sampler sampler) void
findBlocks
(BiPredicate<BlockState, BlockPos> p_285465_, BiConsumer<BlockPos, BlockState> p_285030_) void
findBlocks
(Predicate<BlockState> predicate, BiConsumer<BlockPos, BlockState> output) void
findBlocks
(Predicate<BlockState> p_285465_, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> p_285030_) private Heightmap.Types
fixType
(Heightmap.Types type) getBlockEntity
(BlockPos pos) getBlockEntityNbtForSaving
(BlockPos pos, HolderLookup.Provider registries) getBlockState
(BlockPos pos) getFluidState
(BlockPos pos) int
getHeight
(Heightmap.Types type, int x, int z) int
getNoiseBiome
(int x, int y, int z) Gets the biome at the given quart positions.getPos()
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForStructure
(Structure structure) getSection
(int index) getStartForStructure
(Structure structure) void
boolean
boolean
void
void
void
setAllReferences
(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> structureReferencesMap) void
setAllStarts
(Map<Structure, StructureStart> structureStarts) void
setBlendingData
(BlendingData blendingData) void
setBlockEntity
(BlockEntity blockEntity) void
setBlockState
(BlockPos pos, BlockState state, boolean isMoving) void
setHeightmap
(Heightmap.Types type, long[] data) void
setLightCorrect
(boolean lightCorrect) void
setPersistedStatus
(ChunkStatus status) void
setStartForStructure
(Structure structure, StructureStart structureStart) void
setUnsaved
(boolean unsaved) 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> structureReferencesMap) - Specified by:
setAllReferences
in interfaceStructureAccess
- Overrides:
setAllReferences
in classChunkAccess
-
setUnsaved
public void setUnsaved(boolean unsaved) - 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 pos, HolderLookup.Provider registries) - 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 lightCorrect) - 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
-