Record Class DiscardedPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.DiscardedPayload
- All Implemented Interfaces:
CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface CustomPacketPayload
CustomPacketPayload.FallbackProvider<B>, CustomPacketPayload.Type<T>, CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aDiscardedPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends FriendlyByteBuf>
StreamCodec<T, DiscardedPayload> codec(Identifier id, int maxPayloadSize) 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.type()Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
id
The field for theidrecord component.
-
-
Constructor Details
-
DiscardedPayload
Creates an instance of aDiscardedPayloadrecord class.- Parameters:
id- the value for theidrecord component
-
-
Method Details
-
codec
public static <T extends FriendlyByteBuf> StreamCodec<T, DiscardedPayload> codec(Identifier id, int maxPayloadSize) -
type
- Specified by:
typein interfaceCustomPacketPayload
-
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-