13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::ANVIL_DAMAGE_PACKET;
24 private int $damageAmount;
31 $result->blockPosition = $blockPosition;
32 $result->damageAmount = $damageAmount;
36 public function getDamageAmount() : int{
37 return $this->damageAmount;
40 public function getBlockPosition() :
BlockPosition{ return $this->blockPosition; }
43 $this->damageAmount = $in->getByte();
48 $out->putByte($this->damageAmount);
53 return $handler->handleAnvilDamage($this);
static create(BlockPosition $blockPosition, int $damageAmount)
handle(PacketHandlerInterface $handler)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
putBlockPosition(BlockPosition $blockPosition)