Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraftforge.common
Class ForgeChunkManager.Ticket

    java.lang.Object
      net.minecraftforge.common.ForgeChunkManager.Ticket

Enclosing class:
  ForgeChunkManager

    public static class ForgeChunkManager.Ticket

extends Object

Method Summary
`void` | `bindEntity(Entity entity)` Bind the entity to the ticket for `ForgeChunkManager.Type.ENTITY` type tickets.
`com.google.common.collect.ImmutableSet` | `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.
`String` | `getModId()` Get the associated mod id
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### setChunkListDepth

    public void setChunkListDepth(int depth)

  The chunk list depth can be manipulated up to the maximal grant allowed for the mod. This value is configurable. Once the maximum is reached, the least recently forced chunk, by original registration time, is removed from the forced chunk list.

  Parameters:
    `depth` - The new depth to set

### getChunkListDepth

    public int getChunkListDepth()

  Gets the current max depth for this ticket. Should be the same as getMaxChunkListDepth() unless setChunkListDepth has been called.

  Returns:
    Current max depth

### getMaxChunkListDepth

    public int getMaxChunkListDepth()

  Get the maximum chunk depth size

  Returns:
    The maximum chunk depth size

### bindEntity

    public void bindEntity(Entity entity)

  Bind the entity to the ticket for `ForgeChunkManager.Type.ENTITY` type tickets. Other types will throw a runtime exception.

  Parameters:
    `entity` - The entity to bind

### getModData

    public NBTTagCompound getModData()

  Retrieve the `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.

  Returns:
    The custom compound tag for mods to store additional chunkloading data

### getEntity

    public Entity getEntity()

  Get the entity associated with this `ForgeChunkManager.Type.ENTITY` type ticket

  Returns:

### isPlayerTicket

    public boolean isPlayerTicket()

  Is this a player associated ticket rather than a mod associated ticket?

### getPlayerName

    public String getPlayerName()

  Get the player associated with this ticket

### getModId

    public String getModId()

  Get the associated mod id

### getType

    public ForgeChunkManager.Type getType()

  Gets the ticket type

### getChunkList

    public com.google.common.collect.ImmutableSet getChunkList()

  Gets a list of requested chunks for this ticket.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD