Package net.minecraft.server.level
Record Class TicketType
java.lang.Object
java.lang.Record
net.minecraft.server.level.TicketType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TicketTypestatic final TicketTypestatic final intstatic final intstatic final intstatic final intstatic final intprivate final intThe field for theflagsrecord component.static final TicketTypeprivate final booleanThe field for theforceNaturalSpawningrecord component.static final longstatic final TicketTypestatic final TicketTypestatic final TicketTypestatic final TicketTypestatic final TicketTypeprivate final longThe field for thetimeoutrecord component.static final TicketType -
Constructor Summary
ConstructorsConstructorDescriptionTicketType(long timeout, int flags) TicketType(long timeout, int flags, boolean forceNaturalSpawning) Creates an instance of aTicketTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleandoesLoad()booleanfinal booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.booleanReturns the value of theforceNaturalSpawningrecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanpersist()private static TicketTypebooleanlongtimeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
timeout
private final long timeoutThe field for thetimeoutrecord component. -
flags
private final int flagsThe field for theflagsrecord component. -
forceNaturalSpawning
private final boolean forceNaturalSpawningThe field for theforceNaturalSpawningrecord component. -
NO_TIMEOUT
public static final long NO_TIMEOUT- See Also:
-
FLAG_PERSIST
public static final int FLAG_PERSIST- See Also:
-
FLAG_LOADING
public static final int FLAG_LOADING- See Also:
-
FLAG_SIMULATION
public static final int FLAG_SIMULATION- See Also:
-
FLAG_KEEP_DIMENSION_ACTIVE
public static final int FLAG_KEEP_DIMENSION_ACTIVE- See Also:
-
FLAG_CAN_EXPIRE_IF_UNLOADED
public static final int FLAG_CAN_EXPIRE_IF_UNLOADED- See Also:
-
PLAYER_SPAWN
-
SPAWN_SEARCH
-
DRAGON
-
PLAYER_LOADING
-
PLAYER_SIMULATION
-
FORCED
-
PORTAL
-
ENDER_PEARL
-
UNKNOWN
-
-
Constructor Details
-
TicketType
public TicketType(long timeout, int flags) -
TicketType
public TicketType(long timeout, int flags, boolean forceNaturalSpawning) Creates an instance of aTicketTyperecord class.- Parameters:
timeout- the value for thetimeoutrecord componentflags- the value for theflagsrecord componentforceNaturalSpawning- the value for theforceNaturalSpawningrecord component
-
-
Method Details
-
register
-
persist
public boolean persist() -
doesLoad
public boolean doesLoad() -
doesSimulate
public boolean doesSimulate() -
shouldKeepDimensionActive
public boolean shouldKeepDimensionActive() -
canExpireIfUnloaded
public boolean canExpireIfUnloaded() -
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. All components in this record class are compared with '=='. -
timeout
public long timeout()Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
forceNaturalSpawning
public boolean forceNaturalSpawning()Returns the value of theforceNaturalSpawningrecord component.- Returns:
- the value of the
forceNaturalSpawningrecord component
-