Package net.minecraft.server.level
Class GenerationChunkHolder
java.lang.Object
net.minecraft.server.level.GenerationChunkHolder
- Direct Known Subclasses:
ChunkHolder
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final List
<ChunkStatus> Forge: Used to bypass the future chain when loading chunks, because modders can do weird things that cause deadlocks, modders should never touch thisprivate final AtomicReferenceArray
<CompletableFuture<ChunkResult<ChunkAccess>>> private final AtomicInteger
private ChunkStatus
private static final ChunkResult
<ChunkAccess> protected final ChunkPos
private final AtomicReference
<ChunkStatus> private final AtomicReference
<ChunkGenerationTask> static final ChunkResult
<ChunkAccess> static final CompletableFuture
<ChunkResult<ChunkAccess>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
acquireStatusBump
(ChunkStatus p_343283_) (package private) CompletableFuture
<ChunkResult<ChunkAccess>> applyStep
(ChunkStep p_344844_, GeneratingChunkMap p_342173_, StaticCache2D<GenerationChunkHolder> p_343026_) private void
completeFuture
(ChunkStatus p_342456_, ChunkAccess p_342625_) void
private void
failAndClearPendingFuture
(int p_342343_, CompletableFuture<ChunkResult<ChunkAccess>> p_345346_) private void
failAndClearPendingFuturesBetween
(ChunkStatus p_343092_, ChunkStatus p_345118_) private ChunkStatus
findHighestStatusWithPendingFuture
(ChunkStatus p_342852_) List
<com.mojang.datafixers.util.Pair<ChunkStatus, CompletableFuture<ChunkResult<ChunkAccess>>>> getChunkIfPresent
(ChunkStatus p_342964_) getChunkIfPresentUnchecked
(ChunkStatus p_342422_) int
private CompletableFuture
<ChunkResult<ChunkAccess>> getOrCreateFuture
(ChunkStatus p_342279_) getPos()
abstract int
abstract int
void
private boolean
isStatusDisallowed
(ChunkStatus p_342117_) (package private) void
removeTask
(ChunkGenerationTask p_342447_) void
replaceProtoChunk
(ImposterProtoChunk p_343560_) private void
rescheduleChunkTask
(ChunkMap p_344344_, ChunkStatus p_343189_) scheduleChunkGenerationTask
(ChunkStatus p_342080_, ChunkMap p_343602_) protected void
updateHighestAllowedStatus
(ChunkMap p_345117_)
-
Field Details
-
CHUNK_STATUSES
-
NOT_DONE_YET
-
UNLOADED_CHUNK
-
UNLOADED_CHUNK_FUTURE
-
pos
-
highestAllowedStatus
-
startedWork
-
futures
-
task
-
generationRefCount
-
currentlyLoading
Forge: Used to bypass the future chain when loading chunks, because modders can do weird things that cause deadlocks, modders should never touch this
-
-
Constructor Details
-
GenerationChunkHolder
-
-
Method Details
-
scheduleChunkGenerationTask
public CompletableFuture<ChunkResult<ChunkAccess>> scheduleChunkGenerationTask(ChunkStatus p_342080_, ChunkMap p_343602_) -
applyStep
CompletableFuture<ChunkResult<ChunkAccess>> applyStep(ChunkStep p_344844_, GeneratingChunkMap p_342173_, StaticCache2D<GenerationChunkHolder> p_343026_) -
updateHighestAllowedStatus
-
replaceProtoChunk
-
removeTask
-
rescheduleChunkTask
-
getOrCreateFuture
-
failAndClearPendingFuturesBetween
private void failAndClearPendingFuturesBetween(@Nullable ChunkStatus p_343092_, ChunkStatus p_345118_) -
failAndClearPendingFuture
private void failAndClearPendingFuture(int p_342343_, CompletableFuture<ChunkResult<ChunkAccess>> p_345346_) -
completeFuture
-
findHighestStatusWithPendingFuture
-
acquireStatusBump
-
isStatusDisallowed
-
increaseGenerationRefCount
public void increaseGenerationRefCount() -
decreaseGenerationRefCount
public void decreaseGenerationRefCount() -
getGenerationRefCount
public int getGenerationRefCount() -
getChunkIfPresentUnchecked
-
getChunkIfPresent
-
getLatestChunk
-
getPersistedStatus
-
getPos
-
getFullStatus
-
getTicketLevel
public abstract int getTicketLevel() -
getQueueLevel
public abstract int getQueueLevel() -
getAllFutures
public List<com.mojang.datafixers.util.Pair<ChunkStatus,CompletableFuture<ChunkResult<ChunkAccess>>>> getAllFutures() -
getLatestStatus
-