Package net.minecraft.util.dynamic
Record Class Range<T extends Comparable<T>>
java.lang.Object
java.lang.Record
net.minecraft.util.dynamic.Range<T>
- Record Components:
minInclusive-maxInclusive-
public record Range<T extends Comparable<T>>(T extends Comparable<T> minInclusive, T extends Comparable<T> maxInclusive)
extends Record
- Mappings:
Namespace Name named net/minecraft/util/dynamic/Rangeintermediary net/minecraft/class_6497official aygnamed minInclusiveintermediary comp_1official bnamed maxInclusiveintermediary comp_2official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TThe field for themaxInclusiverecord component.private final TThe field for theminInclusiverecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanstatic <T extends Comparable<T>>
com.mojang.serialization.Codec<Range<T>> createCodec(com.mojang.serialization.Codec<T> elementCodec) static <T extends Comparable<T>>
com.mojang.serialization.Codec<Range<T>> createRangedCodec(com.mojang.serialization.Codec<T> codec, T minInclusive, T maxInclusive) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxInclusiverecord component.Returns the value of theminInclusiverecord component.toString()Returns a string representation of this record class.static <T extends Comparable<T>>
com.mojang.serialization.DataResult<Range<T>> validate(T minInclusive, T maxInclusive)
-
Field Details
-
minInclusive
The field for theminInclusiverecord component. -
maxInclusive
The field for themaxInclusiverecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/util/dynamic/Range;CODEC:Lcom/mojang/serialization/Codec;intermediary field_34390Lnet/minecraft/class_6497;field_34390:Lcom/mojang/serialization/Codec;official aLayg;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Range
Creates an instance of aRangerecord class.- Parameters:
minInclusive- the value for theminInclusiverecord componentmaxInclusive- the value for themaxInclusiverecord component
-
Range
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/util/dynamic/Range;<init>(Ljava/lang/Comparable;)Vintermediary <init>Lnet/minecraft/class_6497;<init>(Ljava/lang/Comparable;)Vofficial <init>Layg;<init>(Ljava/lang/Comparable;)V
-
-
Method Details
-
createCodec
public static <T extends Comparable<T>> com.mojang.serialization.Codec<Range<T>> createCodec(com.mojang.serialization.Codec<T> elementCodec) - Mappings:
Namespace Name Mixin selector named createCodecLnet/minecraft/util/dynamic/Range;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_37953Lnet/minecraft/class_6497;method_37953(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;official aLayg;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
createRangedCodec
public static <T extends Comparable<T>> com.mojang.serialization.Codec<Range<T>> createRangedCodec(com.mojang.serialization.Codec<T> codec, T minInclusive, T maxInclusive) - Mappings:
Namespace Name Mixin selector named createRangedCodecLnet/minecraft/util/dynamic/Range;createRangedCodec(Lcom/mojang/serialization/Codec;Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/Codec;intermediary method_37954Lnet/minecraft/class_6497;method_37954(Lcom/mojang/serialization/Codec;Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/Codec;official aLayg;a(Lcom/mojang/serialization/Codec;Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/Codec;
-
validate
public static <T extends Comparable<T>> com.mojang.serialization.DataResult<Range<T>> validate(T minInclusive, T maxInclusive) - Mappings:
Namespace Name Mixin selector named validateLnet/minecraft/util/dynamic/Range;validate(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;intermediary method_37956Lnet/minecraft/class_6497;method_37956(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;official aLayg;a(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;
-
contains
- Mappings:
Namespace Name Mixin selector named containsLnet/minecraft/util/dynamic/Range;contains(Ljava/lang/Comparable;)Zintermediary method_37955Lnet/minecraft/class_6497;method_37955(Ljava/lang/Comparable;)Zofficial aLayg;a(Ljava/lang/Comparable;)Z
-
contains
- Mappings:
Namespace Name Mixin selector named containsLnet/minecraft/util/dynamic/Range;contains(Lnet/minecraft/util/dynamic/Range;)Zintermediary method_37952Lnet/minecraft/class_6497;method_37952(Lnet/minecraft/class_6497;)Zofficial aLayg;a(Layg;)Z
-
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 withObjects::equals(Object,Object). -
minInclusive
Returns the value of theminInclusiverecord component.- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
Returns the value of themaxInclusiverecord component.- Returns:
- the value of the
maxInclusiverecord component
-