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 ServerWorld
dim
private int
genned
private java.lang.Boolean
keepingLoaded
private long
lastNotifcationTime
private int
lastNotification
private CommandSource
listener
private int
notificationFrequency
private java.util.Queue<BlockPos>
queue
protected BlockPos
start
protected int
total
-
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()
boolean
doWork()
Perform a task, returning true from this will have the manager call this function again this tick if there is time left.TextComponent
getStartMessage(CommandSource sender)
boolean
hasWork()
-
-
-
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:
hasWork
in interfaceWorldWorkerManager.IWorker
-
doWork
public boolean doWork()
Description copied from interface:WorldWorkerManager.IWorker
Perform 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:
doWork
in interfaceWorldWorkerManager.IWorker
-
-