类 WrappedMinMaxBounds

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

public class WrappedMinMaxBounds extends Object
  • 字段详细资料

    • ANY

      public static final WrappedMinMaxBounds ANY
    • ERROR_INTS_ONLY

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

      @Nullable private final Float min
    • max

      @Nullable private final Float max
  • 构造器详细资料

    • WrappedMinMaxBounds

      public WrappedMinMaxBounds(@Nullable Float pMin, @Nullable Float pMax)
  • 方法详细资料

    • exactly

      public static WrappedMinMaxBounds exactly(float pValue)
    • between

      public static WrappedMinMaxBounds between(float pMin, float pMax)
    • atLeast

      public static WrappedMinMaxBounds atLeast(float pMin)
    • atMost

      public static WrappedMinMaxBounds atMost(float pMax)
    • matches

      public boolean matches(float pValue)
    • matchesSqr

      public boolean matchesSqr(double pValue)
    • 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 pJson)
    • fromReader

      public static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader pReader, boolean pIsFloatingPoint) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • fromReader

      public static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader pReader, boolean pIsFloatingPoint, Function<Float,Float> pValueFactory) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readNumber

      @Nullable private static Float readNumber(com.mojang.brigadier.StringReader pReader, boolean pIsFloatingPoint) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • isAllowedNumber

      private static boolean isAllowedNumber(com.mojang.brigadier.StringReader pReader, boolean pIsFloatingPoint)
    • optionallyFormat

      @Nullable private static Float optionallyFormat(@Nullable Float pValue, Function<Float,Float> pValueFactory)