Record Class SetTimePacket.ClockState
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.SetTimePacket.ClockState
- Record Components:
totalTicks- the number of ticks since this clock was tickingpartialTick- the partial tick of the clock (based on rate), wiped on full updaterate- the rate of the clock in ticks, 1 for normal
- Enclosing class:
SetTimePacket
public static record SetTimePacket.ClockState(long totalTicks, float partialTick, float rate)
extends Record
Represents a clock state update for time.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClockState(long totalTicks, float partialTick, float rate) Creates an instance of aClockStaterecord class. -
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.floatReturns the value of thepartialTickrecord component.floatrate()Returns the value of theraterecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalTicksrecord component.
-
Field Details
-
NETWORK_TYPE
-
-
Constructor Details
-
ClockState
public ClockState(long totalTicks, float partialTick, float rate) Creates an instance of aClockStaterecord class.- Parameters:
totalTicks- the value for thetotalTicksrecord componentpartialTick- the value for thepartialTickrecord componentrate- the value for theraterecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
totalTicks
public long totalTicks()Returns the value of thetotalTicksrecord component.- Returns:
- the value of the
totalTicksrecord component
-
partialTick
public float partialTick()Returns the value of thepartialTickrecord component.- Returns:
- the value of the
partialTickrecord component
-
rate
-