Class MinMaxBounds<T extends Number>

java.lang.Object
net.minecraft.advancements.critereon.MinMaxBounds<T>
Direct Known Subclasses:
MinMaxBounds.Doubles, MinMaxBounds.Ints

public abstract class MinMaxBounds<T extends Number> extends Object
  • Field Details

    • ERROR_EMPTY

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EMPTY
    • ERROR_SWAPPED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SWAPPED
    • min

      @Nullable protected final T extends Number min
    • max

      @Nullable protected final T extends Number max
  • Constructor Details

    • MinMaxBounds

      protected MinMaxBounds(@Nullable T p_55303_, @Nullable T p_55304_)
  • Method Details

    • getMin

      @Nullable public T getMin()
    • getMax

      @Nullable public T getMax()
    • isAny

      public boolean isAny()
    • serializeToJson

      public com.google.gson.JsonElement serializeToJson()
    • fromJson

      protected static <T extends Number, R extends MinMaxBounds<T>> R fromJson(@Nullable com.google.gson.JsonElement p_55307_, R p_55308_, BiFunction<com.google.gson.JsonElement,String,T> p_55309_, MinMaxBounds.BoundsFactory<T,R> p_55310_)
    • fromReader

      protected static <T extends Number, R extends MinMaxBounds<T>> R fromReader(com.mojang.brigadier.StringReader p_55314_, MinMaxBounds.BoundsFromReaderFactory<T,R> p_55315_, Function<String,T> p_55316_, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_55317_, Function<T,T> p_55318_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readNumber

      @Nullable private static <T extends Number> T readNumber(com.mojang.brigadier.StringReader p_55320_, Function<String,T> p_55321_, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_55322_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • isAllowedInputChat

      private static boolean isAllowedInputChat(com.mojang.brigadier.StringReader p_55312_)
    • optionallyFormat

      @Nullable private static <T> T optionallyFormat(@Nullable T p_55324_, Function<T,T> p_55325_)