Record Class PackVersion.Format

java.lang.Object
java.lang.Record
net.minecraft.resource.PackVersion.Format
Record Components:
min -
max -
format -
supported -
Enclosing class:
PackVersion

public static record PackVersion.Format(Optional<PackVersion> min, Optional<PackVersion> max, Optional<Integer> format, Optional<Range<Integer>> supported) extends Record
Mappings:
Namespace Name
named net/minecraft/resource/PackVersion$Format
intermediary net/minecraft/class_11555$class_11556
official azp$a
named min
intermediary comp_4418
official b
named max
intermediary comp_4419
official c
named format
intermediary comp_4420
official d
named supported
intermediary comp_4421
official e
  • Field Details

    • min

      private final Optional<PackVersion> min
      The field for the min record component.
    • max

      private final Optional<PackVersion> max
      The field for the max record component.
    • format

      private final Optional<Integer> format
      The field for the format record component.
    • supported

      private final Optional<Range<Integer>> supported
      The field for the supported record component.
    • PACK_CODEC

      static final com.mojang.serialization.MapCodec<PackVersion.Format> PACK_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACK_CODEC Lnet/minecraft/resource/PackVersion$Format;PACK_CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_61154 Lnet/minecraft/class_11555$class_11556;field_61154:Lcom/mojang/serialization/MapCodec;
      official f Lazp$a;f:Lcom/mojang/serialization/MapCodec;
    • OVERLAY_CODEC

      public static final com.mojang.serialization.MapCodec<PackVersion.Format> OVERLAY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named OVERLAY_CODEC Lnet/minecraft/resource/PackVersion$Format;OVERLAY_CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_61153 Lnet/minecraft/class_11555$class_11556;field_61153:Lcom/mojang/serialization/MapCodec;
      official a Lazp$a;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • ofRange

      public static PackVersion.Format ofRange(Range<PackVersion> range, int lastOldPackVersion)
      Mappings:
      Namespace Name Mixin selector
      named ofRange Lnet/minecraft/resource/PackVersion$Format;ofRange(Lnet/minecraft/util/dynamic/Range;I)Lnet/minecraft/resource/PackVersion$Format;
      intermediary method_72334 Lnet/minecraft/class_11555$class_11556;method_72334(Lnet/minecraft/class_6497;I)Lnet/minecraft/class_11555$class_11556;
      official a Lazp$a;a(Lbez;I)Lazp$a;
    • minMajor

      public int minMajor()
      Mappings:
      Namespace Name Mixin selector
      named minMajor Lnet/minecraft/resource/PackVersion$Format;minMajor()I
      intermediary method_72330 Lnet/minecraft/class_11555$class_11556;method_72330()I
      official a Lazp$a;a()I
    • validate

      public com.mojang.serialization.DataResult<Range<PackVersion>> validate(int lastOldPackVersion, boolean pack, boolean supportsOld, String packDescriptor, String supportedFormatsKey)
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/resource/PackVersion$Format;validate(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      intermediary method_72333 Lnet/minecraft/class_11555$class_11556;method_72333(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      official a Lazp$a;a(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
    • validateVersions

      private com.mojang.serialization.DataResult<Range<PackVersion>> validateVersions(int lastOldPackVersion, boolean pack, boolean supportsOld, String packDescriptor, String supportedFormatsKey)
      Mappings:
      Namespace Name Mixin selector
      named validateVersions Lnet/minecraft/resource/PackVersion$Format;validateVersions(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      intermediary method_72344 Lnet/minecraft/class_11555$class_11556;method_72344(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      official b Lazp$a;b(IZZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
    • validateSupportedFormats

      private com.mojang.serialization.DataResult<Range<PackVersion>> validateSupportedFormats(int lastOldPackVersion, boolean pack, String packDescriptor, String supportedFormatsKey)
      Mappings:
      Namespace Name Mixin selector
      named validateSupportedFormats Lnet/minecraft/resource/PackVersion$Format;validateSupportedFormats(IZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      intermediary method_72332 Lnet/minecraft/class_11555$class_11556;method_72332(IZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      official a Lazp$a;a(IZLjava/lang/String;Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
    • validateMainFormat

      private String validateMainFormat(int min, int max)
      Mappings:
      Namespace Name Mixin selector
      named validateMainFormat Lnet/minecraft/resource/PackVersion$Format;validateMainFormat(II)Ljava/lang/String;
      intermediary method_72331 Lnet/minecraft/class_11555$class_11556;method_72331(II)Ljava/lang/String;
      official a Lazp$a;a(II)Ljava/lang/String;
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • min

      public Optional<PackVersion> min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public Optional<PackVersion> max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component
    • format

      public Optional<Integer> format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • supported

      public Optional<Range<Integer>> supported()
      Returns the value of the supported record component.
      Returns:
      the value of the supported record component