public class ChunkTicketType<T> extends Object
Modifier and Type | Field and Description |
---|---|
private Comparator<T> |
argumentComparator |
static ChunkTicketType<Unit> |
DRAGON
Used by the ender dragon to load the central end island during the boss battle.
|
private long |
expiryTicks |
static ChunkTicketType<ChunkPos> |
FORCED
Used to force load chunks.
|
static ChunkTicketType<ChunkPos> |
LIGHT |
private String |
name |
static ChunkTicketType<ChunkPos> |
PLAYER |
static ChunkTicketType<BlockPos> |
PORTAL
Used by a nether portal to load chunks in the other dimension.
|
static ChunkTicketType<Integer> |
POST_TELEPORT
Used to load the chunks at the destination of teleportation.
|
static ChunkTicketType<Unit> |
START |
static ChunkTicketType<ChunkPos> |
UNKNOWN
Represents a type of ticket that has an unknown cause for loading chunks.
|
Modifier | Constructor and Description |
---|---|
protected |
ChunkTicketType(String name,
Comparator<T> comparator,
long expiryTicks) |
Modifier and Type | Method and Description |
---|---|
static <T> ChunkTicketType<T> |
create(String name,
Comparator<T> comparator)
Creates a new ticket type that does not expire.
|
static <T> ChunkTicketType<T> |
create(String name,
Comparator<T> comparator,
int expiryTicks)
Create a new ticket type that expires after an amount of ticks.
|
Comparator<T> |
getArgumentComparator() |
long |
getExpiryTicks() |
String |
toString() |
public static final ChunkTicketType<Unit> START
public static final ChunkTicketType<Unit> DRAGON
public static final ChunkTicketType<ChunkPos> PLAYER
public static final ChunkTicketType<ChunkPos> FORCED
public static final ChunkTicketType<ChunkPos> LIGHT
public static final ChunkTicketType<BlockPos> PORTAL
public static final ChunkTicketType<Integer> POST_TELEPORT
public static final ChunkTicketType<ChunkPos> UNKNOWN
private final String name
private final Comparator<T> argumentComparator
private final long expiryTicks
protected ChunkTicketType(String name, Comparator<T> comparator, long expiryTicks)
public static <T> ChunkTicketType<T> create(String name, Comparator<T> comparator)
public static <T> ChunkTicketType<T> create(String name, Comparator<T> comparator, int expiryTicks)
expiryTicks
- the expiry time in ticks, does not expire if 0public Comparator<T> getArgumentComparator()
public long getExpiryTicks()