Package net.minecraft.server.level
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 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 net.minecraft.server.level.GenerationChunkHolder
currentlyLoading, pos, UNLOADED_CHUNK, UNLOADED_CHUNK_FUTURE -
Constructor Summary
ConstructorsConstructorDescriptionChunkHolder(ChunkPos pPos, int pTicketLevel, LevelHeightAccessor pLevelHeightAccessor, LevelLightEngine pLightEngine, ChunkHolder.LevelChangeListener pOnLevelChange, ChunkHolder.PlayerProvider pPlayerProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSaveDependency(CompletableFuture<?> pDependency) voidaddSendDependency(CompletableFuture<?> pDependency) booleanblockChanged(BlockPos pPos) private voidbroadcast(List<ServerPlayer> pPlayers, Packet<?> pPacket) private voidbroadcastBlockEntity(List<ServerPlayer> pPlayers, Level pLevel, BlockPos pPos) private voidbroadcastBlockEntityIfNeeded(List<ServerPlayer> pPlayers, Level pLevel, BlockPos pPos, BlockState pState) voidbroadcastChanges(LevelChunk pChunk) private voiddemoteFullChunk(ChunkMap pChunkMap, FullChunkStatus pFullChunkStatus) intintbooleanbooleanvoidprivate voidscheduleFullChunkPromotion(ChunkMap pChunkMap, CompletableFuture<ChunkResult<LevelChunk>> pFuture, Executor pExecutor, FullChunkStatus pFullChunkStatus) booleansectionLightChanged(LightLayer pLightLayer, int pY) private voidsetQueueLevel(int pQueueLevel) voidsetTicketLevel(int pLevel) protected voidupdateFutures(ChunkMap pChunkMap, Executor pExecutor) booleanMethods inherited from class net.minecraft.server.level.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 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 pPos, int pTicketLevel, LevelHeightAccessor pLevelHeightAccessor, LevelLightEngine pLightEngine, ChunkHolder.LevelChangeListener pOnLevelChange, ChunkHolder.PlayerProvider pPlayerProvider)
-
-
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> pPlayers, Level pLevel, BlockPos pPos, BlockState pState) -
broadcastBlockEntity
-
broadcast
-
getTicketLevel
public int getTicketLevel()- Specified by:
getTicketLevelin classGenerationChunkHolder
-
getQueueLevel
public int getQueueLevel()- Specified by:
getQueueLevelin classGenerationChunkHolder
-
setQueueLevel
private void setQueueLevel(int pQueueLevel) -
setTicketLevel
public void setTicketLevel(int pLevel) -
scheduleFullChunkPromotion
private void scheduleFullChunkPromotion(ChunkMap pChunkMap, CompletableFuture<ChunkResult<LevelChunk>> pFuture, Executor pExecutor, FullChunkStatus pFullChunkStatus) -
demoteFullChunk
-
updateFutures
-
wasAccessibleSinceLastSave
public boolean wasAccessibleSinceLastSave() -
refreshAccessibility
public void refreshAccessibility()
-