public static interface ChunkLoadService.LoadingTicket
Modifier and Type | Method and Description |
---|---|
void |
forceChunk(com.flowpowered.math.vector.Vector3i chunk)
Force-loads a chunk using this ticket.
|
ImmutableSet<com.flowpowered.math.vector.Vector3i> |
getChunkList()
Gets the set of chunks that are being force-loaded by this ticket.
|
int |
getMaxNumChunks()
Gets the maximum limit on the number of concurrently loaded chunks
this ticket can have.
|
int |
getNumChunks()
Gets the number of chunks this ticket can load at once.
|
String |
getPlugin()
Gets the ID of the plugin that this ticket belongs to.
|
void |
prioritizeChunk(com.flowpowered.math.vector.Vector3i chunk)
Reorders a chunk to count as the 'newest' loaded chunk, making it
the last chunk to be removed when adding more chunks for force-loading.
|
void |
release()
Releases this ticket, removing all associated chunks and freeing up the
ticket slot for later use by a new ticket.
|
boolean |
setNumChunks(int numChunks)
Sets the number of chunks this ticket will load at once.
|
void |
unforceChunk(com.flowpowered.math.vector.Vector3i chunk)
Removes a chunk from the force-loaded set of this ticket.
|
boolean setNumChunks(int numChunks)
numChunks
- The number of chunks this ticket can load at onceint getNumChunks()
int getMaxNumChunks()
String getPlugin()
ImmutableSet<com.flowpowered.math.vector.Vector3i> getChunkList()
void forceChunk(com.flowpowered.math.vector.Vector3i chunk)
This does not cause an immediate load of the chunk. Forced chunks will be loaded eventually, but may not be available for a few ticks. Forced chunk loading is equivalent to the loading caused by a player.
chunk
- The chunk to force-loadvoid unforceChunk(com.flowpowered.math.vector.Vector3i chunk)
chunk
- The chunk to remove from force-loadingvoid prioritizeChunk(com.flowpowered.math.vector.Vector3i chunk)
chunk
- The chunk to reordervoid release()
After this operation the ticket is invalid and cannot be used to force-load chunks.