Record Class ClientboundPlayerCombatKillPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundPlayerCombatKillPacket(int playerId, Component message)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Component
The field for themessage
record component.private final int
The field for theplayerId
record component. -
Constructor Summary
ConstructorDescriptionClientboundPlayerCombatKillPacket
(int playerId, Component message) Creates an instance of aClientboundPlayerCombatKillPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_179076_) final int
hashCode()
Returns a hash code value for this object.boolean
message()
Returns the value of themessage
record component.int
playerId()
Returns the value of theplayerId
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isTerminal
-
Field Details
-
playerId
private final int playerIdThe field for theplayerId
record component. -
message
The field for themessage
record component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundPlayerCombatKillPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundPlayerCombatKillPacket
Creates an instance of aClientboundPlayerCombatKillPacket
record class.- Parameters:
playerId
- the value for theplayerId
record componentmessage
- the value for themessage
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
isSkippable
public boolean isSkippable()- Specified by:
isSkippable
in interfacePacket<ClientGamePacketListener>
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
playerId
public int playerId()Returns the value of theplayerId
record component.- Returns:
- the value of the
playerId
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-