Record Class PackVersion

java.lang.Object
java.lang.Record
net.minecraft.resource.PackVersion
Record Components:
major -
minor -
All Implemented Interfaces:
Comparable<PackVersion>

public record PackVersion(int major, int minor) extends Record implements Comparable<PackVersion>
Mappings:
Namespace Name
named net/minecraft/resource/PackVersion
intermediary net/minecraft/class_11555
official azp
named major
intermediary comp_4416
official c
named minor
intermediary comp_4417
official d
  • Field Details

    • major

      private final int major
      The field for the major record component.
    • minor

      private final int minor
      The field for the minor record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/resource/PackVersion;LOGGER:Lorg/slf4j/Logger;
      intermediary field_61151 Lnet/minecraft/class_11555;field_61151:Lorg/slf4j/Logger;
      official e Lazp;e:Lorg/slf4j/Logger;
    • CODEC

      public static final com.mojang.serialization.Codec<PackVersion> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/resource/PackVersion;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_61149 Lnet/minecraft/class_11555;field_61149:Lcom/mojang/serialization/Codec;
      official a Lazp;a:Lcom/mojang/serialization/Codec;
    • ANY_CODEC

      public static final com.mojang.serialization.Codec<PackVersion> ANY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ANY_CODEC Lnet/minecraft/resource/PackVersion;ANY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_61150 Lnet/minecraft/class_11555;field_61150:Lcom/mojang/serialization/Codec;
      official b Lazp;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • PackVersion

      public PackVersion(int int2, int int3)
  • Method Details

    • createCodec

      private static com.mojang.serialization.Codec<PackVersion> createCodec(int impliedMinorVersion)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/resource/PackVersion;createCodec(I)Lcom/mojang/serialization/Codec;
      intermediary method_72328 Lnet/minecraft/class_11555;method_72328(I)Lcom/mojang/serialization/Codec;
      official b Lazp;b(I)Lcom/mojang/serialization/Codec;
    • validate

      public static <ResultType, HolderType extends PackVersion.FormatHolder> com.mojang.serialization.DataResult<List<ResultType>> validate(List<HolderType> holders, int lastOldPackVersion, BiFunction<HolderType,Range<PackVersion>,ResultType> toResult)
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/resource/PackVersion;validate(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;
      intermediary method_72327 Lnet/minecraft/class_11555;method_72327(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;
      official a Lazp;a(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;
    • getLastOldPackVersion

      public static int getLastOldPackVersion(ResourceType type)
      Mappings:
      Namespace Name Mixin selector
      named getLastOldPackVersion Lnet/minecraft/resource/PackVersion;getLastOldPackVersion(Lnet/minecraft/resource/ResourceType;)I
      intermediary method_72325 Lnet/minecraft/class_11555;method_72325(Lnet/minecraft/class_3264;)I
      official a Lazp;a(Lazd;)I
    • createRangeCodec

      public static com.mojang.serialization.MapCodec<Range<PackVersion>> createRangeCodec(ResourceType type)
      Mappings:
      Namespace Name Mixin selector
      named createRangeCodec Lnet/minecraft/resource/PackVersion;createRangeCodec(Lnet/minecraft/resource/ResourceType;)Lcom/mojang/serialization/MapCodec;
      intermediary method_72329 Lnet/minecraft/class_11555;method_72329(Lnet/minecraft/class_3264;)Lcom/mojang/serialization/MapCodec;
      official b Lazp;b(Lazd;)Lcom/mojang/serialization/MapCodec;
    • of

      public static PackVersion of(int major, int minor)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/resource/PackVersion;of(II)Lnet/minecraft/resource/PackVersion;
      intermediary method_72320 Lnet/minecraft/class_11555;method_72320(II)Lnet/minecraft/class_11555;
      official a Lazp;a(II)Lazp;
    • of

      public static PackVersion of(int major)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/resource/PackVersion;of(I)Lnet/minecraft/resource/PackVersion;
      intermediary method_72319 Lnet/minecraft/class_11555;method_72319(I)Lnet/minecraft/class_11555;
      official a Lazp;a(I)Lazp;
    • majorRange

      public Range<PackVersion> majorRange()
      Mappings:
      Namespace Name Mixin selector
      named majorRange Lnet/minecraft/resource/PackVersion;majorRange()Lnet/minecraft/util/dynamic/Range;
      intermediary method_72318 Lnet/minecraft/class_11555;method_72318()Lnet/minecraft/class_6497;
      official a Lazp;a()Lbez;
    • compareTo

      public int compareTo(PackVersion packVersion)
      Specified by:
      compareTo in interface Comparable<PackVersion>
      Mappings:
      Namespace Name Mixin selector
      named compareTo Lnet/minecraft/resource/PackVersion;compareTo(Lnet/minecraft/resource/PackVersion;)I
      intermediary method_72326 Lnet/minecraft/class_11555;method_72326(Lnet/minecraft/class_11555;)I
      official a Lazp;a(Lazp;)I
    • toString

      public 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. All components in this record class 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.
    • major

      public int major()
      Returns the value of the major record component.
      Returns:
      the value of the major record component
    • minor

      public int minor()
      Returns the value of the minor record component.
      Returns:
      the value of the minor record component