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 aTickingRequest
record class.TickingRequest
(appeng.core.settings.TickRates tickRates, boolean isSleeping) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of theinitialTickRate
record component.boolean
Returns the value of theisSleeping
record component.int
Returns the value of themaxTickRate
record component.int
Returns the value of theminTickRate
record component.final String
toString()
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 aTickingRequest
record class.- Parameters:
minTickRate
- the value for theminTickRate
record componentmaxTickRate
- the value for themaxTickRate
record componentisSleeping
- the value for theisSleeping
record componentinitialTickRate
- the value for theinitialTickRate
record 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 theminTickRate
record component.- Returns:
- the value of the
minTickRate
record component
-
maxTickRate
public int maxTickRate()Returns the value of themaxTickRate
record component.- Returns:
- the value of the
maxTickRate
record component
-
isSleeping
public boolean isSleeping()Returns the value of theisSleeping
record component.- Returns:
- the value of the
isSleeping
record component
-
initialTickRate
public int initialTickRate()Returns the value of theinitialTickRate
record component.- Returns:
- the value of the
initialTickRate
record component
-