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 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 aTimeUpdatePacketrecord 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.booleanReturns the value of thetickDayTimerecord component.longReturns the value of thetimeOfDayrecord component.final StringtoString()Returns a string representation of this record class.longworldAge()Returns the value of theworldAgerecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
TimeUpdatePacket
public TimeUpdatePacket(long worldAge, long timeOfDay, boolean tickDayTime) Creates an instance of aTimeUpdatePacketrecord class.- Parameters:
worldAge- the value for theworldAgerecord componenttimeOfDay- the value for thetimeOfDayrecord componenttickDayTime- the value for thetickDayTimerecord 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. -
worldAge
public long worldAge()Returns the value of theworldAgerecord component.- Returns:
- the value of the
worldAgerecord component
-
timeOfDay
public long timeOfDay()Returns the value of thetimeOfDayrecord component.- Returns:
- the value of the
timeOfDayrecord component
-
tickDayTime
public boolean tickDayTime()Returns the value of thetickDayTimerecord component.- Returns:
- the value of the
tickDayTimerecord component
-