Class CombatEventS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.CombatEventS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class CombatEventS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCombatEventS2CPacket.Type -
Field Summary
Fields Modifier and Type Field Description intattackerEntityIdTextdeathMessageintentityIdinttimeSinceLastAttackCombatEventS2CPacket.Typetype -
Constructor Summary
Constructors Constructor Description CombatEventS2CPacket()CombatEventS2CPacket(DamageTracker damageTracker, CombatEventS2CPacket.Type type)CombatEventS2CPacket(DamageTracker damageTracker, CombatEventS2CPacket.Type type, Text deathMessage) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)booleanisWritingErrorSkippable()Returns whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting.voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)
-
Field Details
-
type
-
entityId
public int entityId -
attackerEntityId
public int attackerEntityId -
timeSinceLastAttack
public int timeSinceLastAttack -
deathMessage
-
-
Constructor Details
-
CombatEventS2CPacket
public CombatEventS2CPacket() -
CombatEventS2CPacket
-
CombatEventS2CPacket
public CombatEventS2CPacket(DamageTracker damageTracker, CombatEventS2CPacket.Type type, Text deathMessage)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-
isWritingErrorSkippable
public boolean isWritingErrorSkippable()Returns whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting.- Specified by:
isWritingErrorSkippablein interfacePacket<ClientPlayPacketListener>
-