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> private 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
acquireStatusBump
(ChunkStatus status) (package private) CompletableFuture
<ChunkResult<ChunkAccess>> applyStep
(ChunkStep step, GeneratingChunkMap chunkMap, StaticCache2D<GenerationChunkHolder> cache) private void
completeFuture
(ChunkStatus targetStatus, ChunkAccess chunkAccess) void
private void
failAndClearPendingFuture
(int status, CompletableFuture<ChunkResult<ChunkAccess>> future) private void
failAndClearPendingFuturesBetween
(ChunkStatus highestAllowableStatus, ChunkStatus currentStatus) private ChunkStatus
findHighestStatusWithPendingFuture
(ChunkStatus generationStatus) List
<com.mojang.datafixers.util.Pair<ChunkStatus, CompletableFuture<ChunkResult<ChunkAccess>>>> getChunkIfPresent
(ChunkStatus status) int
private CompletableFuture
<ChunkResult<ChunkAccess>> getOrCreateFuture
(ChunkStatus targetStatus) getPos()
abstract int
abstract int
void
private boolean
isStatusDisallowed
(ChunkStatus status) (package private) void
void
private void
rescheduleChunkTask
(ChunkMap chunkMap, ChunkStatus targetStatus) scheduleChunkGenerationTask
(ChunkStatus targetStatus, ChunkMap chunkMap) protected void
updateHighestAllowedStatus
(ChunkMap chunkMap)
-
Field Details
-
CHUNK_STATUSES
-
NOT_DONE_YET
-
UNLOADED_CHUNK
-
UNLOADED_CHUNK_FUTURE
-
pos
-
highestAllowedStatus
-
startedWork
-
futures
-
task
-
generationRefCount
-
currentlyLoading
-
-
Constructor Details
-
GenerationChunkHolder
-
-
Method Details
-
scheduleChunkGenerationTask
public CompletableFuture<ChunkResult<ChunkAccess>> scheduleChunkGenerationTask(ChunkStatus targetStatus, ChunkMap chunkMap) -
applyStep
CompletableFuture<ChunkResult<ChunkAccess>> applyStep(ChunkStep step, GeneratingChunkMap chunkMap, StaticCache2D<GenerationChunkHolder> cache) -
updateHighestAllowedStatus
-
replaceProtoChunk
-
removeTask
-
rescheduleChunkTask
-
getOrCreateFuture
-
failAndClearPendingFuturesBetween
private void failAndClearPendingFuturesBetween(@Nullable ChunkStatus highestAllowableStatus, ChunkStatus currentStatus) -
failAndClearPendingFuture
private void failAndClearPendingFuture(int status, CompletableFuture<ChunkResult<ChunkAccess>> future) -
completeFuture
-
findHighestStatusWithPendingFuture
@Nullable private ChunkStatus findHighestStatusWithPendingFuture(@Nullable ChunkStatus generationStatus) -
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
-