Record Class Subscription

java.lang.Object
java.lang.Record
net.minecraft.client.realms.dto.Subscription
Record Components:
startDate -
daysLeft -
type -

@Environment(CLIENT) public record Subscription(long startDate, int daysLeft, Subscription.SubscriptionType type) extends Record
Mappings:
Namespace Name
named net/minecraft/client/realms/dto/Subscription
intermediary net/minecraft/class_4887
official fzi
named startDate
intermediary comp_5030
official a
named daysLeft
intermediary comp_5031
official b
named type
intermediary comp_5032
official c
  • Field Details

    • startDate

      private final long startDate
      The field for the startDate record component.
    • daysLeft

      private final int daysLeft
      The field for the daysLeft record component.
    • type

      private final Subscription.SubscriptionType type
      The field for the type record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/realms/dto/Subscription;LOGGER:Lorg/slf4j/Logger;
      intermediary field_22656 Lnet/minecraft/class_4887;field_22656:Lorg/slf4j/Logger;
      official d Lfzi;d:Lorg/slf4j/Logger;
  • Constructor Details

    • Subscription

      public Subscription(long startDate, int daysLeft, Subscription.SubscriptionType type)
      Creates an instance of a Subscription record class.
      Parameters:
      startDate - the value for the startDate record component
      daysLeft - the value for the daysLeft record component
      type - the value for the type record component
  • Method Details

    • parse

      public static Subscription parse(String json)
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/client/realms/dto/Subscription;parse(Ljava/lang/String;)Lnet/minecraft/client/realms/dto/Subscription;
      intermediary method_25085 Lnet/minecraft/class_4887;method_25085(Ljava/lang/String;)Lnet/minecraft/class_4887;
      official a Lfzi;a(Ljava/lang/String;)Lfzi;
    • typeFrom

      private static Subscription.SubscriptionType typeFrom(@Nullable @Nullable String subscriptionType)
      Mappings:
      Namespace Name Mixin selector
      named typeFrom Lnet/minecraft/client/realms/dto/Subscription;typeFrom(Ljava/lang/String;)Lnet/minecraft/client/realms/dto/Subscription$SubscriptionType;
      intermediary method_25086 Lnet/minecraft/class_4887;method_25086(Ljava/lang/String;)Lnet/minecraft/class_4887$class_4322;
      official b Lfzi;b(Ljava/lang/String;)Lfzi$a;
    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • startDate

      public long startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • daysLeft

      public int daysLeft()
      Returns the value of the daysLeft record component.
      Returns:
      the value of the daysLeft record component
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component