Record Class TallHarvestState

java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.plant.TallHarvestState
Record Components:
lowerFrom - The old lower BlockState.
upperFrom - The old upper BlockState.
lowerTo - The new lower BlockState.
upperTo - The new upper BlockState.

public record TallHarvestState(net.minecraft.world.level.block.state.BlockState lowerFrom, net.minecraft.world.level.block.state.BlockState upperFrom, net.minecraft.world.level.block.state.BlockState lowerTo, net.minecraft.world.level.block.state.BlockState upperTo) extends Record
Represents the harvesting transition of a tall plant, used by some GrowthTypes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<TallHarvestState>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TallHarvestState(net.minecraft.world.level.block.state.BlockState lowerFrom, net.minecraft.world.level.block.state.BlockState upperFrom, net.minecraft.world.level.block.state.BlockState lowerTo, net.minecraft.world.level.block.state.BlockState upperTo)
    Creates an instance of a TallHarvestState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the lowerFrom record component.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the lowerTo record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the upperFrom record component.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the upperTo record component.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CODEC

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

    • TallHarvestState

      public TallHarvestState(net.minecraft.world.level.block.state.BlockState lowerFrom, net.minecraft.world.level.block.state.BlockState upperFrom, net.minecraft.world.level.block.state.BlockState lowerTo, net.minecraft.world.level.block.state.BlockState upperTo)
      Creates an instance of a TallHarvestState record class.
      Parameters:
      lowerFrom - the value for the lowerFrom record component
      upperFrom - the value for the upperFrom record component
      lowerTo - the value for the lowerTo record component
      upperTo - the value for the upperTo 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.
    • lowerFrom

      public net.minecraft.world.level.block.state.BlockState lowerFrom()
      Returns the value of the lowerFrom record component.
      Returns:
      the value of the lowerFrom record component
    • upperFrom

      public net.minecraft.world.level.block.state.BlockState upperFrom()
      Returns the value of the upperFrom record component.
      Returns:
      the value of the upperFrom record component
    • lowerTo

      public net.minecraft.world.level.block.state.BlockState lowerTo()
      Returns the value of the lowerTo record component.
      Returns:
      the value of the lowerTo record component
    • upperTo

      public net.minecraft.world.level.block.state.BlockState upperTo()
      Returns the value of the upperTo record component.
      Returns:
      the value of the upperTo record component