public class CombatEventS2CPacket extends Object implements Packet<ClientPlayPacketListener>
| Modifier and Type | Class and Description |
|---|---|
static class |
CombatEventS2CPacket.Type |
| Modifier and Type | Field and Description |
|---|---|
int |
attackerEntityId |
Text |
deathMessage |
int |
entityId |
int |
timeSinceLastAttack |
CombatEventS2CPacket.Type |
type |
| Constructor and Description |
|---|
CombatEventS2CPacket() |
CombatEventS2CPacket(DamageTracker damageTracker,
CombatEventS2CPacket.Type type) |
CombatEventS2CPacket(DamageTracker damageTracker,
CombatEventS2CPacket.Type type,
Text deathMessage) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
boolean |
isWritingErrorSkippable()
Returns whether a throwable in writing of this packet allows the
connection to simply skip the packet's sending than disconnecting.
|
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
public CombatEventS2CPacket.Type type
public int entityId
public int attackerEntityId
public int timeSinceLastAttack
public Text deathMessage
public CombatEventS2CPacket()
public CombatEventS2CPacket(DamageTracker damageTracker, CombatEventS2CPacket.Type type)
public CombatEventS2CPacket(DamageTracker damageTracker, CombatEventS2CPacket.Type type, Text deathMessage)
public void read(PacketByteBuf buf) throws IOException
read in interface Packet<ClientPlayPacketListener>IOExceptionpublic void write(PacketByteBuf buf) throws IOException
write in interface Packet<ClientPlayPacketListener>IOExceptionpublic void apply(ClientPlayPacketListener clientPlayPacketListener)
apply in interface Packet<ClientPlayPacketListener>public boolean isWritingErrorSkippable()
isWritingErrorSkippable in interface Packet<ClientPlayPacketListener>