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 SummaryFieldsModifier and TypeFieldDescriptionprivate final longThe field for theexpirationTimerecord component.private final Packet<? extends ServerboundPacketListener>The field for thepacketrecord component.private final BooleanSupplierThe field for thesendConditionrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDeferredPacket(Packet<? extends ServerboundPacketListener> packet, BooleanSupplier sendCondition, long expirationTime) Creates an instance of aDeferredPacketrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpirationTimerecord component.final inthashCode()Returns a hash code value for this object.Packet<? extends ServerboundPacketListener>packet()Returns the value of thepacketrecord component.Returns the value of thesendConditionrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
packetThe field for thepacketrecord component.
- 
sendConditionThe field for thesendConditionrecord component.
- 
expirationTimeprivate final long expirationTimeThe field for theexpirationTimerecord component.
 
- 
- 
Constructor Details- 
DeferredPacketDeferredPacket(Packet<? extends ServerboundPacketListener> packet, BooleanSupplier sendCondition, long expirationTime) Creates an instance of aDeferredPacketrecord class.- Parameters:
- packet- the value for the- packetrecord component
- sendCondition- the value for the- sendConditionrecord component
- expirationTime- the value for the- expirationTimerecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
packetReturns the value of thepacketrecord component.- Returns:
- the value of the packetrecord component
 
- 
sendConditionReturns the value of thesendConditionrecord component.- Returns:
- the value of the sendConditionrecord component
 
- 
expirationTimepublic long expirationTime()Returns the value of theexpirationTimerecord component.- Returns:
- the value of the expirationTimerecord component
 
 
-