Record Class ClientboundTickingStatePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundTickingStatePacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundTickingStatePacket(float tickRate, boolean isFrozen)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theisFrozenrecord component.static final StreamCodec<FriendlyByteBuf, ClientboundTickingStatePacket> private final floatThe field for thetickRaterecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundTickingStatePacket(float tickRate, boolean isFrozen) Creates an instance of aClientboundTickingStatePacketrecord class.private -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from(TickRateManager manager) voidhandle(ClientGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.booleanisFrozen()Returns the value of theisFrozenrecord component.floattickRate()Returns the value of thetickRaterecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf output) Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
tickRate
private final float tickRateThe field for thetickRaterecord component. -
isFrozen
private final boolean isFrozenThe field for theisFrozenrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundTickingStatePacket
-
ClientboundTickingStatePacket
public ClientboundTickingStatePacket(float tickRate, boolean isFrozen) Creates an instance of aClientboundTickingStatePacketrecord class.- Parameters:
tickRate- the value for thetickRaterecord componentisFrozen- the value for theisFrozenrecord component
-
-
Method Details
-
from
-
write
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
tickRate
public float tickRate()Returns the value of thetickRaterecord component.- Returns:
- the value of the
tickRaterecord component
-
isFrozen
public boolean isFrozen()Returns the value of theisFrozenrecord component.- Returns:
- the value of the
isFrozenrecord component
-