Class MinMaxBounds<T extends Number>

java.lang.Object
net.minecraft.advancements.criterion.MinMaxBounds<T>
Direct Known Subclasses:
MinMaxBounds.FloatBound, MinMaxBounds.IntBound

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

      protected final T extends Number min
    • max

      protected final T extends Number max
  • Constructor Details

    • MinMaxBounds

      protected MinMaxBounds(@Nullable T p_i49720_1_, @Nullable T p_i49720_2_)
  • 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_211331_0_, R p_211331_1_, BiFunction<com.google.gson.JsonElement,String,T> p_211331_2_, MinMaxBounds.IBoundFactory<T,R> p_211331_3_)
    • fromReader

      protected static <T extends Number, R extends MinMaxBounds<T>> R fromReader(com.mojang.brigadier.StringReader p_211337_0_, MinMaxBounds.IBoundReader<T,R> p_211337_1_, Function<String,T> p_211337_2_, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_211337_3_, Function<T,T> p_211337_4_) 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_196975_0_, Function<String,T> p_196975_1_, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_196975_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • isAllowedInputChat

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

      @Nullable private static <T> T optionallyFormat(@Nullable T p_196972_0_, Function<T,T> p_196972_1_)