Class NumberRange<T extends Number>

java.lang.Object
net.minecraft.predicate.NumberRange<T>
Direct Known Subclasses:
NumberRange.FloatRange, NumberRange.IntRange

public abstract class NumberRange<T extends Number> extends Object
Mappings:
Namespace Name
official ch
intermediary net/minecraft/class_2096
named net/minecraft/predicate/NumberRange
  • Field Details

    • EXCEPTION_EMPTY

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXCEPTION_EMPTY
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_9700 Lnet/minecraft/class_2096;field_9700:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      named EXCEPTION_EMPTY Lnet/minecraft/predicate/NumberRange;EXCEPTION_EMPTY:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • EXCEPTION_SWAPPED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXCEPTION_SWAPPED
      Mappings:
      Namespace Name Mixin selector
      official b Lch;b:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_9701 Lnet/minecraft/class_2096;field_9701:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      named EXCEPTION_SWAPPED Lnet/minecraft/predicate/NumberRange;EXCEPTION_SWAPPED:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • min

      protected final T extends Number min
      Mappings:
      Namespace Name Mixin selector
      official c Lch;c:Ljava/lang/Number;
      intermediary field_9702 Lnet/minecraft/class_2096;field_9702:Ljava/lang/Number;
      named min Lnet/minecraft/predicate/NumberRange;min:Ljava/lang/Number;
    • max

      protected final T extends Number max
      Mappings:
      Namespace Name Mixin selector
      official d Lch;d:Ljava/lang/Number;
      intermediary field_9699 Lnet/minecraft/class_2096;field_9699:Ljava/lang/Number;
      named max Lnet/minecraft/predicate/NumberRange;max:Ljava/lang/Number;
  • Constructor Details

    • NumberRange

      protected NumberRange(@Nullable T min, @Nullable T max)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lch;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
      intermediary <init> Lnet/minecraft/class_2096;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
      named <init> Lnet/minecraft/predicate/NumberRange;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
  • Method Details

    • getMin

      @Nullable public T getMin()
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a()Ljava/lang/Number;
      intermediary method_9038 Lnet/minecraft/class_2096;method_9038()Ljava/lang/Number;
      named getMin Lnet/minecraft/predicate/NumberRange;getMin()Ljava/lang/Number;
    • getMax

      @Nullable public T getMax()
      Mappings:
      Namespace Name Mixin selector
      official b Lch;b()Ljava/lang/Number;
      intermediary method_9042 Lnet/minecraft/class_2096;method_9042()Ljava/lang/Number;
      named getMax Lnet/minecraft/predicate/NumberRange;getMax()Ljava/lang/Number;
    • isDummy

      public boolean isDummy()
      Mappings:
      Namespace Name Mixin selector
      official c Lch;c()Z
      intermediary method_9041 Lnet/minecraft/class_2096;method_9041()Z
      named isDummy Lnet/minecraft/predicate/NumberRange;isDummy()Z
    • toJson

      public JsonElement toJson()
      Mappings:
      Namespace Name Mixin selector
      official d Lch;d()Lcom/google/gson/JsonElement;
      intermediary method_9036 Lnet/minecraft/class_2096;method_9036()Lcom/google/gson/JsonElement;
      named toJson Lnet/minecraft/predicate/NumberRange;toJson()Lcom/google/gson/JsonElement;
    • fromJson

      protected static <T extends Number, R extends NumberRange<T>> R fromJson(@Nullable @Nullable JsonElement json, R fallback, BiFunction<JsonElement,String,T> asNumber, NumberRange.Factory<T,R> factory)
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a(Lcom/google/gson/JsonElement;Lch;Ljava/util/function/BiFunction;Lch$a;)Lch;
      intermediary method_9039 Lnet/minecraft/class_2096;method_9039(Lcom/google/gson/JsonElement;Lnet/minecraft/class_2096;Ljava/util/function/BiFunction;Lnet/minecraft/class_2096$class_2097;)Lnet/minecraft/class_2096;
      named fromJson Lnet/minecraft/predicate/NumberRange;fromJson(Lcom/google/gson/JsonElement;Lnet/minecraft/predicate/NumberRange;Ljava/util/function/BiFunction;Lnet/minecraft/predicate/NumberRange$Factory;)Lnet/minecraft/predicate/NumberRange;
    • parse

      protected static <T extends Number, R extends NumberRange<T>> R parse(com.mojang.brigadier.StringReader commandReader, NumberRange.CommandFactory<T,R> commandFactory, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier, Function<T,T> mapper) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a(Lcom/mojang/brigadier/StringReader;Lch$b;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lch;
      intermediary method_9043 Lnet/minecraft/class_2096;method_9043(Lcom/mojang/brigadier/StringReader;Lnet/minecraft/class_2096$class_2098;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lnet/minecraft/class_2096;
      named parse Lnet/minecraft/predicate/NumberRange;parse(Lcom/mojang/brigadier/StringReader;Lnet/minecraft/predicate/NumberRange$CommandFactory;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lnet/minecraft/predicate/NumberRange;
    • fromStringReader

      @Nullable private static <T extends Number> T fromStringReader(com.mojang.brigadier.StringReader reader, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
      intermediary method_9037 Lnet/minecraft/class_2096;method_9037(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
      named fromStringReader Lnet/minecraft/predicate/NumberRange;fromStringReader(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
    • isNextCharValid

      private static boolean isNextCharValid(com.mojang.brigadier.StringReader reader)
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a(Lcom/mojang/brigadier/StringReader;)Z
      intermediary method_9040 Lnet/minecraft/class_2096;method_9040(Lcom/mojang/brigadier/StringReader;)Z
      named isNextCharValid Lnet/minecraft/predicate/NumberRange;isNextCharValid(Lcom/mojang/brigadier/StringReader;)Z
    • map

      @Nullable private static <T> T map(@Nullable T object, Function<T,T> function)
      Mappings:
      Namespace Name Mixin selector
      official a Lch;a(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
      intermediary method_9035 Lnet/minecraft/class_2096;method_9035(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
      named map Lnet/minecraft/predicate/NumberRange;map(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;