Record Class TimeUpdatePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TimeUpdatePacket
- All Implemented Interfaces:
SendablePacket
,ServerPacket
,ServerPacket.Play
public record TimeUpdatePacket(long worldAge, long timeOfDay, boolean tickDayTime)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimeUpdatePacket
(long worldAge, long timeOfDay, boolean tickDayTime) Creates an instance of aTimeUpdatePacket
record class. -
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.boolean
Returns the value of thetickDayTime
record component.long
Returns the value of thetimeOfDay
record component.final String
toString()
Returns a string representation of this record class.long
worldAge()
Returns the value of theworldAge
record component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
TimeUpdatePacket
public TimeUpdatePacket(long worldAge, long timeOfDay, boolean tickDayTime) Creates an instance of aTimeUpdatePacket
record class.- Parameters:
worldAge
- the value for theworldAge
record componenttimeOfDay
- the value for thetimeOfDay
record componenttickDayTime
- the value for thetickDayTime
record 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 thecompare
method from their corresponding wrapper classes. -
worldAge
public long worldAge()Returns the value of theworldAge
record component.- Returns:
- the value of the
worldAge
record component
-
timeOfDay
public long timeOfDay()Returns the value of thetimeOfDay
record component.- Returns:
- the value of the
timeOfDay
record component
-
tickDayTime
public boolean tickDayTime()Returns the value of thetickDayTime
record component.- Returns:
- the value of the
tickDayTime
record component
-