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 interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSet
private final it.unimi.dsi.fastutil.shorts.ShortSet[]
private CompletableFuture
<ChunkResult<LevelChunk>> A future that returns the chunk if it is an entity ticking chunk,invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED
private CompletableFuture
<ChunkResult<LevelChunk>> A future that returns the chunk if it is a border chunk,invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED
private boolean
private final LevelHeightAccessor
private final LevelLightEngine
private int
private final ChunkHolder.LevelChangeListener
private CompletableFuture
<?> private final ChunkHolder.PlayerProvider
private int
private CompletableFuture
<?> private CompletableFuture
<?> private final BitSet
private int
private CompletableFuture
<ChunkResult<LevelChunk>> A future that returns the chunk if it is a ticking chunk,invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED
static final ChunkResult
<LevelChunk> private static final CompletableFuture
<ChunkResult<LevelChunk>> private boolean
Fields 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 TypeMethodDescriptionprivate void
addSaveDependency
(CompletableFuture<?> pDependency) void
addSendDependency
(CompletableFuture<?> pDependency) void
blockChanged
(BlockPos pPos) private void
broadcast
(List<ServerPlayer> pPlayers, Packet<?> pPacket) private void
broadcastBlockEntity
(List<ServerPlayer> pPlayers, Level pLevel, BlockPos pPos) private void
broadcastBlockEntityIfNeeded
(List<ServerPlayer> pPlayers, Level pLevel, BlockPos pPos, BlockState pState) void
broadcastChanges
(LevelChunk pChunk) private void
demoteFullChunk
(ChunkMap pChunkMap, FullChunkStatus pFullChunkStatus) int
int
boolean
void
private void
scheduleFullChunkPromotion
(ChunkMap pChunkMap, CompletableFuture<ChunkResult<LevelChunk>> pFuture, Executor pExecutor, FullChunkStatus pFullChunkStatus) void
sectionLightChanged
(LightLayer pType, int pSectionY) private void
setQueueLevel
(int p_140087_) void
setTicketLevel
(int pLevel) protected void
updateFutures
(ChunkMap pChunkMap, Executor pExecutor) boolean
Methods inherited from class net.minecraft.server.level.GenerationChunkHolder
applyStep, decreaseGenerationRefCount, getAllFutures, getChunkIfPresent, getChunkIfPresentUnchecked, getFullStatus, getGenerationRefCount, 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,invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED
-
tickingChunkFuture
A future that returns the chunk if it is a ticking chunk,invalid reference
net.minecraft.world.server.ChunkHolder.ChunkLoadingFailure#UNLOADED
-
entityTickingChunkFuture
A future that returns the chunk if it is an entity ticking chunk,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
-
blockChanged
-
sectionLightChanged
-
broadcastChanges
-
broadcastBlockEntityIfNeeded
private void broadcastBlockEntityIfNeeded(List<ServerPlayer> pPlayers, Level pLevel, BlockPos pPos, BlockState pState) -
broadcastBlockEntity
-
broadcast
-
getTicketLevel
public int getTicketLevel()- Specified by:
getTicketLevel
in classGenerationChunkHolder
-
getQueueLevel
public int getQueueLevel()- Specified by:
getQueueLevel
in classGenerationChunkHolder
-
setQueueLevel
private void setQueueLevel(int p_140087_) -
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()
-