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
  • Field Details

    • timeout

      private final long timeout
      The field for the timeout record component.
    • persist

      private final boolean persist
      The field for the persist record component.
    • use

      private final TicketType.TicketUse use
      The field for the use record component.
    • forceNaturalSpawning

      private final boolean forceNaturalSpawning
      The field for the forceNaturalSpawning record component.
    • NO_TIMEOUT

      public static final long NO_TIMEOUT
      See Also:
    • START

      public static final TicketType START
    • DRAGON

      public static final TicketType DRAGON
    • PLAYER_LOADING

      public static final TicketType PLAYER_LOADING
    • PLAYER_SIMULATION

      public static final TicketType PLAYER_SIMULATION
    • FORCED

      public static final TicketType FORCED
    • PORTAL

      public static final TicketType PORTAL
    • ENDER_PEARL

      public static final TicketType ENDER_PEARL
    • UNKNOWN

      public static final TicketType UNKNOWN
  • Constructor Details

    • TicketType

      public TicketType(long timeout, boolean persist, TicketType.TicketUse use)
    • TicketType

      public TicketType(long timeout, boolean persist, TicketType.TicketUse use, boolean forceNaturalSpawning)
      Creates an instance of a TicketType record class.
      Parameters:
      timeout - the value for the timeout record component
      persist - the value for the persist record component
      use - the value for the use record component
      forceNaturalSpawning - the value for the forceNaturalSpawning 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timeout

      public long timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • persist

      public boolean persist()
      Returns the value of the persist record component.
      Returns:
      the value of the persist record component
    • use

      public TicketType.TicketUse use()
      Returns the value of the use record component.
      Returns:
      the value of the use record component
    • forceNaturalSpawning

      public boolean forceNaturalSpawning()
      Returns the value of the forceNaturalSpawning record component.
      Returns:
      the value of the forceNaturalSpawning record component