public static class ForgeChunkManager.Ticket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Entity |
entity |
private int |
entityChunkX |
private int |
entityChunkZ |
private int |
maxDepth |
private NBTTagCompound |
modData |
private java.lang.String |
modId |
private java.lang.String |
player |
private java.util.LinkedHashSet<ChunkPos> |
requestedChunks |
private ForgeChunkManager.Type |
ticketType |
World |
world |
Constructor and Description |
---|
Ticket(java.lang.String modId,
ForgeChunkManager.Type type,
World world) |
Ticket(java.lang.String modId,
ForgeChunkManager.Type type,
World world,
java.lang.String player) |
Modifier and Type | Method and Description |
---|---|
void |
bindEntity(Entity entity)
Bind the entity to the ticket for
ForgeChunkManager.Type.ENTITY type tickets. |
com.google.common.collect.ImmutableSet<ChunkPos> |
getChunkList()
Gets a list of requested chunks for this ticket.
|
int |
getChunkListDepth()
Gets the current max depth for this ticket.
|
Entity |
getEntity()
Get the entity associated with this
ForgeChunkManager.Type.ENTITY type ticket |
int |
getMaxChunkListDepth()
Get the maximum chunk depth size
|
NBTTagCompound |
getModData()
Retrieve the
NBTTagCompound that stores mod specific data for the chunk ticket. |
java.lang.String |
getModId()
Get the associated mod id
|
java.lang.String |
getPlayerName()
Get the player associated with this ticket
|
ForgeChunkManager.Type |
getType()
Gets the ticket type
|
boolean |
isPlayerTicket()
Is this a player associated ticket rather than a mod associated ticket?
|
void |
setChunkListDepth(int depth)
The chunk list depth can be manipulated up to the maximal grant allowed for the mod.
|
private java.lang.String modId
private ForgeChunkManager.Type ticketType
private java.util.LinkedHashSet<ChunkPos> requestedChunks
private NBTTagCompound modData
public final World world
private int maxDepth
private int entityChunkX
private int entityChunkZ
private Entity entity
private java.lang.String player
Ticket(java.lang.String modId, ForgeChunkManager.Type type, World world)
Ticket(java.lang.String modId, ForgeChunkManager.Type type, World world, java.lang.String player)
public void setChunkListDepth(int depth)
depth
- The new depth to setpublic int getChunkListDepth()
public int getMaxChunkListDepth()
public void bindEntity(Entity entity)
ForgeChunkManager.Type.ENTITY
type tickets. Other types will throw a runtime exception.entity
- The entity to bindpublic NBTTagCompound getModData()
NBTTagCompound
that stores mod specific data for the chunk ticket.
Example data to store would be a TileEntity or Block location. This is persisted with the ticket and
provided to the ForgeChunkManager.LoadingCallback
for the mod. It is recommended to use this to recover
useful state information for the forced chunks.public Entity getEntity()
ForgeChunkManager.Type.ENTITY
type ticketpublic boolean isPlayerTicket()
public java.lang.String getPlayerName()
public java.lang.String getModId()
public ForgeChunkManager.Type getType()
public com.google.common.collect.ImmutableSet<ChunkPos> getChunkList()