类 ChunkAccess
java.lang.Object
net.minecraft.world.level.chunk.ChunkAccess
- 所有已实现的接口:
BiomeManager.NoiseBiomeSource
,BlockGetter
,LightChunk
,StructureAccess
,LevelHeightAccessor
,IAttachmentHolder
,IBlockGetterExtension
- 直接已知子类:
LevelChunk
,ProtoChunk
public abstract class ChunkAccess
extends Object
implements BiomeManager.NoiseBiomeSource, LightChunk, StructureAccess, IAttachmentHolder
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static final record
static final record
从接口继承的嵌套类/接口 net.minecraft.world.level.BlockGetter
BlockGetter.BlockStepVisitor
-
字段概要
字段修饰符和类型字段说明private final AttachmentHolder.AsField
protected BlendingData
protected final Map
<BlockPos, BlockEntity> private BiomeGenerationSettings
已过时。protected final ChunkPos
private static final it.unimi.dsi.fastutil.longs.LongSet
protected final Map
<Heightmap.Types, Heightmap> private long
private boolean
protected final LevelHeightAccessor
private static final org.slf4j.Logger
static final int
protected NoiseChunk
protected final Map
<BlockPos, CompoundTag> protected final it.unimi.dsi.fastutil.shorts.ShortList[]
protected final LevelChunkSection[]
protected ChunkSkyLightSources
private final Map
<Structure, StructureStart> private boolean
protected final UpgradeData
从接口继承的字段 net.minecraft.world.level.BlockGetter
MAX_BLOCK_ITERATIONS_ALONG_TRAVEL
-
构造器概要
构造器构造器说明ChunkAccess
(ChunkPos p_187621_, UpgradeData p_187622_, LevelHeightAccessor p_187623_, Registry<Biome> p_187624_, long p_187625_, LevelChunkSection[] p_187626_, BlendingData p_187627_) -
方法概要
修饰符和类型方法说明abstract void
void
addPackedPostProcess
(it.unimi.dsi.fastutil.shorts.ShortList p_364924_, int p_62093_) void
addReferenceForStructure
(Structure p_223007_, long p_223008_) boolean
carverBiome
(Supplier<BiomeGenerationSettings> p_223015_) 已过时。void
fillBiomesFromNoise
(BiomeResolver p_187638_, Climate.Sampler p_187639_) final void
findBlockLightSources
(BiConsumer<BlockPos, BlockState> p_285269_) void
findBlocks
(Predicate<BlockState> p_285343_, BiConsumer<BlockPos, BlockState> p_285030_) void
findBlocks
(Predicate<BlockState> p_285343_, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> p_285030_) protected AttachmentHolder.AsField
getBlockEntityNbt
(BlockPos p_62103_) abstract CompoundTag
getBlockEntityNbtForSaving
(BlockPos p_62104_, HolderLookup.Provider p_324415_) abstract TickContainerAccess
<Block> <T> T
getData
(AttachmentType<T> type) 返回 the data attachment of the given type。<T> T
getExistingDataOrNull
(AttachmentType<T> type) abstract TickContainerAccess
<Fluid> int
int
getHeight
(Heightmap.Types p_62080_, int p_62081_, int p_62082_) int
int
已过时, 待删除: 此 API 元素将从以后的版本中删除。long
getLevel()
getListenerRegistry
(int p_251437_) int
getMinY()
getNoiseBiome
(int p_204347_, int p_204348_, int p_204349_) getOrCreateHeightmapUnprimed
(Heightmap.Types p_62079_) getOrCreateNoiseChunk
(Function<ChunkAccess, NoiseChunk> p_223013_) static it.unimi.dsi.fastutil.shorts.ShortList
getOrCreateOffsetList
(it.unimi.dsi.fastutil.shorts.ShortList[] p_62096_, int p_62097_) abstract ChunkStatus
getPos()
it.unimi.dsi.fastutil.shorts.ShortList[]
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForStructure
(Structure p_223017_) getSection
(int p_187657_) getStartForStructure
(Structure p_223005_) abstract ChunkAccess.PackedTicks
getTicksForSerialization
(long p_361170_) boolean
boolean
Returnstrue
if there is any data attachments,false
otherwise.boolean
hasData
(AttachmentType<?> type) Returnstrue
if there is a data attachment of the give type,false
otherwise.boolean
hasPrimedHeightmap
(Heightmap.Types p_187659_) void
incrementInhabitedTime
(long p_187633_) void
boolean
boolean
boolean
boolean
boolean
isYSpaceEmpty
(int p_62075_, int p_62076_) void
markPosForPostprocessing
(BlockPos p_62102_) void
static ProblemReporter.PathElement
problemPath
(ChunkPos p_421990_) final void
readAttachmentsFromNBT
(HolderLookup.Provider provider, CompoundTag tag) FOR INTERNAL USE ONLYabstract void
removeBlockEntity
(BlockPos p_62101_) <T> T
removeData
(AttachmentType<T> type) Removes the data attachment of the given type.private static void
replaceMissingSections
(Registry<Biome> p_281389_, LevelChunkSection[] p_282796_) void
setAllReferences
(Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> p_187663_) void
setAllStarts
(Map<Structure, StructureStart> p_62090_) abstract void
setBlockEntity
(BlockEntity p_156114_) void
setBlockEntityNbt
(CompoundTag p_62091_) setBlockState
(BlockPos p_393915_, BlockState p_394484_) abstract BlockState
setBlockState
(BlockPos p_62087_, BlockState p_62088_, int p_394631_) <T> T
setData
(AttachmentType<T> type, T data) Sets the data attachment of the given type.void
setHeightmap
(Heightmap.Types p_62083_, long[] p_62084_) void
setInhabitedTime
(long p_62099_) void
setLightCorrect
(boolean p_62100_) void
setStartForStructure
(Structure p_223010_, StructureStart p_223011_) boolean
final CompoundTag
writeAttachmentsToNBT
(HolderLookup.Provider provider) FOR INTERNAL USE ONLY从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockState, getBlockStates, getFluidState, getLightEmission, isBlockInLine
从接口继承的方法 net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelData
从接口继承的方法 net.minecraft.world.level.LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
字段详细资料
-
NO_FILLED_SECTION
public static final int NO_FILLED_SECTION- 另请参阅:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
EMPTY_REFERENCE_SET
private static final it.unimi.dsi.fastutil.longs.LongSet EMPTY_REFERENCE_SET -
postProcessing
protected final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessing -
unsaved
private volatile boolean unsaved -
isLightCorrect
private volatile boolean isLightCorrect -
chunkPos
-
inhabitedTime
private long inhabitedTime -
carverBiomeSettings
已过时。 -
noiseChunk
-
upgradeData
-
blendingData
-
heightmaps
-
skyLightSources
-
structureStarts
-
structuresRefences
-
pendingBlockEntities
-
blockEntities
-
levelHeightAccessor
-
sections
-
attachmentHolder
-
-
构造器详细资料
-
ChunkAccess
public ChunkAccess(ChunkPos p_187621_, UpgradeData p_187622_, LevelHeightAccessor p_187623_, Registry<Biome> p_187624_, long p_187625_, @Nullable LevelChunkSection[] p_187626_, @Nullable BlendingData p_187627_)
-
-
方法详细资料
-
replaceMissingSections
private static void replaceMissingSections(Registry<Biome> p_281389_, LevelChunkSection[] p_282796_) -
getListenerRegistry
-
setBlockState
-
setBlockState
@Nullable public abstract BlockState setBlockState(BlockPos p_62087_, BlockState p_62088_, int p_394631_) -
setBlockEntity
-
addEntity
-
getHighestFilledSectionIndex
public int getHighestFilledSectionIndex() -
getHighestSectionPosition
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
getBlockEntitiesPos
-
getSections
-
getSection
-
getHeightmaps
-
setHeightmap
-
getOrCreateHeightmapUnprimed
-
hasPrimedHeightmap
-
getHeight
-
getPos
-
getStartForStructure
- 指定者:
getStartForStructure
在接口中StructureAccess
-
setStartForStructure
- 指定者:
setStartForStructure
在接口中StructureAccess
-
getAllStarts
-
setAllStarts
-
getReferencesForStructure
- 指定者:
getReferencesForStructure
在接口中StructureAccess
-
addReferenceForStructure
- 指定者:
addReferenceForStructure
在接口中StructureAccess
-
getAllReferences
- 指定者:
getAllReferences
在接口中StructureAccess
-
setAllReferences
- 指定者:
setAllReferences
在接口中StructureAccess
-
isYSpaceEmpty
public boolean isYSpaceEmpty(int p_62075_, int p_62076_) -
markUnsaved
public void markUnsaved() -
tryMarkSaved
public boolean tryMarkSaved() -
isUnsaved
public boolean isUnsaved() -
getPersistedStatus
-
getHighestGeneratedStatus
-
removeBlockEntity
-
markPosForPostprocessing
-
getPostProcessing
public it.unimi.dsi.fastutil.shorts.ShortList[] getPostProcessing() -
addPackedPostProcess
public void addPackedPostProcess(it.unimi.dsi.fastutil.shorts.ShortList p_364924_, int p_62093_) -
setBlockEntityNbt
-
getBlockEntityNbt
-
getBlockEntityNbtForSaving
@Nullable public abstract CompoundTag getBlockEntityNbtForSaving(BlockPos p_62104_, HolderLookup.Provider p_324415_) -
findBlockLightSources
- 指定者:
findBlockLightSources
在接口中LightChunk
-
findBlocks
-
findBlocks
public void findBlocks(Predicate<BlockState> p_285343_, BiPredicate<BlockState, BlockPos> fineFilter, BiConsumer<BlockPos, BlockState> p_285030_) -
getBlockTicks
-
getFluidTicks
-
canBeSerialized
public boolean canBeSerialized() -
getTicksForSerialization
-
getUpgradeData
-
isOldNoiseGeneration
public boolean isOldNoiseGeneration() -
getBlendingData
-
getInhabitedTime
public long getInhabitedTime() -
incrementInhabitedTime
public void incrementInhabitedTime(long p_187633_) -
setInhabitedTime
public void setInhabitedTime(long p_62099_) -
getOrCreateOffsetList
public static it.unimi.dsi.fastutil.shorts.ShortList getOrCreateOffsetList(it.unimi.dsi.fastutil.shorts.ShortList[] p_62096_, int p_62097_) -
isLightCorrect
public boolean isLightCorrect() -
setLightCorrect
public void setLightCorrect(boolean p_62100_) -
getMinY
public int getMinY()- 指定者:
getMinY
在接口中LevelHeightAccessor
-
getHeight
public int getHeight()- 指定者:
getHeight
在接口中LevelHeightAccessor
-
getOrCreateNoiseChunk
-
carverBiome
已过时。 -
getNoiseBiome
- 指定者:
getNoiseBiome
在接口中BiomeManager.NoiseBiomeSource
-
fillBiomesFromNoise
-
hasAnyStructureReferences
public boolean hasAnyStructureReferences() -
getBelowZeroRetrogen
-
isUpgrading
public boolean isUpgrading() -
getHeightAccessorForGeneration
-
initializeLightSources
public void initializeLightSources() -
getSkyLightSources
- 指定者:
getSkyLightSources
在接口中LightChunk
-
hasAttachments
public boolean hasAttachments()从接口复制的说明:IAttachmentHolder
Returnstrue
if there is any data attachments,false
otherwise.- 指定者:
hasAttachments
在接口中IAttachmentHolder
-
hasData
从接口复制的说明:IAttachmentHolder
Returnstrue
if there is a data attachment of the give type,false
otherwise.- 指定者:
hasData
在接口中IAttachmentHolder
-
getData
从接口复制的说明:IAttachmentHolder
返回 the data attachment of the given type。If there is no data attachment of the given type, the default value is stored in this holder and returned.
- 指定者:
getData
在接口中IAttachmentHolder
- 返回:
- the data attachment of the given type
-
getExistingDataOrNull
- 指定者:
getExistingDataOrNull
在接口中IAttachmentHolder
- 返回:
- an existing data attachment value of the given type, or null if there is no data attachment of the given type
-
setData
从接口复制的说明:IAttachmentHolder
Sets the data attachment of the given type.- 指定者:
setData
在接口中IAttachmentHolder
- 返回:
- the previous value for that attachment type, if any, or
null
if there was none
-
removeData
从接口复制的说明:IAttachmentHolder
Removes the data attachment of the given type.- 指定者:
removeData
在接口中IAttachmentHolder
- 返回:
- the previous value for that attachment type, if any, or
null
if there was none
-
writeAttachmentsToNBT
FOR INTERNAL USE ONLYOnly public for use in
SerializableChunkData
. -
readAttachmentsFromNBT
FOR INTERNAL USE ONLYOnly public for use in
SerializableChunkData
. -
getAttachmentHolder
-
getLevel
-
problemPath
-
problemPath
-