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
FieldsModifier and TypeFieldDescriptionprivate final ComponentThe field for themessagerecord component.private final intThe field for theplayerIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundPlayerCombatKillPacket(int playerId, Component message) Creates an instance of aClientboundPlayerCombatKillPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_179076_) final inthashCode()Returns a hash code value for this object.booleanmessage()Returns the value of themessagerecord component.intplayerId()Returns the value of theplayerIdrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isTerminal
-
Field Details
-
playerId
private final int playerIdThe field for theplayerIdrecord component. -
message
The field for themessagerecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundPlayerCombatKillPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundPlayerCombatKillPacket
Creates an instance of aClientboundPlayerCombatKillPacketrecord class.- Parameters:
playerId- the value for theplayerIdrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
isSkippable
public boolean isSkippable()- Specified by:
isSkippablein 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 theplayerIdrecord component.- Returns:
- the value of the
playerIdrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-