记录类 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
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
-
字段概要
字段修饰符和类型字段说明static final KeyDispatchDataCodec
<DensityFunctions.RangeChoice> static final com.mojang.serialization.MapCodec
<DensityFunctions.RangeChoice> private final DensityFunction
input
记录组件的字段。private final double
maxExclusive
记录组件的字段。private final double
minInclusive
记录组件的字段。private final DensityFunction
whenInRange
记录组件的字段。private final DensityFunction
whenOutOfRange
记录组件的字段。从接口继承的字段 net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC
-
构造器概要
构造器构造器说明RangeChoice
(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange) 创建RangeChoice
记录类的实例。 -
方法概要
修饰符和类型方法说明KeyDispatchDataCodec
<? extends DensityFunction> codec()
double
compute
(DensityFunction.FunctionContext p_208839_) final boolean
指示某个其他对象是否“等于”此对象。void
fillArray
(double[] p_208843_, DensityFunction.ContextProvider p_208844_) final int
hashCode()
返回此对象的哈希代码值。input()
返回input
记录组件的值。mapAll
(DensityFunction.Visitor p_208841_) double
返回maxExclusive
记录组件的值。double
maxValue()
double
返回minInclusive
记录组件的值。double
minValue()
final String
toString()
返回此记录类的字符串表示形式。返回whenInRange
记录组件的值。返回whenOutOfRange
记录组件的值。从接口继承的方法 net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
-
字段详细资料
-
input
input
记录组件的字段。 -
minInclusive
private final double minInclusiveminInclusive
记录组件的字段。 -
maxExclusive
private final double maxExclusivemaxExclusive
记录组件的字段。 -
whenInRange
whenInRange
记录组件的字段。 -
whenOutOfRange
whenOutOfRange
记录组件的字段。 -
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
- 指定者:
compute
在接口中DensityFunction
-
fillArray
- 指定者:
fillArray
在接口中DensityFunction
-
mapAll
- 指定者:
mapAll
在接口中DensityFunction
-
minValue
public double minValue()- 指定者:
minValue
在接口中DensityFunction
-
maxValue
public double maxValue()- 指定者:
maxValue
在接口中DensityFunction
-
codec
- 指定者:
codec
在接口中DensityFunction
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
input
返回input
记录组件的值。- 返回:
input
记录组件的值
-
minInclusive
public double minInclusive()返回minInclusive
记录组件的值。- 返回:
minInclusive
记录组件的值
-
maxExclusive
public double maxExclusive()返回maxExclusive
记录组件的值。- 返回:
maxExclusive
记录组件的值
-
whenInRange
返回whenInRange
记录组件的值。- 返回:
whenInRange
记录组件的值
-
whenOutOfRange
返回whenOutOfRange
记录组件的值。- 返回:
whenOutOfRange
记录组件的值
-