Record Class RootSystemConfiguration
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.RootSystemConfiguration
- All Implemented Interfaces:
FeatureConfiguration
public record RootSystemConfiguration(Holder<PlacedFeature> treeFeature, int requiredVerticalSpaceForTree, int levelTestDistance, int maxLevelDeviation, int rootRadius, HolderSet<Block> rootReplaceable, BlockStateProvider rootStateProvider, int rootPlacementAttempts, int rootColumnMaxHeight, int hangingRootRadius, int hangingRootsVerticalSpan, BlockStateProvider hangingRootStateProvider, int hangingRootPlacementAttempts, int allowedVerticalWaterForTree, BlockPredicate allowedTreePosition)
extends Record
implements FeatureConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockPredicateThe field for theallowedTreePositionrecord component.private final intThe field for theallowedVerticalWaterForTreerecord component.static final com.mojang.serialization.Codec<RootSystemConfiguration> private final intThe field for thehangingRootPlacementAttemptsrecord component.private final intThe field for thehangingRootRadiusrecord component.private final BlockStateProviderThe field for thehangingRootStateProviderrecord component.private final intThe field for thehangingRootsVerticalSpanrecord component.private final intThe field for thelevelTestDistancerecord component.private final intThe field for themaxLevelDeviationrecord component.private final intThe field for therequiredVerticalSpaceForTreerecord component.private final intThe field for therootColumnMaxHeightrecord component.private final intThe field for therootPlacementAttemptsrecord component.private final intThe field for therootRadiusrecord component.The field for therootReplaceablerecord component.private final BlockStateProviderThe field for therootStateProviderrecord component.private final Holder<PlacedFeature> The field for thetreeFeaturerecord component.Fields inherited from interface FeatureConfiguration
NONE -
Constructor Summary
ConstructorsConstructorDescriptionRootSystemConfiguration(Holder<PlacedFeature> treeFeature, int requiredVerticalSpaceForTree, int levelTestDistance, int maxLevelDeviation, int rootRadius, HolderSet<Block> rootReplaceable, BlockStateProvider rootStateProvider, int rootPlacementAttempts, int rootColumnMaxHeight, int hangingRootRadius, int hangingRootsVerticalSpan, BlockStateProvider hangingRootStateProvider, int hangingRootPlacementAttempts, int allowedVerticalWaterForTree, BlockPredicate allowedTreePosition) Creates an instance of aRootSystemConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedTreePositionrecord component.intReturns the value of theallowedVerticalWaterForTreerecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thehangingRootPlacementAttemptsrecord component.intReturns the value of thehangingRootRadiusrecord component.Returns the value of thehangingRootStateProviderrecord component.intReturns the value of thehangingRootsVerticalSpanrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelevelTestDistancerecord component.intReturns the value of themaxLevelDeviationrecord component.intReturns the value of therequiredVerticalSpaceForTreerecord component.intReturns the value of therootColumnMaxHeightrecord component.intReturns the value of therootPlacementAttemptsrecord component.intReturns the value of therootRadiusrecord component.Returns the value of therootReplaceablerecord component.Returns the value of therootStateProviderrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetreeFeaturerecord component.Methods inherited from interface FeatureConfiguration
getSubFeatures
-
Field Details
-
treeFeature
The field for thetreeFeaturerecord component. -
requiredVerticalSpaceForTree
private final int requiredVerticalSpaceForTreeThe field for therequiredVerticalSpaceForTreerecord component. -
levelTestDistance
private final int levelTestDistanceThe field for thelevelTestDistancerecord component. -
maxLevelDeviation
private final int maxLevelDeviationThe field for themaxLevelDeviationrecord component. -
rootRadius
private final int rootRadiusThe field for therootRadiusrecord component. -
rootReplaceable
-
rootStateProvider
The field for therootStateProviderrecord component. -
rootPlacementAttempts
private final int rootPlacementAttemptsThe field for therootPlacementAttemptsrecord component. -
rootColumnMaxHeight
private final int rootColumnMaxHeightThe field for therootColumnMaxHeightrecord component. -
hangingRootRadius
private final int hangingRootRadiusThe field for thehangingRootRadiusrecord component. -
hangingRootsVerticalSpan
private final int hangingRootsVerticalSpanThe field for thehangingRootsVerticalSpanrecord component. -
hangingRootStateProvider
The field for thehangingRootStateProviderrecord component. -
hangingRootPlacementAttempts
private final int hangingRootPlacementAttemptsThe field for thehangingRootPlacementAttemptsrecord component. -
allowedVerticalWaterForTree
private final int allowedVerticalWaterForTreeThe field for theallowedVerticalWaterForTreerecord component. -
allowedTreePosition
The field for theallowedTreePositionrecord component. -
CODEC
-
-
Constructor Details
-
RootSystemConfiguration
public RootSystemConfiguration(Holder<PlacedFeature> treeFeature, int requiredVerticalSpaceForTree, int levelTestDistance, int maxLevelDeviation, int rootRadius, HolderSet<Block> rootReplaceable, BlockStateProvider rootStateProvider, int rootPlacementAttempts, int rootColumnMaxHeight, int hangingRootRadius, int hangingRootsVerticalSpan, BlockStateProvider hangingRootStateProvider, int hangingRootPlacementAttempts, int allowedVerticalWaterForTree, BlockPredicate allowedTreePosition) Creates an instance of aRootSystemConfigurationrecord class.- Parameters:
treeFeature- the value for thetreeFeaturerecord componentrequiredVerticalSpaceForTree- the value for therequiredVerticalSpaceForTreerecord componentlevelTestDistance- the value for thelevelTestDistancerecord componentmaxLevelDeviation- the value for themaxLevelDeviationrecord componentrootRadius- the value for therootRadiusrecord componentrootReplaceable- the value for therootReplaceablerecord componentrootStateProvider- the value for therootStateProviderrecord componentrootPlacementAttempts- the value for therootPlacementAttemptsrecord componentrootColumnMaxHeight- the value for therootColumnMaxHeightrecord componenthangingRootRadius- the value for thehangingRootRadiusrecord componenthangingRootsVerticalSpan- the value for thehangingRootsVerticalSpanrecord componenthangingRootStateProvider- the value for thehangingRootStateProviderrecord componenthangingRootPlacementAttempts- the value for thehangingRootPlacementAttemptsrecord componentallowedVerticalWaterForTree- the value for theallowedVerticalWaterForTreerecord componentallowedTreePosition- the value for theallowedTreePositionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
treeFeature
Returns the value of thetreeFeaturerecord component.- Returns:
- the value of the
treeFeaturerecord component
-
requiredVerticalSpaceForTree
public int requiredVerticalSpaceForTree()Returns the value of therequiredVerticalSpaceForTreerecord component.- Returns:
- the value of the
requiredVerticalSpaceForTreerecord component
-
levelTestDistance
public int levelTestDistance()Returns the value of thelevelTestDistancerecord component.- Returns:
- the value of the
levelTestDistancerecord component
-
maxLevelDeviation
public int maxLevelDeviation()Returns the value of themaxLevelDeviationrecord component.- Returns:
- the value of the
maxLevelDeviationrecord component
-
rootRadius
public int rootRadius()Returns the value of therootRadiusrecord component.- Returns:
- the value of the
rootRadiusrecord component
-
rootReplaceable
-
rootStateProvider
Returns the value of therootStateProviderrecord component.- Returns:
- the value of the
rootStateProviderrecord component
-
rootPlacementAttempts
public int rootPlacementAttempts()Returns the value of therootPlacementAttemptsrecord component.- Returns:
- the value of the
rootPlacementAttemptsrecord component
-
rootColumnMaxHeight
public int rootColumnMaxHeight()Returns the value of therootColumnMaxHeightrecord component.- Returns:
- the value of the
rootColumnMaxHeightrecord component
-
hangingRootRadius
public int hangingRootRadius()Returns the value of thehangingRootRadiusrecord component.- Returns:
- the value of the
hangingRootRadiusrecord component
-
hangingRootsVerticalSpan
public int hangingRootsVerticalSpan()Returns the value of thehangingRootsVerticalSpanrecord component.- Returns:
- the value of the
hangingRootsVerticalSpanrecord component
-
hangingRootStateProvider
Returns the value of thehangingRootStateProviderrecord component.- Returns:
- the value of the
hangingRootStateProviderrecord component
-
hangingRootPlacementAttempts
public int hangingRootPlacementAttempts()Returns the value of thehangingRootPlacementAttemptsrecord component.- Returns:
- the value of the
hangingRootPlacementAttemptsrecord component
-
allowedVerticalWaterForTree
public int allowedVerticalWaterForTree()Returns the value of theallowedVerticalWaterForTreerecord component.- Returns:
- the value of the
allowedVerticalWaterForTreerecord component
-
allowedTreePosition
Returns the value of theallowedTreePositionrecord component.- Returns:
- the value of the
allowedTreePositionrecord component
-