Package net.minecraft.client.multiplayer
Record Class ClientCommonPacketListenerImpl.DeferredPacket
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl.DeferredPacket
- Enclosing class:
ClientCommonPacketListenerImpl
static record ClientCommonPacketListenerImpl.DeferredPacket(Packet<? extends ServerboundPacketListener> packet, BooleanSupplier sendCondition, long expirationTime)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final long
The field for theexpirationTime
record component.private final Packet<? extends ServerboundPacketListener>
The field for thepacket
record component.private final BooleanSupplier
The field for thesendCondition
record component. -
Constructor Summary
ConstructorDescriptionDeferredPacket
(Packet<? extends ServerboundPacketListener> packet, BooleanSupplier sendCondition, long expirationTime) Creates an instance of aDeferredPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of theexpirationTime
record component.final int
hashCode()
Returns a hash code value for this object.Packet<? extends ServerboundPacketListener>
packet()
Returns the value of thepacket
record component.Returns the value of thesendCondition
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
packet
The field for thepacket
record component. -
sendCondition
The field for thesendCondition
record component. -
expirationTime
private final long expirationTimeThe field for theexpirationTime
record component.
-
-
Constructor Details
-
DeferredPacket
DeferredPacket(Packet<? extends ServerboundPacketListener> packet, BooleanSupplier sendCondition, long expirationTime) Creates an instance of aDeferredPacket
record class.- Parameters:
packet
- the value for thepacket
record componentsendCondition
- the value for thesendCondition
record componentexpirationTime
- the value for theexpirationTime
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
packet
Returns the value of thepacket
record component.- Returns:
- the value of the
packet
record component
-
sendCondition
Returns the value of thesendCondition
record component.- Returns:
- the value of the
sendCondition
record component
-
expirationTime
public long expirationTime()Returns the value of theexpirationTime
record component.- Returns:
- the value of the
expirationTime
record component
-