Record Class HorseMillProperties

java.lang.Object
java.lang.Record
com.petrolpark.compat.create.common.kinetics.horseMill.HorseMillProperties

public record HorseMillProperties(net.minecraft.world.phys.Vec3 positionOffset, EntityNumberProvider maxSpeed, EntityNumberProvider stressCapacity, Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation) extends Record
  • Field Details

  • Constructor Details

    • HorseMillProperties

      public HorseMillProperties(net.minecraft.world.phys.Vec3 positionOffset, EntityNumberProvider maxSpeed, EntityNumberProvider stressCapacity, Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation)
      Creates an instance of a HorseMillProperties record class.
      Parameters:
      positionOffset - the value for the positionOffset record component
      maxSpeed - the value for the maxSpeed record component
      stressCapacity - the value for the stressCapacity record component
      harnessModelLocation - the value for the harnessModelLocation record component
  • Method Details

    • get

      public static final Optional<HorseMillProperties> get(net.minecraft.world.entity.Entity entity)
    • 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.
    • positionOffset

      public net.minecraft.world.phys.Vec3 positionOffset()
      Returns the value of the positionOffset record component.
      Returns:
      the value of the positionOffset record component
    • maxSpeed

      public EntityNumberProvider maxSpeed()
      Returns the value of the maxSpeed record component.
      Returns:
      the value of the maxSpeed record component
    • stressCapacity

      public EntityNumberProvider stressCapacity()
      Returns the value of the stressCapacity record component.
      Returns:
      the value of the stressCapacity record component
    • harnessModelLocation

      public Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation()
      Returns the value of the harnessModelLocation record component.
      Returns:
      the value of the harnessModelLocation record component