Package net.minecraft.server.world
Class ChunkTicketType<T>
java.lang.Object
net.minecraft.server.world.ChunkTicketType<T>
public class ChunkTicketType<T> extends Object
-
Field Summary
Fields Modifier and Type Field Description private Comparator<T>argumentComparatorstatic ChunkTicketType<Unit>DRAGONUsed by the ender dragon to load the central end island during the boss battle.private longexpiryTicksstatic ChunkTicketType<ChunkPos>FORCEDUsed to force load chunks.static ChunkTicketType<ChunkPos>LIGHTprivate Stringnamestatic ChunkTicketType<ChunkPos>PLAYERstatic ChunkTicketType<BlockPos>PORTALUsed by a nether portal to load chunks in the other dimension.static ChunkTicketType<Integer>POST_TELEPORTUsed to load the chunks at the destination of teleportation.static ChunkTicketType<Unit>STARTstatic ChunkTicketType<ChunkPos>UNKNOWNRepresents a type of ticket that has an unknown cause for loading chunks. -
Constructor Summary
Constructors Modifier Constructor Description protectedChunkTicketType(String name, Comparator<T> comparator, long expiryTicks) -
Method Summary
Modifier and Type Method 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()longgetExpiryTicks()StringtoString()
-
Field Details
-
START
-
DRAGON
Used by the ender dragon to load the central end island during the boss battle. -
PLAYER
-
FORCED
Used to force load chunks. -
LIGHT
-
PORTAL
Used by a nether portal to load chunks in the other dimension. -
POST_TELEPORT
Used to load the chunks at the destination of teleportation. -
UNKNOWN
Represents a type of ticket that has an unknown cause for loading chunks. -
name
-
argumentComparator
-
expiryTicks
private final long expiryTicks
-
-
Constructor Details
-
ChunkTicketType
-
-
Method Details
-
create
Creates a new ticket type that does not expire. -
create
public static <T> ChunkTicketType<T> create(String name, Comparator<T> comparator, int expiryTicks)Create a new ticket type that expires after an amount of ticks.- Parameters:
expiryTicks- the expiry time in ticks, does not expire if 0
-
toString
-
getArgumentComparator
-
getExpiryTicks
public long getExpiryTicks()
-