Package net.minecraft.server.level
Record Class TicketType
java.lang.Object
java.lang.Record
net.minecraft.server.level.TicketType
public record TicketType(long timeout, boolean persist, TicketType.TicketUse use, boolean forceNaturalSpawning)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TicketTypestatic final TicketTypestatic final TicketTypeprivate final booleanThe field for theforceNaturalSpawningrecord component.static final longprivate final booleanThe field for thepersistrecord component.static final TicketTypestatic final TicketTypestatic final TicketTypestatic final TicketTypeprivate final longThe field for thetimeoutrecord component.static final TicketTypeprivate final TicketType.TicketUseThe field for theuserecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTicketType(long timeout, boolean persist, TicketType.TicketUse use) TicketType(long timeout, boolean persist, TicketType.TicketUse use, boolean forceNaturalSpawning) Creates an instance of aTicketTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesLoad()booleanfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceNaturalSpawningrecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanpersist()Returns the value of thepersistrecord component.private static TicketTyperegister(String pName, long pTimeout, boolean pPersist, TicketType.TicketUse pUse) longtimeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.use()Returns the value of theuserecord component.
-
Field Details
-
timeout
private final long timeoutThe field for thetimeoutrecord component. -
persist
private final boolean persistThe field for thepersistrecord component. -
use
The field for theuserecord component. -
forceNaturalSpawning
private final boolean forceNaturalSpawningThe field for theforceNaturalSpawningrecord component. -
NO_TIMEOUT
public static final long NO_TIMEOUT- See Also:
-
START
-
DRAGON
-
PLAYER_LOADING
-
PLAYER_SIMULATION
-
FORCED
-
PORTAL
-
ENDER_PEARL
-
UNKNOWN
-
-
Constructor Details
-
TicketType
-
TicketType
public TicketType(long timeout, boolean persist, TicketType.TicketUse use, boolean forceNaturalSpawning) Creates an instance of aTicketTyperecord class.- Parameters:
timeout- the value for thetimeoutrecord componentpersist- the value for thepersistrecord componentuse- the value for theuserecord componentforceNaturalSpawning- the value for theforceNaturalSpawningrecord component
-
-
Method Details
-
register
private static TicketType register(String pName, long pTimeout, boolean pPersist, TicketType.TicketUse pUse) -
doesLoad
public boolean doesLoad() -
doesSimulate
public boolean doesSimulate() -
hasTimeout
public boolean hasTimeout() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timeout
public long timeout()Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
persist
public boolean persist()Returns the value of thepersistrecord component.- Returns:
- the value of the
persistrecord component
-
use
Returns the value of theuserecord component.- Returns:
- the value of the
userecord component
-
forceNaturalSpawning
public boolean forceNaturalSpawning()Returns the value of theforceNaturalSpawningrecord component.- Returns:
- the value of the
forceNaturalSpawningrecord component
-