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 Details

    • treeFeature

      private final Holder<PlacedFeature> treeFeature
      The field for the treeFeature record component.
    • requiredVerticalSpaceForTree

      private final int requiredVerticalSpaceForTree
      The field for the requiredVerticalSpaceForTree record component.
    • levelTestDistance

      private final int levelTestDistance
      The field for the levelTestDistance record component.
    • maxLevelDeviation

      private final int maxLevelDeviation
      The field for the maxLevelDeviation record component.
    • rootRadius

      private final int rootRadius
      The field for the rootRadius record component.
    • rootReplaceable

      private final HolderSet<Block> rootReplaceable
      The field for the rootReplaceable record component.
    • rootStateProvider

      private final BlockStateProvider rootStateProvider
      The field for the rootStateProvider record component.
    • rootPlacementAttempts

      private final int rootPlacementAttempts
      The field for the rootPlacementAttempts record component.
    • rootColumnMaxHeight

      private final int rootColumnMaxHeight
      The field for the rootColumnMaxHeight record component.
    • hangingRootRadius

      private final int hangingRootRadius
      The field for the hangingRootRadius record component.
    • hangingRootsVerticalSpan

      private final int hangingRootsVerticalSpan
      The field for the hangingRootsVerticalSpan record component.
    • hangingRootStateProvider

      private final BlockStateProvider hangingRootStateProvider
      The field for the hangingRootStateProvider record component.
    • hangingRootPlacementAttempts

      private final int hangingRootPlacementAttempts
      The field for the hangingRootPlacementAttempts record component.
    • allowedVerticalWaterForTree

      private final int allowedVerticalWaterForTree
      The field for the allowedVerticalWaterForTree record component.
    • allowedTreePosition

      private final BlockPredicate allowedTreePosition
      The field for the allowedTreePosition record component.
    • CODEC

      public static final com.mojang.serialization.Codec<RootSystemConfiguration> 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 a RootSystemConfiguration record class.
      Parameters:
      treeFeature - the value for the treeFeature record component
      requiredVerticalSpaceForTree - the value for the requiredVerticalSpaceForTree record component
      levelTestDistance - the value for the levelTestDistance record component
      maxLevelDeviation - the value for the maxLevelDeviation record component
      rootRadius - the value for the rootRadius record component
      rootReplaceable - the value for the rootReplaceable record component
      rootStateProvider - the value for the rootStateProvider record component
      rootPlacementAttempts - the value for the rootPlacementAttempts record component
      rootColumnMaxHeight - the value for the rootColumnMaxHeight record component
      hangingRootRadius - the value for the hangingRootRadius record component
      hangingRootsVerticalSpan - the value for the hangingRootsVerticalSpan record component
      hangingRootStateProvider - the value for the hangingRootStateProvider record component
      hangingRootPlacementAttempts - the value for the hangingRootPlacementAttempts record component
      allowedVerticalWaterForTree - the value for the allowedVerticalWaterForTree record component
      allowedTreePosition - the value for the allowedTreePosition record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • treeFeature

      public Holder<PlacedFeature> treeFeature()
      Returns the value of the treeFeature record component.
      Returns:
      the value of the treeFeature record component
    • requiredVerticalSpaceForTree

      public int requiredVerticalSpaceForTree()
      Returns the value of the requiredVerticalSpaceForTree record component.
      Returns:
      the value of the requiredVerticalSpaceForTree record component
    • levelTestDistance

      public int levelTestDistance()
      Returns the value of the levelTestDistance record component.
      Returns:
      the value of the levelTestDistance record component
    • maxLevelDeviation

      public int maxLevelDeviation()
      Returns the value of the maxLevelDeviation record component.
      Returns:
      the value of the maxLevelDeviation record component
    • rootRadius

      public int rootRadius()
      Returns the value of the rootRadius record component.
      Returns:
      the value of the rootRadius record component
    • rootReplaceable

      public HolderSet<Block> rootReplaceable()
      Returns the value of the rootReplaceable record component.
      Returns:
      the value of the rootReplaceable record component
    • rootStateProvider

      public BlockStateProvider rootStateProvider()
      Returns the value of the rootStateProvider record component.
      Returns:
      the value of the rootStateProvider record component
    • rootPlacementAttempts

      public int rootPlacementAttempts()
      Returns the value of the rootPlacementAttempts record component.
      Returns:
      the value of the rootPlacementAttempts record component
    • rootColumnMaxHeight

      public int rootColumnMaxHeight()
      Returns the value of the rootColumnMaxHeight record component.
      Returns:
      the value of the rootColumnMaxHeight record component
    • hangingRootRadius

      public int hangingRootRadius()
      Returns the value of the hangingRootRadius record component.
      Returns:
      the value of the hangingRootRadius record component
    • hangingRootsVerticalSpan

      public int hangingRootsVerticalSpan()
      Returns the value of the hangingRootsVerticalSpan record component.
      Returns:
      the value of the hangingRootsVerticalSpan record component
    • hangingRootStateProvider

      public BlockStateProvider hangingRootStateProvider()
      Returns the value of the hangingRootStateProvider record component.
      Returns:
      the value of the hangingRootStateProvider record component
    • hangingRootPlacementAttempts

      public int hangingRootPlacementAttempts()
      Returns the value of the hangingRootPlacementAttempts record component.
      Returns:
      the value of the hangingRootPlacementAttempts record component
    • allowedVerticalWaterForTree

      public int allowedVerticalWaterForTree()
      Returns the value of the allowedVerticalWaterForTree record component.
      Returns:
      the value of the allowedVerticalWaterForTree record component
    • allowedTreePosition

      public BlockPredicate allowedTreePosition()
      Returns the value of the allowedTreePosition record component.
      Returns:
      the value of the allowedTreePosition record component