Record Class BrandPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.BrandPayload
- 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
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebrandrecord component.static final StreamCodec<FriendlyByteBuf, BrandPayload> static final CustomPacketPayload.Type<BrandPayload> -
Constructor Summary
ConstructorsModifierConstructorDescriptionBrandPayload(String brand) Creates an instance of aBrandPayloadrecord class.privateBrandPayload(FriendlyByteBuf input) -
Method Summary
Modifier and TypeMethodDescriptionbrand()Returns the value of thebrandrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf output) Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
brand
The field for thebrandrecord component. -
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
BrandPayload
-
BrandPayload
Creates an instance of aBrandPayloadrecord class.- Parameters:
brand- the value for thebrandrecord component
-
-
Method Details
-
write
-
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). -
brand
Returns the value of thebrandrecord component.- Returns:
- the value of the
brandrecord component
-