use pocketmine\network\mcpe\handler\SessionHandler; class ContainerSetDataPacket extends DataPacket implements ClientboundPacket{ public const NETWORK_ID = ProtocolInfo::CONTAINER_SET_DATA_PACKET; public const PROPERTY_FURNACE_TICK_COUNT = 0; public const PROPERTY_FURNACE_LIT_TIME = 1; public const PROPERTY_FURNACE_LIT_DURATION = 2; public const PROPERTY_FURNACE_STORED_XP = 3; public const PROPERTY_FURNACE_FUEL_AUX = 4; public const PROPERTY_BREWING_STAND_BREW_TIME = 0; public const PROPERTY_BREWING_STAND_FUEL_AMOUNT = 1; public const PROPERTY_BREWING_STAND_FUEL_TOTAL = 2; /** @var int */ public $windowId; /** @var int */ public $property; /** @var int */ public $value; protected function decodePayload() : void{ $this->windowId = $this->getByte(); $this->property = $this->getVarInt(); $this->value = $this->getVarInt(); } protected function encodePayload() : void{ $this->putByte($this->windowId); $this->putVarInt($this->property); $this->putVarInt($this->value); } public function handle(SessionHandler $handler) : bool{ return $handler->handleContainerSetData($this); } }