Record Class MangroveRootPlacement

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.rootplacers.MangroveRootPlacement

public record MangroveRootPlacement(HolderSet<Block> canGrowThrough, HolderSet<Block> muddyRootsIn, BlockStateProvider muddyRootsProvider, int maxRootWidth, int maxRootLength, float randomSkewChance) extends Record
  • Field Details

    • canGrowThrough

      private final HolderSet<Block> canGrowThrough
      The field for the canGrowThrough record component.
    • muddyRootsIn

      private final HolderSet<Block> muddyRootsIn
      The field for the muddyRootsIn record component.
    • muddyRootsProvider

      private final BlockStateProvider muddyRootsProvider
      The field for the muddyRootsProvider record component.
    • maxRootWidth

      private final int maxRootWidth
      The field for the maxRootWidth record component.
    • maxRootLength

      private final int maxRootLength
      The field for the maxRootLength record component.
    • randomSkewChance

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

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

    • MangroveRootPlacement

      public MangroveRootPlacement(HolderSet<Block> canGrowThrough, HolderSet<Block> muddyRootsIn, BlockStateProvider muddyRootsProvider, int maxRootWidth, int maxRootLength, float randomSkewChance)
      Creates an instance of a MangroveRootPlacement record class.
      Parameters:
      canGrowThrough - the value for the canGrowThrough record component
      muddyRootsIn - the value for the muddyRootsIn record component
      muddyRootsProvider - the value for the muddyRootsProvider record component
      maxRootWidth - the value for the maxRootWidth record component
      maxRootLength - the value for the maxRootLength record component
      randomSkewChance - the value for the randomSkewChance 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 '=='.
      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.
    • canGrowThrough

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

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

      public BlockStateProvider muddyRootsProvider()
      Returns the value of the muddyRootsProvider record component.
      Returns:
      the value of the muddyRootsProvider record component
    • maxRootWidth

      public int maxRootWidth()
      Returns the value of the maxRootWidth record component.
      Returns:
      the value of the maxRootWidth record component
    • maxRootLength

      public int maxRootLength()
      Returns the value of the maxRootLength record component.
      Returns:
      the value of the maxRootLength record component
    • randomSkewChance

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