Class ChunkGenWorker
- java.lang.Object
-
- net.minecraftforge.server.command.ChunkGenWorker
-
- All Implemented Interfaces:
WorldWorkerManager.IWorker
public class ChunkGenWorker extends java.lang.Object implements WorldWorkerManager.IWorker
-
-
Field Summary
Fields Modifier and Type Field Description private ServerWorlddimprivate intgennedprivate java.lang.BooleankeepingLoadedprivate longlastNotifcationTimeprivate intlastNotificationprivate CommandSourcelistenerprivate intnotificationFrequencyprivate java.util.Queue<BlockPos>queueprotected BlockPosstartprotected inttotal
-
Constructor Summary
Constructors Constructor Description ChunkGenWorker(CommandSource listener, BlockPos start, int total, ServerWorld dim, int interval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Queue<BlockPos>buildQueue()booleandoWork()Perform a task, returning true from this will have the manager call this function again this tick if there is time left.TextComponentgetStartMessage(CommandSource sender)booleanhasWork()
-
-
-
Field Detail
-
listener
private final CommandSource listener
-
start
protected final BlockPos start
-
total
protected final int total
-
dim
private final ServerWorld dim
-
queue
private final java.util.Queue<BlockPos> queue
-
notificationFrequency
private final int notificationFrequency
-
lastNotification
private int lastNotification
-
lastNotifcationTime
private long lastNotifcationTime
-
genned
private int genned
-
keepingLoaded
private java.lang.Boolean keepingLoaded
-
-
Constructor Detail
-
ChunkGenWorker
public ChunkGenWorker(CommandSource listener, BlockPos start, int total, ServerWorld dim, int interval)
-
-
Method Detail
-
buildQueue
protected java.util.Queue<BlockPos> buildQueue()
-
getStartMessage
public TextComponent getStartMessage(CommandSource sender)
-
hasWork
public boolean hasWork()
- Specified by:
hasWorkin interfaceWorldWorkerManager.IWorker
-
doWork
public boolean doWork()
Description copied from interface:WorldWorkerManager.IWorkerPerform a task, returning true from this will have the manager call this function again this tick if there is time left. Returning false will skip calling this worker until next tick.- Specified by:
doWorkin interfaceWorldWorkerManager.IWorker
-
-