Record Class ClientboundCustomQueryPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.login.ClientboundCustomQueryPacket
- All Implemented Interfaces:
- Packet<ClientLoginPacketListener>
public record ClientboundCustomQueryPacket(int transactionId, CustomQueryPayload payload)
extends Record
implements Packet<ClientLoginPacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate final CustomQueryPayloadThe field for thepayloadrecord component.private final intThe field for thetransactionIdrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionClientboundCustomQueryPacket(int transactionId, CustomQueryPayload payload) Creates an instance of aClientboundCustomQueryPacketrecord class.ClientboundCustomQueryPacket(FriendlyByteBuf p_179810_) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientLoginPacketListener p_134754_) final inthashCode()Returns a hash code value for this object.payload()Returns the value of thepayloadrecord component.private static CustomQueryPayloadreadPayload(ResourceLocation p_295267_, FriendlyByteBuf p_295117_) private static DiscardedQueryPayloadreadUnknownPayload(ResourceLocation p_294837_, FriendlyByteBuf p_296380_) final StringtoString()Returns a string representation of this record class.intReturns the value of thetransactionIdrecord component.voidwrite(FriendlyByteBuf p_134757_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, nextProtocol
- 
Field Details- 
transactionIdprivate final int transactionIdThe field for thetransactionIdrecord component.
- 
payloadThe field for thepayloadrecord component.
- 
MAX_PAYLOAD_SIZEprivate static final int MAX_PAYLOAD_SIZE- See Also:
 
 
- 
- 
Constructor Details- 
ClientboundCustomQueryPacket
- 
ClientboundCustomQueryPacketCreates an instance of aClientboundCustomQueryPacketrecord class.- Parameters:
- transactionId- the value for the- transactionIdrecord component
- payload- the value for the- payloadrecord component
 
 
- 
- 
Method Details- 
readPayloadprivate static CustomQueryPayload readPayload(ResourceLocation p_295267_, FriendlyByteBuf p_295117_) 
- 
readUnknownPayloadprivate static DiscardedQueryPayload readUnknownPayload(ResourceLocation p_294837_, FriendlyByteBuf p_296380_) 
- 
write- Specified by:
- writein interface- Packet<ClientLoginPacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientLoginPacketListener>
 
- 
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 '=='.
- 
transactionIdpublic int transactionId()Returns the value of thetransactionIdrecord component.- Returns:
- the value of the transactionIdrecord component
 
- 
payloadReturns the value of thepayloadrecord component.- Returns:
- the value of the payloadrecord component
 
 
-