Record Class ClientboundSetTimePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundSetTimePacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundSetTimePacket(long gameTime, Map<Holder<WorldClock>, ClockState> clockUpdates)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Holder<WorldClock>, ClockState> The field for theclockUpdatesrecord component.private final longThe field for thegameTimerecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundSetTimePacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundSetTimePacket(long gameTime, Map<Holder<WorldClock>, ClockState> clockUpdates) Creates an instance of aClientboundSetTimePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclockUpdatesrecord component.final booleanIndicates whether some other object is "equal to" this one.longgameTime()Returns the value of thegameTimerecord component.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the NetHandler for processing.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
gameTime
private final long gameTimeThe field for thegameTimerecord component. -
clockUpdates
The field for theclockUpdatesrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundSetTimePacket
Creates an instance of aClientboundSetTimePacketrecord class.- Parameters:
gameTime- the value for thegameTimerecord componentclockUpdates- the value for theclockUpdatesrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
gameTime
public long gameTime()Returns the value of thegameTimerecord component.- Returns:
- the value of the
gameTimerecord component
-
clockUpdates
Returns the value of theclockUpdatesrecord component.- Returns:
- the value of the
clockUpdatesrecord component
-