Record Class BrandPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.BrandPayload
- All Implemented Interfaces:
- CustomPacketPayload
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebrandrecord component.static final ResourceLocation
- 
Constructor SummaryConstructorsConstructorDescriptionBrandPayload(String brand) Creates an instance of aBrandPayloadrecord class.BrandPayload(FriendlyByteBuf p_296001_) 
- 
Method SummaryModifier 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.id()final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_294892_) 
- 
Field Details- 
brandThe field for thebrandrecord component.
- 
ID
 
- 
- 
Constructor Details- 
BrandPayload
- 
BrandPayloadCreates an instance of aBrandPayloadrecord class.- Parameters:
- brand- the value for the- brandrecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- CustomPacketPayload
 
- 
id- Specified by:
- idin interface- CustomPacketPayload
 
- 
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).
- 
brandReturns the value of thebrandrecord component.- Returns:
- the value of the brandrecord component
 
 
-