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