记录类 RandomPatchConfiguration
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.RandomPatchConfiguration
- 所有已实现的接口:
FeatureConfiguration
public record RandomPatchConfiguration(int tries, int xzSpread, int ySpread, Holder<PlacedFeature> feature)
extends Record
implements FeatureConfiguration
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<RandomPatchConfiguration> private final Holder
<PlacedFeature> feature
记录组件的字段。private final int
tries
记录组件的字段。private final int
xzSpread
记录组件的字段。private final int
ySpread
记录组件的字段。从接口继承的字段 net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration
NONE
-
构造器概要
构造器构造器说明RandomPatchConfiguration
(int tries, int xzSpread, int ySpread, Holder<PlacedFeature> feature) 创建RandomPatchConfiguration
记录类的实例。 -
方法概要
从接口继承的方法 net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration
getFeatures
-
字段详细资料
-
tries
private final int triestries
记录组件的字段。 -
xzSpread
private final int xzSpreadxzSpread
记录组件的字段。 -
ySpread
private final int ySpreadySpread
记录组件的字段。 -
feature
feature
记录组件的字段。 -
CODEC
-
-
构造器详细资料
-
RandomPatchConfiguration
public RandomPatchConfiguration(int tries, int xzSpread, int ySpread, Holder<PlacedFeature> feature) 创建RandomPatchConfiguration
记录类的实例。- 参数:
tries
-tries
记录组件的值xzSpread
-xzSpread
记录组件的值ySpread
-ySpread
记录组件的值feature
-feature
记录组件的值
-
-
方法详细资料
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
tries
public int tries()返回tries
记录组件的值。- 返回:
tries
记录组件的值
-
xzSpread
public int xzSpread()返回xzSpread
记录组件的值。- 返回:
xzSpread
记录组件的值
-
ySpread
public int ySpread()返回ySpread
记录组件的值。- 返回:
ySpread
记录组件的值
-
feature
返回feature
记录组件的值。- 返回:
feature
记录组件的值
-