Record Class HugeMushroomFeatureConfiguration

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

public record HugeMushroomFeatureConfiguration(BlockStateProvider capProvider, BlockStateProvider stemProvider, int foliageRadius, BlockPredicate canPlaceOn) extends Record implements FeatureConfiguration
  • Field Details

    • capProvider

      private final BlockStateProvider capProvider
      The field for the capProvider record component.
    • stemProvider

      private final BlockStateProvider stemProvider
      The field for the stemProvider record component.
    • foliageRadius

      private final int foliageRadius
      The field for the foliageRadius record component.
    • canPlaceOn

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

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

    • HugeMushroomFeatureConfiguration

      public HugeMushroomFeatureConfiguration(BlockStateProvider capProvider, BlockStateProvider stemProvider, int foliageRadius, BlockPredicate canPlaceOn)
      Creates an instance of a HugeMushroomFeatureConfiguration record class.
      Parameters:
      capProvider - the value for the capProvider record component
      stemProvider - the value for the stemProvider record component
      foliageRadius - the value for the foliageRadius record component
      canPlaceOn - the value for the canPlaceOn 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.
    • capProvider

      public BlockStateProvider capProvider()
      Returns the value of the capProvider record component.
      Returns:
      the value of the capProvider record component
    • stemProvider

      public BlockStateProvider stemProvider()
      Returns the value of the stemProvider record component.
      Returns:
      the value of the stemProvider record component
    • foliageRadius

      public int foliageRadius()
      Returns the value of the foliageRadius record component.
      Returns:
      the value of the foliageRadius record component
    • canPlaceOn

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