13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::UPDATE_BLOCK_PACKET;
23 public const FLAG_NONE = 0b0000;
24 public const FLAG_NEIGHBORS = 0b0001;
25 public const FLAG_NETWORK = 0b0010;
26 public const FLAG_NOGRAPHIC = 0b0100;
27 public const FLAG_PRIORITY = 0b1000;
29 public const DATA_LAYER_NORMAL = 0;
30 public const DATA_LAYER_LIQUID = 1;
33 public int $blockRuntimeId;
39 public int $flags = self::FLAG_NETWORK;
40 public int $dataLayerId = self::DATA_LAYER_NORMAL;
45 public static function create(
BlockPosition $blockPosition,
int $blockRuntimeId,
int $flags,
int $dataLayerId) : self{
47 $result->blockPosition = $blockPosition;
48 $result->blockRuntimeId = $blockRuntimeId;
49 $result->flags = $flags;
50 $result->dataLayerId = $dataLayerId;
55 $this->blockPosition = $in->getBlockPosition();
62 $out->putBlockPosition($this->blockPosition);
69 return $handler->handleUpdateBlock($this);
static create(BlockPosition $blockPosition, int $blockRuntimeId, int $flags, int $dataLayerId)
encodePayload(PacketSerializer $out)
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)
putUnsignedVarInt(int $v)