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
official ais
intermediary net/minecraft/class_6497
named net/minecraft/util/dynamic/Range
official b
intermediary comp_1
named minInclusive
official c
intermediary comp_2
named maxInclusive
  • Field Details

    • minInclusive

      private final T extends Comparable<T> minInclusive
      The field for the minInclusive record component.
    • maxInclusive

      private final T extends Comparable<T> maxInclusive
      The field for the maxInclusive record component.
    • CODEC

      public static final com.mojang.serialization.Codec<Range<Integer>> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lais;a:Lcom/mojang/serialization/Codec;
      intermediary field_34390 Lnet/minecraft/class_6497;field_34390:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/util/dynamic/Range;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • Range

      public Range(T minInclusive, T maxInclusive)
      Creates an instance of a Range record class.
      Parameters:
      minInclusive - the value for the minInclusive record component
      maxInclusive - the value for the maxInclusive record component
  • 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
      official a Lais;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_37953 Lnet/minecraft/class_6497;method_37953(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/util/dynamic/Range;createCodec(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
      official a Lais;a(Lcom/mojang/serialization/Codec;Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/Codec;
      intermediary method_37954 Lnet/minecraft/class_6497;method_37954(Lcom/mojang/serialization/Codec;Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/Codec;
      named createRangedCodec Lnet/minecraft/util/dynamic/Range;createRangedCodec(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
      official a Lais;a(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;
      intermediary method_37956 Lnet/minecraft/class_6497;method_37956(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;
      named validate Lnet/minecraft/util/dynamic/Range;validate(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/mojang/serialization/DataResult;
    • contains

      public boolean contains(T value)
      Mappings:
      Namespace Name Mixin selector
      official a Lais;a(Ljava/lang/Comparable;)Z
      intermediary method_37955 Lnet/minecraft/class_6497;method_37955(Ljava/lang/Comparable;)Z
      named contains Lnet/minecraft/util/dynamic/Range;contains(Ljava/lang/Comparable;)Z
    • contains

      public boolean contains(Range<T> other)
      Mappings:
      Namespace Name Mixin selector
      official a Lais;a(Lais;)Z
      intermediary method_37952 Lnet/minecraft/class_6497;method_37952(Lnet/minecraft/class_6497;)Z
      named contains Lnet/minecraft/util/dynamic/Range;contains(Lnet/minecraft/util/dynamic/Range;)Z
    • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • minInclusive

      public T minInclusive()
      Returns the value of the minInclusive record component.
      Returns:
      the value of the minInclusive record component
    • maxInclusive

      public T maxInclusive()
      Returns the value of the maxInclusive record component.
      Returns:
      the value of the maxInclusive record component