Record Class DiscardedQueryPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.login.custom.DiscardedQueryPayload
- All Implemented Interfaces:
- CustomQueryPayload
public record DiscardedQueryPayload(ResourceLocation id, @Nullable FriendlyByteBuf data)
extends Record
implements CustomQueryPayload
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final @Nullable FriendlyByteBufThe field for thedatarecord component.private final ResourceLocationThe field for theidrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDiscardedQueryPayload(ResourceLocation id, @Nullable FriendlyByteBuf data) Creates an instance of aDiscardedQueryPayloadrecord class.
- 
Method SummaryModifier and TypeMethodDescription@Nullable FriendlyByteBufdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_299949_) 
- 
Field Details- 
idThe field for theidrecord component.
- 
dataThe field for thedatarecord component.
 
- 
- 
Constructor Details- 
DiscardedQueryPayload
- 
DiscardedQueryPayloadCreates an instance of aDiscardedQueryPayloadrecord class.- Parameters:
- id- the value for the- idrecord component
- data- the value for the- datarecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- CustomQueryPayload
 
- 
idReturns the value of theidrecord component.- Specified by:
- idin interface- CustomQueryPayload
- Returns:
- the value of the idrecord component
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
dataReturns the value of thedatarecord component.- Returns:
- the value of the datarecord component
 
 
-