Class ChunkHolder
java.lang.Object
net.minecraft.server.level.GenerationChunkHolder
net.minecraft.server.level.ChunkHolder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSetprivate final @Nullable it.unimi.dsi.fastutil.shorts.ShortSet[]private CompletableFuture<ChunkResult<LevelChunk>> A future that returns the chunk if it is an entity ticking chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADEDprivate CompletableFuture<ChunkResult<LevelChunk>> A future that returns the chunk if it is a border chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADEDprivate booleanprivate final LevelHeightAccessorprivate final LevelLightEngineprivate intprivate final ChunkHolder.LevelChangeListenerprivate CompletableFuture<?> private final ChunkHolder.PlayerProviderprivate intprivate CompletableFuture<?> private CompletableFuture<?> private final BitSetprivate intprivate CompletableFuture<ChunkResult<LevelChunk>> A future that returns the chunk if it is a ticking chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADEDstatic final ChunkResult<LevelChunk> private static final CompletableFuture<ChunkResult<LevelChunk>> private booleanFields inherited from class GenerationChunkHolder
currentlyLoading, pos, UNLOADED_CHUNK, UNLOADED_CHUNK_FUTURE -
Constructor Summary
ConstructorsConstructorDescriptionChunkHolder(ChunkPos pos, int ticketLevel, LevelHeightAccessor levelHeightAccessor, LevelLightEngine lightEngine, ChunkHolder.LevelChangeListener onLevelChange, ChunkHolder.PlayerProvider playerProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSaveDependency(CompletableFuture<?> sync) voidaddSendDependency(CompletableFuture<?> sync) booleanblockChanged(BlockPos pos) private voidbroadcast(List<ServerPlayer> players, Packet<?> packet) private voidbroadcastBlockEntity(List<ServerPlayer> players, Level level, BlockPos blockPos) private voidbroadcastBlockEntityIfNeeded(List<ServerPlayer> players, Level level, BlockPos pos, BlockState state) voidbroadcastChanges(LevelChunk chunk) private voiddemoteFullChunk(ChunkMap scheduler, FullChunkStatus status) @Nullable LevelChunkintint@Nullable LevelChunkbooleanbooleanvoidprivate voidscheduleFullChunkPromotion(ChunkMap scheduler, CompletableFuture<ChunkResult<LevelChunk>> task, Executor mainThreadExecutor, FullChunkStatus status) booleansectionLightChanged(LightLayer layer, int chunkY) private voidsetQueueLevel(int queueLevel) voidsetTicketLevel(int ticketLevel) protected voidupdateFutures(ChunkMap scheduler, Executor mainThreadExecutor) booleanMethods inherited from class GenerationChunkHolder
applyStep, decreaseGenerationRefCount, getAllFutures, getChunkIfPresent, getChunkIfPresentUnchecked, getFullStatus, getLatestChunk, getLatestStatus, getPersistedStatus, getPos, increaseGenerationRefCount, removeTask, replaceProtoChunk, scheduleChunkGenerationTask, updateHighestAllowedStatus
-
Field Details
-
UNLOADED_LEVEL_CHUNK
-
UNLOADED_LEVEL_CHUNK_FUTURE
-
levelHeightAccessor
-
fullChunkFuture
A future that returns the chunk if it is a border chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED -
tickingChunkFuture
A future that returns the chunk if it is a ticking chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED -
entityTickingChunkFuture
A future that returns the chunk if it is an entity ticking chunk,otherwise.invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED -
oldTicketLevel
private int oldTicketLevel -
ticketLevel
private int ticketLevel -
queueLevel
private int queueLevel -
hasChangedSections
private boolean hasChangedSections -
changedBlocksPerSection
private final @Nullable it.unimi.dsi.fastutil.shorts.ShortSet[] changedBlocksPerSection -
blockChangedLightSectionFilter
-
skyChangedLightSectionFilter
-
lightEngine
-
onLevelChange
-
playerProvider
-
wasAccessibleSinceLastSave
private boolean wasAccessibleSinceLastSave -
pendingFullStateConfirmation
-
sendSync
-
saveSync
-
-
Constructor Details
-
ChunkHolder
public ChunkHolder(ChunkPos pos, int ticketLevel, LevelHeightAccessor levelHeightAccessor, LevelLightEngine lightEngine, ChunkHolder.LevelChangeListener onLevelChange, ChunkHolder.PlayerProvider playerProvider)
-
-
Method Details
-
getTickingChunkFuture
-
getEntityTickingChunkFuture
-
getFullChunkFuture
-
getTickingChunk
-
getChunkToSend
-
getSendSyncFuture
-
addSendDependency
-
getSaveSyncFuture
-
isReadyForSaving
public boolean isReadyForSaving() -
addSaveDependency
- Specified by:
addSaveDependencyin classGenerationChunkHolder
-
blockChanged
-
sectionLightChanged
-
hasChangesToBroadcast
public boolean hasChangesToBroadcast() -
broadcastChanges
-
broadcastBlockEntityIfNeeded
private void broadcastBlockEntityIfNeeded(List<ServerPlayer> players, Level level, BlockPos pos, BlockState state) -
broadcastBlockEntity
-
broadcast
-
getTicketLevel
public int getTicketLevel()- Specified by:
getTicketLevelin classGenerationChunkHolder
-
getQueueLevel
public int getQueueLevel()- Specified by:
getQueueLevelin classGenerationChunkHolder
-
setQueueLevel
private void setQueueLevel(int queueLevel) -
setTicketLevel
public void setTicketLevel(int ticketLevel) -
scheduleFullChunkPromotion
private void scheduleFullChunkPromotion(ChunkMap scheduler, CompletableFuture<ChunkResult<LevelChunk>> task, Executor mainThreadExecutor, FullChunkStatus status) -
demoteFullChunk
-
updateFutures
-
wasAccessibleSinceLastSave
public boolean wasAccessibleSinceLastSave() -
refreshAccessibility
public void refreshAccessibility()
-