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