PlayerArmorDamagePacket
extends DataPacket
in package
implements
ClientboundPacket
Interfaces, Classes, Traits and Enums
Table of Contents
- NETWORK_ID = \pocketmine\network\mcpe\protocol\ProtocolInfo::PLAYER_ARMOR_DAMAGE_PACKET
- PID_MASK = 0x3ff
- FLAG_CHEST = 1
- FLAG_FEET = 3
- FLAG_HEAD = 0
- FLAG_LEGS = 2
- RECIPIENT_SUBCLIENT_ID_SHIFT = 12
- SENDER_SUBCLIENT_ID_SHIFT = 10
- SUBCLIENT_ID_MASK = 0x3
- $recipientSubId : int
- $senderSubId : int
- $chestSlotDamage : int|null
- $feetSlotDamage : int|null
- $headSlotDamage : int|null
- $legsSlotDamage : int|null
- __get() : mixed
- __set() : void
- canBeSentBeforeLogin() : bool
- create() : self
- decode() : void
- encode() : void
- getChestSlotDamage() : int|null
- getFeetSlotDamage() : int|null
- getHeadSlotDamage() : int|null
- getLegsSlotDamage() : int|null
- getName() : string
- handle() : bool
- pid() : int
- decodeHeader() : void
- decodePayload() : void
- Decodes the packet body, without the packet ID or other generic header fields.
- encodeHeader() : void
- encodePayload() : void
- Encodes the packet body, without the packet ID or other generic header fields.
- composeFlag() : int
- maybeReadDamage() : int|null
- maybeWriteDamage() : void
Constants
NETWORK_ID
public
mixed
NETWORK_ID
= \pocketmine\network\mcpe\protocol\ProtocolInfo::PLAYER_ARMOR_DAMAGE_PACKET
PID_MASK
public
mixed
PID_MASK
= 0x3ff
FLAG_CHEST
private
mixed
FLAG_CHEST
= 1
FLAG_FEET
private
mixed
FLAG_FEET
= 3
FLAG_HEAD
private
mixed
FLAG_HEAD
= 0
FLAG_LEGS
private
mixed
FLAG_LEGS
= 2
RECIPIENT_SUBCLIENT_ID_SHIFT
private
mixed
RECIPIENT_SUBCLIENT_ID_SHIFT
= 12
SENDER_SUBCLIENT_ID_SHIFT
private
mixed
SENDER_SUBCLIENT_ID_SHIFT
= 10
SUBCLIENT_ID_MASK
private
mixed
SUBCLIENT_ID_MASK
= 0x3
Properties
$recipientSubId
public
int
$recipientSubId
= 0
$senderSubId
public
int
$senderSubId
= 0
$chestSlotDamage
private
int|null
$chestSlotDamage
$feetSlotDamage
private
int|null
$feetSlotDamage
$headSlotDamage
private
int|null
$headSlotDamage
$legsSlotDamage
private
int|null
$legsSlotDamage
Methods
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
Return values
mixed —__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —canBeSentBeforeLogin()
public
canBeSentBeforeLogin() : bool
Return values
bool —create()
public
static create(int|null $headSlotDamage, int|null $chestSlotDamage, int|null $legsSlotDamage, int|null $feetSlotDamage) : self
Parameters
- $headSlotDamage : int|null
- $chestSlotDamage : int|null
- $legsSlotDamage : int|null
- $feetSlotDamage : int|null
Tags
Return values
self —decode()
public
final decode(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —encode()
public
final encode(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —getChestSlotDamage()
public
getChestSlotDamage() : int|null
Return values
int|null —getFeetSlotDamage()
public
getFeetSlotDamage() : int|null
Return values
int|null —getHeadSlotDamage()
public
getHeadSlotDamage() : int|null
Return values
int|null —getLegsSlotDamage()
public
getLegsSlotDamage() : int|null
Return values
int|null —getName()
public
getName() : string
Return values
string —handle()
public
handle(PacketHandlerInterface $handler) : bool
Parameters
- $handler : PacketHandlerInterface
Return values
bool —pid()
public
pid() : int
Return values
int —decodeHeader()
protected
decodeHeader(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —decodePayload()
Decodes the packet body, without the packet ID or other generic header fields.
protected
decodePayload(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Return values
void —encodeHeader()
protected
encodeHeader(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —encodePayload()
Encodes the packet body, without the packet ID or other generic header fields.
protected
encodePayload(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —composeFlag()
private
composeFlag(int|null $field, int $flag) : int
Parameters
- $field : int|null
- $flag : int
Return values
int —maybeReadDamage()
private
maybeReadDamage(int $flags, int $flag, PacketSerializer $in) : int|null
Parameters
- $flags : int
- $flag : int
- $in : PacketSerializer
Return values
int|null —maybeWriteDamage()
private
maybeWriteDamage(int|null $field, PacketSerializer $out) : void
Parameters
- $field : int|null
- $out : PacketSerializer