Record Class ClientboundBossEventPacket.UpdateNameOperation
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundBossEventPacket.UpdateNameOperation
- All Implemented Interfaces:
ClientboundBossEventPacket.Operation
- Enclosing class:
ClientboundBossEventPacket
static record ClientboundBossEventPacket.UpdateNameOperation(Component name)
extends Record
implements ClientboundBossEventPacket.Operation
-
Field Summary
-
Constructor Summary
ModifierConstructorDescription(package private)
UpdateNameOperation
(Component name) Creates an instance of aUpdateNameOperation
record class.private
UpdateNameOperation
(RegistryFriendlyByteBuf p_323813_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatch
(UUID p_178730_, ClientboundBossEventPacket.Handler p_178731_) final boolean
Indicates whether some other object is "equal to" this one.getType()
final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.void
write
(RegistryFriendlyByteBuf p_324336_)
-
Field Details
-
name
The field for thename
record component.
-
-
Constructor Details
-
UpdateNameOperation
-
UpdateNameOperation
UpdateNameOperation(Component name) Creates an instance of aUpdateNameOperation
record class.- Parameters:
name
- the value for thename
record component
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceClientboundBossEventPacket.Operation
-
dispatch
- Specified by:
dispatch
in interfaceClientboundBossEventPacket.Operation
-
write
- Specified by:
write
in interfaceClientboundBossEventPacket.Operation
-
toString
Returns 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. -
hashCode
public 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. -
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-