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, long dayTime, boolean tickDayTime)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
The field for thedayTime
record component.private final long
The field for thegameTime
record component.static final StreamCodec
<FriendlyByteBuf, ClientboundSetTimePacket> private final boolean
The field for thetickDayTime
record component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundSetTimePacket
(long gameTime, long dayTime, boolean tickDayTime) Creates an instance of aClientboundSetTimePacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
dayTime()
Returns the value of thedayTime
record component.final boolean
Indicates whether some other object is "equal to" this one.long
gameTime()
Returns the value of thegameTime
record component.void
handle
(ClientGamePacketListener p_133357_) final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thetickDayTime
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
gameTime
private final long gameTimeThe field for thegameTime
record component. -
dayTime
private final long dayTimeThe field for thedayTime
record component. -
tickDayTime
private final boolean tickDayTimeThe field for thetickDayTime
record component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundSetTimePacket
public ClientboundSetTimePacket(long gameTime, long dayTime, boolean tickDayTime) Creates an instance of aClientboundSetTimePacket
record class.- Parameters:
gameTime
- the value for thegameTime
record componentdayTime
- the value for thedayTime
record componenttickDayTime
- the value for thetickDayTime
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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 '=='. -
gameTime
public long gameTime()Returns the value of thegameTime
record component.- Returns:
- the value of the
gameTime
record component
-
dayTime
public long dayTime()Returns the value of thedayTime
record component.- Returns:
- the value of the
dayTime
record component
-
tickDayTime
public boolean tickDayTime()Returns the value of thetickDayTime
record component.- Returns:
- the value of the
tickDayTime
record component
-