Record Class GravityAPI.GravityBelt<T extends GravityAPI.GravityFunction>

java.lang.Object
java.lang.Record
net.frozenblock.lib.gravity.api.GravityAPI.GravityBelt<T>
Enclosing class:
GravityAPI

public static record GravityAPI.GravityBelt<T extends GravityAPI.GravityFunction>(double minY, double maxY, boolean renderBottom, boolean renderTop, T extends GravityAPI.GravityFunction function) extends Record
  • Constructor Details

    • GravityBelt

      public GravityBelt(double minY, double maxY, boolean renderBottom, boolean renderTop, T function)
      Creates an instance of a GravityBelt record class.
      Parameters:
      minY - the value for the minY record component
      maxY - the value for the maxY record component
      renderBottom - the value for the renderBottom record component
      renderTop - the value for the renderTop record component
      function - the value for the function record component
  • Method Details

    • affectsPosition

      public boolean affectsPosition(double y)
    • codec

      public static <T extends GravityAPI.GravityFunction> com.mojang.serialization.Codec<GravityAPI.GravityBelt<T>> codec(GravityAPI.SerializableGravityFunction<T> gravityFunction)
    • 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.
    • minY

      public double minY()
      Returns the value of the minY record component.
      Returns:
      the value of the minY record component
    • maxY

      public double maxY()
      Returns the value of the maxY record component.
      Returns:
      the value of the maxY record component
    • renderBottom

      public boolean renderBottom()
      Returns the value of the renderBottom record component.
      Returns:
      the value of the renderBottom record component
    • renderTop

      public boolean renderTop()
      Returns the value of the renderTop record component.
      Returns:
      the value of the renderTop record component
    • function

      public T function()
      Returns the value of the function record component.
      Returns:
      the value of the function record component