Package net.minecraft.resource
Record Class PackVersion
java.lang.Object
java.lang.Record
net.minecraft.resource.PackVersion
- Record Components:
major-minor-
- All Implemented Interfaces:
Comparable<PackVersion>
- Mappings:
Namespace Name named net/minecraft/resource/PackVersionintermediary net/minecraft/class_11555official azpnamed majorintermediary comp_4416official cnamed minorintermediary comp_4417official d
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackVersion> static final com.mojang.serialization.Codec<PackVersion> private static final Loggerprivate final intThe field for themajorrecord component.private final intThe field for theminorrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PackVersion packVersion) private static com.mojang.serialization.Codec<PackVersion> createCodec(int impliedMinorVersion) static com.mojang.serialization.MapCodec<Range<PackVersion>> createRangeCodec(ResourceType type) final booleanIndicates whether some other object is "equal to" this one.static intfinal inthashCode()Returns a hash code value for this object.intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.static PackVersionof(int major) static PackVersionof(int major, int minor) toString()Returns a string representation of this record class.static <ResultType,HolderType extends PackVersion.FormatHolder>
com.mojang.serialization.DataResult<List<ResultType>> validate(List<HolderType> holders, int lastOldPackVersion, BiFunction<HolderType, Range<PackVersion>, ResultType> toResult)
-
Field Details
-
major
private final int majorThe field for themajorrecord component. -
minor
private final int minorThe field for theminorrecord component. -
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/resource/PackVersion;LOGGER:Lorg/slf4j/Logger;intermediary field_61151Lnet/minecraft/class_11555;field_61151:Lorg/slf4j/Logger;official eLazp;e:Lorg/slf4j/Logger;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/resource/PackVersion;CODEC:Lcom/mojang/serialization/Codec;intermediary field_61149Lnet/minecraft/class_11555;field_61149:Lcom/mojang/serialization/Codec;official aLazp;a:Lcom/mojang/serialization/Codec;
-
ANY_CODEC
- Mappings:
Namespace Name Mixin selector named ANY_CODECLnet/minecraft/resource/PackVersion;ANY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_61150Lnet/minecraft/class_11555;field_61150:Lcom/mojang/serialization/Codec;official bLazp;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
PackVersion
public PackVersion(int int2, int int3)
-
-
Method Details
-
createCodec
- Mappings:
Namespace Name Mixin selector named createCodecLnet/minecraft/resource/PackVersion;createCodec(I)Lcom/mojang/serialization/Codec;intermediary method_72328Lnet/minecraft/class_11555;method_72328(I)Lcom/mojang/serialization/Codec;official bLazp;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 validateLnet/minecraft/resource/PackVersion;validate(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;intermediary method_72327Lnet/minecraft/class_11555;method_72327(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;official aLazp;a(Ljava/util/List;ILjava/util/function/BiFunction;)Lcom/mojang/serialization/DataResult;
-
getLastOldPackVersion
- Mappings:
Namespace Name Mixin selector named getLastOldPackVersionLnet/minecraft/resource/PackVersion;getLastOldPackVersion(Lnet/minecraft/resource/ResourceType;)Iintermediary method_72325Lnet/minecraft/class_11555;method_72325(Lnet/minecraft/class_3264;)Iofficial aLazp;a(Lazd;)I
-
createRangeCodec
public static com.mojang.serialization.MapCodec<Range<PackVersion>> createRangeCodec(ResourceType type) - Mappings:
Namespace Name Mixin selector named createRangeCodecLnet/minecraft/resource/PackVersion;createRangeCodec(Lnet/minecraft/resource/ResourceType;)Lcom/mojang/serialization/MapCodec;intermediary method_72329Lnet/minecraft/class_11555;method_72329(Lnet/minecraft/class_3264;)Lcom/mojang/serialization/MapCodec;official bLazp;b(Lazd;)Lcom/mojang/serialization/MapCodec;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/resource/PackVersion;of(II)Lnet/minecraft/resource/PackVersion;intermediary method_72320Lnet/minecraft/class_11555;method_72320(II)Lnet/minecraft/class_11555;official aLazp;a(II)Lazp;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/resource/PackVersion;of(I)Lnet/minecraft/resource/PackVersion;intermediary method_72319Lnet/minecraft/class_11555;method_72319(I)Lnet/minecraft/class_11555;official aLazp;a(I)Lazp;
-
majorRange
- Mappings:
Namespace Name Mixin selector named majorRangeLnet/minecraft/resource/PackVersion;majorRange()Lnet/minecraft/util/dynamic/Range;intermediary method_72318Lnet/minecraft/class_11555;method_72318()Lnet/minecraft/class_6497;official aLazp;a()Lbez;
-
compareTo
- Specified by:
compareToin interfaceComparable<PackVersion>- Mappings:
Namespace Name Mixin selector named compareToLnet/minecraft/resource/PackVersion;compareTo(Lnet/minecraft/resource/PackVersion;)Iintermediary method_72326Lnet/minecraft/class_11555;method_72326(Lnet/minecraft/class_11555;)Iofficial aLazp;a(Lazp;)I
-
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 '=='. -
major
public int major()Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-
minor
public int minor()Returns the value of theminorrecord component.- Returns:
- the value of the
minorrecord component
-