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 ChunkAccess
ChunkAccess.PackedTicksNested classes/interfaces inherited from interface BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsFields inherited from class ChunkAccess
blendingData, blockEntities, chunkPos, heightmaps, levelHeightAccessor, NO_FILLED_SECTION, noiseChunk, pendingBlockEntities, postProcessing, sections, skyLightSources, upgradeData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddReferenceForStructure(Structure structure, long reference) booleanvoidfillBiomesFromNoise(BiomeResolver biomeResolver, Climate.Sampler sampler) voidfindBlocks(Predicate<BlockState> predicate, BiConsumer<BlockPos, BlockState> consumer) voidfindBlocks(Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> consumer) private Heightmap.TypesfixType(Heightmap.Types type) @Nullable BlendingData@Nullable BlockEntitygetBlockEntity(BlockPos pos) @Nullable CompoundTaggetBlockEntityNbt(BlockPos blockPos) @Nullable CompoundTaggetBlockEntityNbtForSaving(BlockPos blockPos, HolderLookup.Provider registryAccess) getBlockState(BlockPos pos) getFluidState(BlockPos pos) intgetHeight(Heightmap.Types type, int x, int z) getNoiseBiome(int quartX, int quartY, int quartZ) Gets the biome at the given quart positions.getPos()it.unimi.dsi.fastutil.longs.LongSetgetReferencesForStructure(Structure structure) getSection(int sectionIndex) @Nullable StructureStartgetStartForStructure(Structure structure) getTicksForSerialization(long currentTick) voidbooleanbooleanvoidmarkPosForPostprocessing(BlockPos blockPos) voidvoidvoidsetAllReferences(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> data) voidsetAllStarts(Map<Structure, StructureStart> starts) voidsetBlockEntity(BlockEntity blockEntity) voidsetBlockEntityNbt(CompoundTag entityTag) @Nullable BlockStatesetBlockState(BlockPos pos, BlockState state, int flags) voidsetHeightmap(Heightmap.Types key, long[] data) voidsetLightCorrect(boolean isLightCorrect) voidsetPersistedStatus(ChunkStatus status) voidsetStartForStructure(Structure structure, StructureStart structureStart) booleanMethods inherited from class ProtoChunk
addEntity, addPackedPostProcess, getBelowZeroRetrogen, getBlockEntities, getBlockEntityNbts, getEntities, getHeightAccessorForGeneration, packOffsetCoordinates, setBelowZeroRetrogen, setCarvingMask, setLightEngine, unpackBlockTicks, unpackFluidTicks, unpackOffsetCoordinatesMethods inherited from class ChunkAccess
carverBiome, findBlockLightSources, getBlockEntitiesPos, getData, getExistingDataOrNull, getHeight, getHeightmaps, getHighestFilledSectionIndex, getHighestGeneratedStatus, getHighestSectionPosition, getInhabitedTime, getLevel, getListenerRegistry, getMinY, getOrCreateNoiseChunk, getOrCreateOffsetList, getPostProcessing, getUpgradeData, hasAnyStructureReferences, hasAttachments, hasData, hasPrimedHeightmap, incrementInhabitedTime, isOldNoiseGeneration, isUpgrading, isYSpaceEmpty, problemPath, problemPath, readAttachmentsFromNBT, removeData, setBlockState, setData, setInhabitedTime, writeAttachmentsToNBTMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLineMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData, syncDataMethods inherited from interface IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
wrapped
-
allowWrites
private final boolean allowWrites
-
-
Constructor Details
-
ImposterProtoChunk
-
-
Method Details
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter- Overrides:
getBlockEntityin classProtoChunk
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter- Overrides:
getBlockStatein classProtoChunk
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter- Overrides:
getFluidStatein classProtoChunk
-
getSection
- Overrides:
getSectionin classChunkAccess
-
setBlockState
- Overrides:
setBlockStatein classProtoChunk
-
setBlockEntity
- Overrides:
setBlockEntityin classProtoChunk
-
addEntity
- Overrides:
addEntityin classProtoChunk
-
setPersistedStatus
- Overrides:
setPersistedStatusin classProtoChunk
-
getSections
- Overrides:
getSectionsin classChunkAccess
-
setHeightmap
- Overrides:
setHeightmapin classChunkAccess
-
fixType
-
getOrCreateHeightmapUnprimed
- Overrides:
getOrCreateHeightmapUnprimedin classChunkAccess
-
getHeight
- Overrides:
getHeightin classChunkAccess
-
getNoiseBiome
Description copied from interface:BiomeManager.NoiseBiomeSourceGets 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:
getNoiseBiomein interfaceBiomeManager.NoiseBiomeSource- Overrides:
getNoiseBiomein classProtoChunk
-
getPos
- Overrides:
getPosin classChunkAccess
-
getStartForStructure
- Specified by:
getStartForStructurein interfaceStructureAccess- Overrides:
getStartForStructurein classChunkAccess
-
setStartForStructure
- Specified by:
setStartForStructurein interfaceStructureAccess- Overrides:
setStartForStructurein classProtoChunk
-
getAllStarts
- Overrides:
getAllStartsin classChunkAccess
-
setAllStarts
- Overrides:
setAllStartsin classChunkAccess
-
getReferencesForStructure
- Specified by:
getReferencesForStructurein interfaceStructureAccess- Overrides:
getReferencesForStructurein classChunkAccess
-
addReferenceForStructure
- Specified by:
addReferenceForStructurein interfaceStructureAccess- Overrides:
addReferenceForStructurein classChunkAccess
-
getAllReferences
- Specified by:
getAllReferencesin interfaceStructureAccess- Overrides:
getAllReferencesin classChunkAccess
-
setAllReferences
- Specified by:
setAllReferencesin interfaceStructureAccess- Overrides:
setAllReferencesin classChunkAccess
-
markUnsaved
public void markUnsaved()- Overrides:
markUnsavedin classChunkAccess
-
canBeSerialized
public boolean canBeSerialized()- Overrides:
canBeSerializedin classChunkAccess
-
tryMarkSaved
public boolean tryMarkSaved()- Overrides:
tryMarkSavedin classChunkAccess
-
isUnsaved
public boolean isUnsaved()- Overrides:
isUnsavedin classChunkAccess
-
getPersistedStatus
- Overrides:
getPersistedStatusin classProtoChunk
-
removeBlockEntity
- Overrides:
removeBlockEntityin classProtoChunk
-
markPosForPostprocessing
- Overrides:
markPosForPostprocessingin classProtoChunk
-
setBlockEntityNbt
- Overrides:
setBlockEntityNbtin classChunkAccess
-
getBlockEntityNbt
- Overrides:
getBlockEntityNbtin classChunkAccess
-
getBlockEntityNbtForSaving
public @Nullable CompoundTag getBlockEntityNbtForSaving(BlockPos blockPos, HolderLookup.Provider registryAccess) - Overrides:
getBlockEntityNbtForSavingin classProtoChunk
-
findBlocks
- Overrides:
findBlocksin classChunkAccess
-
findBlocks
public void findBlocks(Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> consumer) - Overrides:
findBlocksin classChunkAccess
-
getBlockTicks
- Overrides:
getBlockTicksin classProtoChunk
-
getFluidTicks
- Overrides:
getFluidTicksin classProtoChunk
-
getTicksForSerialization
- Overrides:
getTicksForSerializationin classProtoChunk
-
getBlendingData
- Overrides:
getBlendingDatain classChunkAccess
-
getCarvingMask
- Overrides:
getCarvingMaskin classProtoChunk
-
getOrCreateCarvingMask
- Overrides:
getOrCreateCarvingMaskin classProtoChunk
-
getWrapped
-
isLightCorrect
public boolean isLightCorrect()- Overrides:
isLightCorrectin classChunkAccess
-
setLightCorrect
public void setLightCorrect(boolean isLightCorrect) - Overrides:
setLightCorrectin classChunkAccess
-
fillBiomesFromNoise
- Overrides:
fillBiomesFromNoisein classChunkAccess
-
initializeLightSources
public void initializeLightSources()- Overrides:
initializeLightSourcesin classChunkAccess
-
getSkyLightSources
- Specified by:
getSkyLightSourcesin interfaceLightChunk- Overrides:
getSkyLightSourcesin classChunkAccess
-
getAttachmentHolder
- Overrides:
getAttachmentHolderin classChunkAccess
-