Package net.minecraft.server.level
Class GenerationChunkHolder
java.lang.Object
net.minecraft.server.level.GenerationChunkHolder
- Direct Known Subclasses:
ChunkHolder
-
Field Summary
FieldsModifier 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 AtomicIntegerprivate ChunkStatusprivate static final ChunkResult<ChunkAccess> protected final ChunkPosprivate final AtomicReference<ChunkStatus> private final AtomicReference<ChunkGenerationTask> static final ChunkResult<ChunkAccess> static final CompletableFuture<ChunkResult<ChunkAccess>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanacquireStatusBump(ChunkStatus p_343283_) (package private) CompletableFuture<ChunkResult<ChunkAccess>> applyStep(ChunkStep p_344844_, GeneratingChunkMap p_342173_, StaticCache2D<GenerationChunkHolder> p_343026_) private voidcompleteFuture(ChunkStatus p_342456_, ChunkAccess p_342625_) voidprivate voidfailAndClearPendingFuture(int p_342343_, CompletableFuture<ChunkResult<ChunkAccess>> p_345346_) private voidfailAndClearPendingFuturesBetween(ChunkStatus p_343092_, ChunkStatus p_345118_) private ChunkStatusfindHighestStatusWithPendingFuture(ChunkStatus p_342852_) List<com.mojang.datafixers.util.Pair<ChunkStatus, CompletableFuture<ChunkResult<ChunkAccess>>>> getChunkIfPresent(ChunkStatus p_342964_) getChunkIfPresentUnchecked(ChunkStatus p_342422_) intprivate CompletableFuture<ChunkResult<ChunkAccess>> getOrCreateFuture(ChunkStatus p_342279_) getPos()abstract intabstract intvoidprivate booleanisStatusDisallowed(ChunkStatus p_342117_) (package private) voidremoveTask(ChunkGenerationTask p_342447_) voidreplaceProtoChunk(ImposterProtoChunk p_343560_) private voidrescheduleChunkTask(ChunkMap p_344344_, ChunkStatus p_343189_) scheduleChunkGenerationTask(ChunkStatus p_342080_, ChunkMap p_343602_) protected voidupdateHighestAllowedStatus(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
-