public static interface ChunkTicketManager.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.
|
DataContainer |
getCompanionData()
Gets the companion data stored in a
DataContainer . |
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.
|
World |
getWorld()
Gets the
World passed when creating this ticket. |
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.
|
void |
setCompanionData(DataContainer container)
Sets the companion data for this loading 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()
World getWorld()
World
passed when creating this ticket.DataContainer getCompanionData()
DataContainer
. Note that
the provided DataContainer
is modifiable, but a copy of the
internal container, and as such may need to be
setCompanionData(DataContainer)
before modifications can
be handled.
The sort of data stored in the container is plugin/mod dependent
and is based on the original creator of this ChunkTicketManager.LoadingTicket
.
As such, the structure and particular data stored in the container
is not concrete or defined in any specific way.
void setCompanionData(DataContainer container)
The sort of data stored in the container is plugin/mod dependent
and is based on the original creator of this ChunkTicketManager.LoadingTicket
.
As such, the structure and particular data stored in the container
is not concrete or defined in any specific way.
container
- The container containing the companion dataString 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.