Record Class LakeFeature.Configuration

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.LakeFeature.Configuration
All Implemented Interfaces:
FeatureConfiguration
Enclosing class:
LakeFeature

public static record LakeFeature.Configuration(BlockStateProvider fluid, BlockStateProvider barrier, BlockPredicate canPlaceFeature, BlockPredicate canReplaceWithAirOrFluid, BlockPredicate canReplaceWithBarrier) extends Record implements FeatureConfiguration
  • Field Details

    • fluid

      private final BlockStateProvider fluid
      The field for the fluid record component.
    • barrier

      private final BlockStateProvider barrier
      The field for the barrier record component.
    • canPlaceFeature

      private final BlockPredicate canPlaceFeature
      The field for the canPlaceFeature record component.
    • canReplaceWithAirOrFluid

      private final BlockPredicate canReplaceWithAirOrFluid
      The field for the canReplaceWithAirOrFluid record component.
    • canReplaceWithBarrier

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

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

    • Configuration

      public Configuration(BlockStateProvider fluid, BlockStateProvider barrier, BlockPredicate canPlaceFeature, BlockPredicate canReplaceWithAirOrFluid, BlockPredicate canReplaceWithBarrier)
      Creates an instance of a Configuration record class.
      Parameters:
      fluid - the value for the fluid record component
      barrier - the value for the barrier record component
      canPlaceFeature - the value for the canPlaceFeature record component
      canReplaceWithAirOrFluid - the value for the canReplaceWithAirOrFluid record component
      canReplaceWithBarrier - the value for the canReplaceWithBarrier 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • fluid

      public BlockStateProvider fluid()
      Returns the value of the fluid record component.
      Returns:
      the value of the fluid record component
    • barrier

      public BlockStateProvider barrier()
      Returns the value of the barrier record component.
      Returns:
      the value of the barrier record component
    • canPlaceFeature

      public BlockPredicate canPlaceFeature()
      Returns the value of the canPlaceFeature record component.
      Returns:
      the value of the canPlaceFeature record component
    • canReplaceWithAirOrFluid

      public BlockPredicate canReplaceWithAirOrFluid()
      Returns the value of the canReplaceWithAirOrFluid record component.
      Returns:
      the value of the canReplaceWithAirOrFluid record component
    • canReplaceWithBarrier

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