Package appeng.api.networking.ticking
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-20maxTickRate- 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-40isSleeping- 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
ConstructorsConstructorDescriptionTickingRequest(int minTickRate, int maxTickRate, boolean isSleeping) TickingRequest(int minTickRate, int maxTickRate, boolean isSleeping, int initialTickRate) Creates an instance of aTickingRequestrecord class.TickingRequest(appeng.core.settings.TickRates tickRates, boolean isSleeping) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinitialTickRaterecord component.booleanReturns the value of theisSleepingrecord component.intReturns the value of themaxTickRaterecord component.intReturns the value of theminTickRaterecord component.final StringtoString()Returns a string representation of this record class.
-
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 aTickingRequestrecord class.- Parameters:
minTickRate- the value for theminTickRaterecord componentmaxTickRate- the value for themaxTickRaterecord componentisSleeping- the value for theisSleepingrecord componentinitialTickRate- the value for theinitialTickRaterecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
minTickRate
public int minTickRate()Returns the value of theminTickRaterecord component.- Returns:
- the value of the
minTickRaterecord component
-
maxTickRate
public int maxTickRate()Returns the value of themaxTickRaterecord component.- Returns:
- the value of the
maxTickRaterecord component
-
isSleeping
public boolean isSleeping()Returns the value of theisSleepingrecord component.- Returns:
- the value of the
isSleepingrecord component
-
initialTickRate
public int initialTickRate()Returns the value of theinitialTickRaterecord component.- Returns:
- the value of the
initialTickRaterecord component
-