Record Class TickingRequest

java.lang.Object
java.lang.Record
appeng.api.networking.ticking.TickingRequest
Record Components:
minTickRate - the minimum number of ticks that must pass between ticks. Valid Values are : 1+ Suggested is 5-20
maxTickRate - the maximum number of ticks that can pass between ticks, if this value is exceeded the grid node must tick. Valid Values are 1+ Suggested is 20-40
isSleeping - Determines the current expected state of your node, if your node expects to be sleeping, then return true.

public record TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping, int initialTickRate) extends Record
Describes how your grid node ticking is executed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping)
     
    TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping, int initialTickRate)
    Creates an instance of a TickingRequest record class.
    TickingRequest(appeng.core.settings.TickRates tickRates, boolean isSleeping)
     
  • 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.
    int
    Returns the value of the initialTickRate record component.
    boolean
    Returns the value of the isSleeping record component.
    int
    Returns the value of the maxTickRate record component.
    int
    Returns the value of the minTickRate record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TickingRequest

      public TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping)
    • TickingRequest

      public TickingRequest(appeng.core.settings.TickRates tickRates, boolean isSleeping)
    • TickingRequest

      public TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping, int initialTickRate)
      Creates an instance of a TickingRequest record class.
      Parameters:
      minTickRate - the value for the minTickRate record component
      maxTickRate - the value for the maxTickRate record component
      isSleeping - the value for the isSleeping record component
      initialTickRate - the value for the initialTickRate 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 '=='.
      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.
    • minTickRate

      public int minTickRate()
      Returns the value of the minTickRate record component.
      Returns:
      the value of the minTickRate record component
    • maxTickRate

      public int maxTickRate()
      Returns the value of the maxTickRate record component.
      Returns:
      the value of the maxTickRate record component
    • isSleeping

      public boolean isSleeping()
      Returns the value of the isSleeping record component.
      Returns:
      the value of the isSleeping record component
    • initialTickRate

      public int initialTickRate()
      Returns the value of the initialTickRate record component.
      Returns:
      the value of the initialTickRate record component