Record Class NumberRange.Bounds<T extends Number & Comparable<T>>

java.lang.Object
java.lang.Record
net.minecraft.predicate.NumberRange.Bounds<T>
Record Components:
min -
max -
Enclosing interface:
NumberRange<T extends Number & Comparable<T>>

public static record NumberRange.Bounds<T extends Number & Comparable<T>>(Optional<T extends Number & Comparable<T>> min, Optional<T extends Number & Comparable<T>> max) extends Record
Mappings:
Namespace Name
named net/minecraft/predicate/NumberRange$Bounds
intermediary net/minecraft/class_2096$class_11893
official cx$a
named min
intermediary comp_4769
official a
named max
intermediary comp_4770
official b
  • Field Details

  • Constructor Details

  • Method Details

    • isAny

      public boolean isAny()
      Mappings:
      Namespace Name Mixin selector
      named isAny Lnet/minecraft/predicate/NumberRange$Bounds;isAny()Z
      intermediary method_74108 Lnet/minecraft/class_2096$class_11893;method_74108()Z
      official a Lcx$a;a()Z
    • validate

      public com.mojang.serialization.DataResult<NumberRange.Bounds<T>> validate()
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/predicate/NumberRange$Bounds;validate()Lcom/mojang/serialization/DataResult;
      intermediary method_74120 Lnet/minecraft/class_2096$class_11893;method_74120()Lcom/mojang/serialization/DataResult;
      official b Lcx$a;b()Lcom/mojang/serialization/DataResult;
    • isSwapped

      public boolean isSwapped()
      Mappings:
      Namespace Name Mixin selector
      named isSwapped Lnet/minecraft/predicate/NumberRange$Bounds;isSwapped()Z
      intermediary method_74124 Lnet/minecraft/class_2096$class_11893;method_74124()Z
      official c Lcx$a;c()Z
    • getPoint

      public Optional<T> getPoint()
      Mappings:
      Namespace Name Mixin selector
      named getPoint Lnet/minecraft/predicate/NumberRange$Bounds;getPoint()Ljava/util/Optional;
      intermediary method_74126 Lnet/minecraft/class_2096$class_11893;method_74126()Ljava/util/Optional;
      official d Lcx$a;d()Ljava/util/Optional;
    • any

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> any()
      Mappings:
      Namespace Name Mixin selector
      named any Lnet/minecraft/predicate/NumberRange$Bounds;any()Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74127 Lnet/minecraft/class_2096$class_11893;method_74127()Lnet/minecraft/class_2096$class_11893;
      official e Lcx$a;e()Lcx$a;
    • exactly

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> exactly(T value)
      Mappings:
      Namespace Name Mixin selector
      named exactly Lnet/minecraft/predicate/NumberRange$Bounds;exactly(Ljava/lang/Number;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74116 Lnet/minecraft/class_2096$class_11893;method_74116(Ljava/lang/Number;)Lnet/minecraft/class_2096$class_11893;
      official a Lcx$a;a(Ljava/lang/Number;)Lcx$a;
    • between

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> between(T min, T max)
      Mappings:
      Namespace Name Mixin selector
      named between Lnet/minecraft/predicate/NumberRange$Bounds;between(Ljava/lang/Number;Ljava/lang/Number;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74117 Lnet/minecraft/class_2096$class_11893;method_74117(Ljava/lang/Number;Ljava/lang/Number;)Lnet/minecraft/class_2096$class_11893;
      official a Lcx$a;a(Ljava/lang/Number;Ljava/lang/Number;)Lcx$a;
    • atLeast

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> atLeast(T value)
      Mappings:
      Namespace Name Mixin selector
      named atLeast Lnet/minecraft/predicate/NumberRange$Bounds;atLeast(Ljava/lang/Number;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74123 Lnet/minecraft/class_2096$class_11893;method_74123(Ljava/lang/Number;)Lnet/minecraft/class_2096$class_11893;
      official b Lcx$a;b(Ljava/lang/Number;)Lcx$a;
    • atMost

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> atMost(T value)
      Mappings:
      Namespace Name Mixin selector
      named atMost Lnet/minecraft/predicate/NumberRange$Bounds;atMost(Ljava/lang/Number;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74125 Lnet/minecraft/class_2096$class_11893;method_74125(Ljava/lang/Number;)Lnet/minecraft/class_2096$class_11893;
      official c Lcx$a;c(Ljava/lang/Number;)Lcx$a;
    • map

      public <U extends Number & Comparable<U>> NumberRange.Bounds<U> map(Function<T,U> mappingFunction)
      Mappings:
      Namespace Name Mixin selector
      named map Lnet/minecraft/predicate/NumberRange$Bounds;map(Ljava/util/function/Function;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74119 Lnet/minecraft/class_2096$class_11893;method_74119(Ljava/util/function/Function;)Lnet/minecraft/class_2096$class_11893;
      official a Lcx$a;a(Ljava/util/function/Function;)Lcx$a;
    • createCodec

      static <T extends Number & Comparable<T>> com.mojang.serialization.Codec<NumberRange.Bounds<T>> createCodec(com.mojang.serialization.Codec<T> valueCodec)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/predicate/NumberRange$Bounds;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_74113 Lnet/minecraft/class_2096$class_11893;method_74113(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      official a Lcx$a;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
    • createPacketCodec

      static <B extends ByteBuf, T extends Number & Comparable<T>> PacketCodec<B,NumberRange.Bounds<T>> createPacketCodec(PacketCodec<B,T> valuePacketCodec)
      Mappings:
      Namespace Name Mixin selector
      named createPacketCodec Lnet/minecraft/predicate/NumberRange$Bounds;createPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
      intermediary method_74109 Lnet/minecraft/class_2096$class_11893;method_74109(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;
      official a Lcx$a;a(Laae;)Laae;
    • parse

      public static <T extends Number & Comparable<T>> NumberRange.Bounds<T> parse(com.mojang.brigadier.StringReader reader, Function<String,T> parsingFunction, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionSupplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/predicate/NumberRange$Bounds;parse(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Lnet/minecraft/predicate/NumberRange$Bounds;
      intermediary method_74111 Lnet/minecraft/class_2096$class_11893;method_74111(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Lnet/minecraft/class_2096$class_11893;
      official a Lcx$a;a(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Lcx$a;
    • parseNumber

      private static <T extends Number> Optional<T> parseNumber(com.mojang.brigadier.StringReader reader, Function<String,T> parsingFunction, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionSupplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parseNumber Lnet/minecraft/predicate/NumberRange$Bounds;parseNumber(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/util/Optional;
      intermediary method_74121 Lnet/minecraft/class_2096$class_11893;method_74121(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/util/Optional;
      official b Lcx$a;b(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/util/Optional;
    • shouldSkip

      private static boolean shouldSkip(com.mojang.brigadier.StringReader reader)
      Mappings:
      Namespace Name Mixin selector
      named shouldSkip Lnet/minecraft/predicate/NumberRange$Bounds;shouldSkip(Lcom/mojang/brigadier/StringReader;)Z
      intermediary method_74110 Lnet/minecraft/class_2096$class_11893;method_74110(Lcom/mojang/brigadier/StringReader;)Z
      official a Lcx$a;a(Lcom/mojang/brigadier/StringReader;)Z
    • 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<T> min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public Optional<T> max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component