Record Class VegetationPatchConfiguration

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.VegetationPatchConfiguration
All Implemented Interfaces:
FeatureConfiguration

public record VegetationPatchConfiguration(HolderSet<Block> replaceable, BlockStateProvider groundState, Holder<PlacedFeature> vegetationFeature, CaveSurface surface, IntProvider depth, float extraBottomBlockChance, int verticalRange, float vegetationChance, IntProvider xzRadius, float extraEdgeColumnChance) extends Record implements FeatureConfiguration
  • Field Details

    • replaceable

      private final HolderSet<Block> replaceable
      The field for the replaceable record component.
    • groundState

      private final BlockStateProvider groundState
      The field for the groundState record component.
    • vegetationFeature

      private final Holder<PlacedFeature> vegetationFeature
      The field for the vegetationFeature record component.
    • surface

      private final CaveSurface surface
      The field for the surface record component.
    • depth

      private final IntProvider depth
      The field for the depth record component.
    • extraBottomBlockChance

      private final float extraBottomBlockChance
      The field for the extraBottomBlockChance record component.
    • verticalRange

      private final int verticalRange
      The field for the verticalRange record component.
    • vegetationChance

      private final float vegetationChance
      The field for the vegetationChance record component.
    • xzRadius

      private final IntProvider xzRadius
      The field for the xzRadius record component.
    • extraEdgeColumnChance

      private final float extraEdgeColumnChance
      The field for the extraEdgeColumnChance record component.
    • CODEC

      public static final com.mojang.serialization.Codec<VegetationPatchConfiguration> CODEC
  • Constructor Details

    • VegetationPatchConfiguration

      public VegetationPatchConfiguration(HolderSet<Block> replaceable, BlockStateProvider groundState, Holder<PlacedFeature> vegetationFeature, CaveSurface surface, IntProvider depth, float extraBottomBlockChance, int verticalRange, float vegetationChance, IntProvider xzRadius, float extraEdgeColumnChance)
      Creates an instance of a VegetationPatchConfiguration record class.
      Parameters:
      replaceable - the value for the replaceable record component
      groundState - the value for the groundState record component
      vegetationFeature - the value for the vegetationFeature record component
      surface - the value for the surface record component
      depth - the value for the depth record component
      extraBottomBlockChance - the value for the extraBottomBlockChance record component
      verticalRange - the value for the verticalRange record component
      vegetationChance - the value for the vegetationChance record component
      xzRadius - the value for the xzRadius record component
      extraEdgeColumnChance - the value for the extraEdgeColumnChance 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.
    • replaceable

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

      public BlockStateProvider groundState()
      Returns the value of the groundState record component.
      Returns:
      the value of the groundState record component
    • vegetationFeature

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

      public CaveSurface surface()
      Returns the value of the surface record component.
      Returns:
      the value of the surface record component
    • depth

      public IntProvider depth()
      Returns the value of the depth record component.
      Returns:
      the value of the depth record component
    • extraBottomBlockChance

      public float extraBottomBlockChance()
      Returns the value of the extraBottomBlockChance record component.
      Returns:
      the value of the extraBottomBlockChance record component
    • verticalRange

      public int verticalRange()
      Returns the value of the verticalRange record component.
      Returns:
      the value of the verticalRange record component
    • vegetationChance

      public float vegetationChance()
      Returns the value of the vegetationChance record component.
      Returns:
      the value of the vegetationChance record component
    • xzRadius

      public IntProvider xzRadius()
      Returns the value of the xzRadius record component.
      Returns:
      the value of the xzRadius record component
    • extraEdgeColumnChance

      public float extraEdgeColumnChance()
      Returns the value of the extraEdgeColumnChance record component.
      Returns:
      the value of the extraEdgeColumnChance record component