Package net.minecraft.server.level
Class ChunkHolder
java.lang.Object
net.minecraft.server.level.ChunkHolder
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BitSet
private final it.unimi.dsi.fastutil.shorts.ShortSet[]
private static final List
<ChunkStatus> private CompletableFuture
<ChunkAccess> private final DebugBuffer
<ChunkHolder.ChunkSaveDebug> (package private) LevelChunk
private CompletableFuture
<ChunkResult<LevelChunk>> private CompletableFuture
<ChunkResult<LevelChunk>> private final AtomicReferenceArray
<CompletableFuture<ChunkResult<ChunkAccess>>> private boolean
private final LevelHeightAccessor
private final LevelLightEngine
static final ChunkResult
<ChunkAccess> private int
private final ChunkHolder.LevelChangeListener
private CompletableFuture
<Void> private final ChunkHolder.PlayerProvider
private final ChunkPos
private int
private CompletableFuture
<?> private final BitSet
private int
private CompletableFuture
<ChunkResult<LevelChunk>> static final ChunkResult
<ChunkAccess> static final CompletableFuture
<ChunkResult<ChunkAccess>> static final ChunkResult
<LevelChunk> private static final CompletableFuture
<ChunkResult<LevelChunk>> private boolean
-
Constructor Summary
ConstructorDescriptionChunkHolder
(ChunkPos p_142986_, int p_142987_, LevelHeightAccessor p_142988_, LevelLightEngine p_142989_, ChunkHolder.LevelChangeListener p_142990_, ChunkHolder.PlayerProvider p_142991_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSaveDependency
(String p_200417_, CompletableFuture<?> p_200418_) void
addSendDependency
(CompletableFuture<?> p_300440_) void
blockChanged
(BlockPos p_140057_) private void
broadcast
(List<ServerPlayer> p_288998_, Packet<?> p_289013_) private void
broadcastBlockEntity
(List<ServerPlayer> p_288988_, Level p_289005_, BlockPos p_288981_) private void
broadcastBlockEntityIfNeeded
(List<ServerPlayer> p_288982_, Level p_289011_, BlockPos p_288969_, BlockState p_288973_) void
broadcastChanges
(LevelChunk p_140055_) private void
demoteFullChunk
(ChunkMap p_287599_, FullChunkStatus p_287649_) List
<com.mojang.datafixers.util.Pair<ChunkStatus, CompletableFuture<ChunkResult<ChunkAccess>>>> getFutureIfPresent
(ChunkStatus p_330273_) getFutureIfPresentUnchecked
(ChunkStatus p_331856_) getOrScheduleFuture
(ChunkStatus p_330909_, ChunkMap p_140051_) getPos()
int
int
void
void
replaceProtoChunk
(ImposterProtoChunk p_140053_) private void
scheduleFullChunkPromotion
(ChunkMap p_142999_, CompletableFuture<ChunkResult<LevelChunk>> p_143000_, Executor p_143001_, FullChunkStatus p_287621_) void
sectionLightChanged
(LightLayer p_140037_, int p_140038_) private void
setQueueLevel
(int p_140087_) void
setTicketLevel
(int p_140028_) private void
updateChunkToSave
(CompletableFuture<? extends ChunkResult<? extends ChunkAccess>> p_143018_, String p_143019_) protected void
updateFutures
(ChunkMap p_143004_, Executor p_143005_) boolean
-
Field Details
-
UNLOADED_CHUNK
-
UNLOADED_CHUNK_FUTURE
-
UNLOADED_LEVEL_CHUNK
-
NOT_DONE_YET
-
UNLOADED_LEVEL_CHUNK_FUTURE
-
CHUNK_STATUSES
-
futures
-
levelHeightAccessor
-
fullChunkFuture
-
tickingChunkFuture
-
entityTickingChunkFuture
-
chunkToSave
-
chunkToSaveHistory
-
oldTicketLevel
private int oldTicketLevel -
ticketLevel
private int ticketLevel -
queueLevel
private int queueLevel -
pos
-
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
-
currentlyLoading
LevelChunk currentlyLoading
-
-
Constructor Details
-
ChunkHolder
public ChunkHolder(ChunkPos p_142986_, int p_142987_, LevelHeightAccessor p_142988_, LevelLightEngine p_142989_, ChunkHolder.LevelChangeListener p_142990_, ChunkHolder.PlayerProvider p_142991_)
-
-
Method Details
-
getFutureIfPresentUnchecked
public CompletableFuture<ChunkResult<ChunkAccess>> getFutureIfPresentUnchecked(ChunkStatus p_331856_) -
getFutureIfPresent
-
getTickingChunkFuture
-
getEntityTickingChunkFuture
-
getFullChunkFuture
-
getTickingChunk
-
getChunkSendSyncFuture
-
getChunkToSend
-
getLastAvailableStatus
-
getLastAvailable
-
getChunkToSave
-
blockChanged
-
sectionLightChanged
-
broadcastChanges
-
broadcastBlockEntityIfNeeded
private void broadcastBlockEntityIfNeeded(List<ServerPlayer> p_288982_, Level p_289011_, BlockPos p_288969_, BlockState p_288973_) -
broadcastBlockEntity
private void broadcastBlockEntity(List<ServerPlayer> p_288988_, Level p_289005_, BlockPos p_288981_) -
broadcast
-
getOrScheduleFuture
public CompletableFuture<ChunkResult<ChunkAccess>> getOrScheduleFuture(ChunkStatus p_330909_, ChunkMap p_140051_) -
addSaveDependency
-
updateChunkToSave
private void updateChunkToSave(CompletableFuture<? extends ChunkResult<? extends ChunkAccess>> p_143018_, String p_143019_) -
addSendDependency
-
getFullStatus
-
getPos
-
getTicketLevel
public int getTicketLevel() -
getQueueLevel
public int getQueueLevel() -
setQueueLevel
private void setQueueLevel(int p_140087_) -
setTicketLevel
public void setTicketLevel(int p_140028_) -
scheduleFullChunkPromotion
private void scheduleFullChunkPromotion(ChunkMap p_142999_, CompletableFuture<ChunkResult<LevelChunk>> p_143000_, Executor p_143001_, FullChunkStatus p_287621_) -
demoteFullChunk
-
updateFutures
-
wasAccessibleSinceLastSave
public boolean wasAccessibleSinceLastSave() -
refreshAccessibility
public void refreshAccessibility() -
replaceProtoChunk
-
getAllFutures
public List<com.mojang.datafixers.util.Pair<ChunkStatus,CompletableFuture<ChunkResult<ChunkAccess>>>> getAllFutures()
-