记录类 DensityFunctions.RangeChoice

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.RangeChoice
所有已实现的接口:
DensityFunction
封闭类:
DensityFunctions

static record DensityFunctions.RangeChoice(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange) extends Record implements DensityFunction
  • 字段详细资料

    • input

      private final DensityFunction input
      input 记录组件的字段。
    • minInclusive

      private final double minInclusive
      minInclusive 记录组件的字段。
    • maxExclusive

      private final double maxExclusive
      maxExclusive 记录组件的字段。
    • whenInRange

      private final DensityFunction whenInRange
      whenInRange 记录组件的字段。
    • whenOutOfRange

      private final DensityFunction whenOutOfRange
      whenOutOfRange 记录组件的字段。
    • DATA_CODEC

      public static final com.mojang.serialization.MapCodec<DensityFunctions.RangeChoice> DATA_CODEC
    • CODEC

  • 构造器详细资料

    • RangeChoice

      RangeChoice(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange)
      创建 RangeChoice 记录类的实例。
      参数:
      input - input 记录组件的值
      minInclusive - minInclusive 记录组件的值
      maxExclusive - maxExclusive 记录组件的值
      whenInRange - whenInRange 记录组件的值
      whenOutOfRange - whenOutOfRange 记录组件的值
  • 方法详细资料

    • compute

      public double compute(DensityFunction.FunctionContext p_208839_)
      指定者:
      compute 在接口中 DensityFunction
    • fillArray

      public void fillArray(double[] p_208843_, DensityFunction.ContextProvider p_208844_)
      指定者:
      fillArray 在接口中 DensityFunction
    • mapAll

      public DensityFunction mapAll(DensityFunction.Visitor p_208841_)
      指定者:
      mapAll 在接口中 DensityFunction
    • minValue

      public double minValue()
      指定者:
      minValue 在接口中 DensityFunction
    • maxValue

      public double maxValue()
      指定者:
      maxValue 在接口中 DensityFunction
    • codec

      public KeyDispatchDataCodec<? extends DensityFunction> codec()
      指定者:
      codec 在接口中 DensityFunction
    • toString

      public final String toString()
      返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用 Objects::equals(Object,Object) 对参考组件进行比较;使用 '==' 对基元组件进行比较
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • input

      public DensityFunction input()
      返回 input 记录组件的值。
      返回:
      input 记录组件的值
    • minInclusive

      public double minInclusive()
      返回 minInclusive 记录组件的值。
      返回:
      minInclusive 记录组件的值
    • maxExclusive

      public double maxExclusive()
      返回 maxExclusive 记录组件的值。
      返回:
      maxExclusive 记录组件的值
    • whenInRange

      public DensityFunction whenInRange()
      返回 whenInRange 记录组件的值。
      返回:
      whenInRange 记录组件的值
    • whenOutOfRange

      public DensityFunction whenOutOfRange()
      返回 whenOutOfRange 记录组件的值。
      返回:
      whenOutOfRange 记录组件的值