Class GenerationTask
java.lang.Object
net.neoforged.neoforge.server.command.generation.GenerationTask
Special thanks to Jasmine and Gegy for allowing us to use their pregenerator mod as a model to use in NeoForge!
 Original code: https://github.com/jaskarth/fabric-chunkpregenerator
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final ServerChunkCacheprivate static final intprivate final AtomicIntegerprivate GenerationTask.Listenerprivate static final org.apache.logging.log4j.Loggerstatic final TicketType<ChunkPos>private final AtomicIntegerprivate static final intprivate final AtomicIntegerprivate final Objectprivate final intprivate final MinecraftServerprivate final AtomicIntegerprivate booleanprivate final intprivate final intprivate final int - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprivate voidacceptChunkResult(long chunk, com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> result) private voidacquireChunk(long chunk) private it.unimi.dsi.fastutil.longs.LongListcollectChunks(int count) private voidenqueueChunks(it.unimi.dsi.fastutil.longs.LongList chunks) intintintintprivate booleanisChunkFullyGenerated(ChunkPos chunkPosInLocalSpace) private voidreleaseChunk(long chunk) voidrun(GenerationTask.Listener listener) voidstop()private void 
- 
Field Details
- 
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER - 
BATCH_SIZE
private static final int BATCH_SIZE- See Also:
 
 - 
QUEUE_THRESHOLD
private static final int QUEUE_THRESHOLD- See Also:
 
 - 
COARSE_CELL_SIZE
private static final int COARSE_CELL_SIZE- See Also:
 
 - 
server
 - 
chunkSource
 - 
iterator
 - 
x
private final int x - 
z
private final int z - 
radius
private final int radius - 
totalCount
private final int totalCount - 
queueLock
 - 
queuedCount
 - 
okCount
 - 
errorCount
 - 
skippedCount
 - 
listener
 - 
stopped
private volatile boolean stopped - 
NEOFORGE_GENERATE_FORCED
 
 - 
 - 
Constructor Details
- 
GenerationTask
 
 - 
 - 
Method Details
- 
getOkCount
public int getOkCount() - 
getErrorCount
public int getErrorCount() - 
getSkippedCount
public int getSkippedCount() - 
getTotalCount
public int getTotalCount() - 
run
 - 
stop
public void stop() - 
tryEnqueueTasks
private void tryEnqueueTasks() - 
enqueueChunks
private void enqueueChunks(it.unimi.dsi.fastutil.longs.LongList chunks)  - 
acceptChunkResult
private void acceptChunkResult(long chunk, com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> result)  - 
collectChunks
private it.unimi.dsi.fastutil.longs.LongList collectChunks(int count)  - 
acquireChunk
private void acquireChunk(long chunk)  - 
releaseChunk
private void releaseChunk(long chunk)  - 
isChunkFullyGenerated
 
 -