Class ProtoChunk
java.lang.Object
net.minecraft.world.level.chunk.ChunkAccess
net.minecraft.world.level.chunk.ProtoChunk
- All Implemented Interfaces:
BiomeManager.NoiseBiomeSource, BlockGetter, LightChunk, StructureAccess, LevelHeightAccessor, IAttachmentHolder, IBlockGetterExtension
- Direct Known Subclasses:
ImposterProtoChunk
-
Nested Class Summary
Nested classes/interfaces inherited from class ChunkAccess
ChunkAccess.PackedTicksNested classes/interfaces inherited from interface BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable BelowZeroRetrogenprivate final ProtoChunkTicks<Block> private @Nullable CarvingMaskprivate final List<CompoundTag> private final ProtoChunkTicks<Fluid> private @Nullable LevelLightEngineprivate static final org.slf4j.Loggerprivate ChunkStatusFields inherited from class ChunkAccess
blendingData, blockEntities, chunkPos, heightmaps, levelHeightAccessor, NO_FILLED_SECTION, noiseChunk, pendingBlockEntities, postProcessing, sections, skyLightSources, upgradeData -
Constructor Summary
ConstructorsConstructorDescriptionProtoChunk(ChunkPos chunkPos, UpgradeData upgradeData, LevelChunkSection @Nullable [] sections, ProtoChunkTicks<Block> blockTicks, ProtoChunkTicks<Fluid> fluidTicks, LevelHeightAccessor levelHeightAccessor, PalettedContainerFactory containerFactory, @Nullable BlendingData blendingData) ProtoChunk(ChunkPos chunkPos, UpgradeData upgradeData, LevelHeightAccessor levelHeightAccessor, PalettedContainerFactory containerFactory, @Nullable BlendingData blendingData) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntity(CompoundTag tag) voidvoidaddPackedPostProcess(it.unimi.dsi.fastutil.shorts.ShortList packedOffsets, int sectionIndex) @Nullable BelowZeroRetrogen@Nullable BlockEntitygetBlockEntity(BlockPos pos) @Nullable CompoundTaggetBlockEntityNbtForSaving(BlockPos blockPos, HolderLookup.Provider registryAccess) getBlockState(BlockPos pos) @Nullable CarvingMaskgetFluidState(BlockPos pos) getNoiseBiome(int quartX, int quartY, int quartZ) Gets the biome at the given quart positions.getTicksForSerialization(long currentTick) voidmarkPosForPostprocessing(BlockPos blockPos) static shortpackOffsetCoordinates(BlockPos blockPos) voidvoidsetBelowZeroRetrogen(@Nullable BelowZeroRetrogen belowZeroRetrogen) voidsetBlockEntity(BlockEntity blockEntity) @Nullable BlockStatesetBlockState(BlockPos pos, BlockState state, int flags) voidsetCarvingMask(CarvingMask data) voidsetLightEngine(LevelLightEngine lightEngine) voidsetPersistedStatus(ChunkStatus status) voidsetStartForStructure(Structure structure, StructureStart structureStart) static BlockPosunpackOffsetCoordinates(short packedCoord, int sectionY, ChunkPos chunkPos) private static <T> LevelChunkTicks<T> unpackTicks(ProtoChunkTicks<T> ticks) Methods inherited from class ChunkAccess
addReferenceForStructure, canBeSerialized, carverBiome, fillBiomesFromNoise, findBlockLightSources, findBlocks, findBlocks, getAllReferences, getAllStarts, getAttachmentHolder, getBlendingData, getBlockEntitiesPos, getBlockEntityNbt, getData, getExistingDataOrNull, getHeight, getHeight, getHeightmaps, getHighestFilledSectionIndex, getHighestGeneratedStatus, getHighestSectionPosition, getInhabitedTime, getLevel, getListenerRegistry, getMinY, getOrCreateHeightmapUnprimed, getOrCreateNoiseChunk, getOrCreateOffsetList, getPos, getPostProcessing, getReferencesForStructure, getSection, getSections, getSkyLightSources, getStartForStructure, getUpgradeData, hasAnyStructureReferences, hasAttachments, hasData, hasPrimedHeightmap, incrementInhabitedTime, initializeLightSources, isLightCorrect, isOldNoiseGeneration, isUnsaved, isUpgrading, isYSpaceEmpty, markUnsaved, problemPath, problemPath, readAttachmentsFromNBT, removeData, setAllReferences, setAllStarts, setBlockEntityNbt, setBlockState, setData, setHeightmap, setInhabitedTime, setLightCorrect, tryMarkSaved, 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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
lightEngine
-
status
-
entities
-
carvingMask
-
belowZeroRetrogen
-
blockTicks
-
fluidTicks
-
-
Constructor Details
-
ProtoChunk
public ProtoChunk(ChunkPos chunkPos, UpgradeData upgradeData, LevelHeightAccessor levelHeightAccessor, PalettedContainerFactory containerFactory, @Nullable BlendingData blendingData) -
ProtoChunk
public ProtoChunk(ChunkPos chunkPos, UpgradeData upgradeData, LevelChunkSection @Nullable [] sections, ProtoChunkTicks<Block> blockTicks, ProtoChunkTicks<Fluid> fluidTicks, LevelHeightAccessor levelHeightAccessor, PalettedContainerFactory containerFactory, @Nullable BlendingData blendingData)
-
-
Method Details
-
getBlockTicks
- Specified by:
getBlockTicksin classChunkAccess
-
getFluidTicks
- Specified by:
getFluidTicksin classChunkAccess
-
getTicksForSerialization
- Specified by:
getTicksForSerializationin classChunkAccess
-
getBlockState
-
getFluidState
-
setBlockState
- Specified by:
setBlockStatein classChunkAccess
-
setBlockEntity
- Specified by:
setBlockEntityin classChunkAccess
-
getBlockEntity
-
getBlockEntities
-
addEntity
-
addEntity
- Specified by:
addEntityin classChunkAccess
-
setStartForStructure
- Specified by:
setStartForStructurein interfaceStructureAccess- Overrides:
setStartForStructurein classChunkAccess
-
getEntities
-
getPersistedStatus
- Specified by:
getPersistedStatusin classChunkAccess
-
setPersistedStatus
-
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 classChunkAccess
-
packOffsetCoordinates
-
unpackOffsetCoordinates
-
markPosForPostprocessing
- Overrides:
markPosForPostprocessingin classChunkAccess
-
addPackedPostProcess
public void addPackedPostProcess(it.unimi.dsi.fastutil.shorts.ShortList packedOffsets, int sectionIndex) - Overrides:
addPackedPostProcessin classChunkAccess
-
getBlockEntityNbts
-
getBlockEntityNbtForSaving
public @Nullable CompoundTag getBlockEntityNbtForSaving(BlockPos blockPos, HolderLookup.Provider registryAccess) - Specified by:
getBlockEntityNbtForSavingin classChunkAccess
-
removeBlockEntity
- Specified by:
removeBlockEntityin classChunkAccess
-
getCarvingMask
-
getOrCreateCarvingMask
-
setCarvingMask
-
setLightEngine
-
setBelowZeroRetrogen
-
getBelowZeroRetrogen
- Overrides:
getBelowZeroRetrogenin classChunkAccess
-
unpackTicks
-
unpackBlockTicks
-
unpackFluidTicks
-
getHeightAccessorForGeneration
- Overrides:
getHeightAccessorForGenerationin classChunkAccess
-