Class WrappedMinMaxBounds

java.lang.Object
net.minecraft.advancements.critereon.WrappedMinMaxBounds

public class WrappedMinMaxBounds extends Object
  • Field Details

    • ANY

      public static final WrappedMinMaxBounds ANY
    • ERROR_INTS_ONLY

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

      private final Float min
    • max

      private final Float max
  • Constructor Details

    • WrappedMinMaxBounds

      public WrappedMinMaxBounds(@Nullable Float p_75356_, @Nullable Float p_75357_)
  • Method Details

    • exactly

      public static WrappedMinMaxBounds exactly(float p_164403_)
    • between

      public static WrappedMinMaxBounds between(float p_164405_, float p_164406_)
    • atLeast

      public static WrappedMinMaxBounds atLeast(float p_164415_)
    • atMost

      public static WrappedMinMaxBounds atMost(float p_164418_)
    • matches

      public boolean matches(float p_164420_)
    • matchesSqr

      public boolean matchesSqr(double p_164401_)
    • getMin

      @Nullable public Float getMin()
    • getMax

      @Nullable public Float getMax()
    • serializeToJson

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

      public static WrappedMinMaxBounds fromJson(@Nullable com.google.gson.JsonElement p_164408_)
    • fromReader

      public static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader p_164410_, boolean p_164411_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • fromReader

      public static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader p_75360_, boolean p_75361_, Function<Float,​Float> p_75362_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readNumber

      @Nullable private static Float readNumber(com.mojang.brigadier.StringReader p_75368_, boolean p_75369_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • isAllowedNumber

      private static boolean isAllowedNumber(com.mojang.brigadier.StringReader p_75371_, boolean p_75372_)
    • optionallyFormat

      @Nullable private static Float optionallyFormat(@Nullable Float p_75364_, Function<Float,​Float> p_75365_)