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 TicketType
static final TicketType
static final TicketType
private final boolean
The field for theforceNaturalSpawning
record component.static final long
private final boolean
The field for thepersist
record component.static final TicketType
static final TicketType
static final TicketType
static final TicketType
private final long
The field for thetimeout
record component.static final TicketType
private final TicketType.TicketUse
The field for theuse
record 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 aTicketType
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
doesLoad()
boolean
final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of theforceNaturalSpawning
record component.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
persist()
Returns the value of thepersist
record component.private static TicketType
register
(String p_394674_, long p_394116_, boolean p_393877_, TicketType.TicketUse p_394600_) long
timeout()
Returns the value of thetimeout
record component.final String
toString()
Returns a string representation of this record class.use()
Returns the value of theuse
record component.
-
Field Details
-
timeout
private final long timeoutThe field for thetimeout
record component. -
persist
private final boolean persistThe field for thepersist
record component. -
use
The field for theuse
record component. -
forceNaturalSpawning
private final boolean forceNaturalSpawningThe field for theforceNaturalSpawning
record 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 aTicketType
record class.- Parameters:
timeout
- the value for thetimeout
record componentpersist
- the value for thepersist
record componentuse
- the value for theuse
record componentforceNaturalSpawning
- the value for theforceNaturalSpawning
record component
-
-
Method Details
-
register
private static TicketType register(String p_394674_, long p_394116_, boolean p_393877_, TicketType.TicketUse p_394600_) -
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 thetimeout
record component.- Returns:
- the value of the
timeout
record component
-
persist
public boolean persist()Returns the value of thepersist
record component.- Returns:
- the value of the
persist
record component
-
use
Returns the value of theuse
record component.- Returns:
- the value of the
use
record component
-
forceNaturalSpawning
public boolean forceNaturalSpawning()Returns the value of theforceNaturalSpawning
record component.- Returns:
- the value of the
forceNaturalSpawning
record component
-