diff --git a/src/pocketmine/network/mcpe/protocol/ContainerSetDataPacket.php b/src/pocketmine/network/mcpe/protocol/ContainerSetDataPacket.php index 825a153d6a3..efe60c7c6cb 100644 --- a/src/pocketmine/network/mcpe/protocol/ContainerSetDataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ContainerSetDataPacket.php @@ -31,18 +31,28 @@ class ContainerSetDataPacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::CONTAINER_SET_DATA_PACKET; - public $windowid; + const PROPERTY_FURNACE_TICK_COUNT = 0; + const PROPERTY_FURNACE_LIT_TIME = 1; + const PROPERTY_FURNACE_LIT_DURATION = 2; + //TODO: check property 3 + const PROPERTY_FURNACE_FUEL_AUX = 4; + + const PROPERTY_BREWING_STAND_BREW_TIME = 0; + const PROPERTY_BREWING_STAND_FUEL_AMOUNT = 1; + const PROPERTY_BREWING_STAND_FUEL_TOTAL = 2; + + public $windowId; public $property; public $value; protected function decodePayload(){ - $this->windowid = $this->getByte(); + $this->windowId = $this->getByte(); $this->property = $this->getVarInt(); $this->value = $this->getVarInt(); } protected function encodePayload(){ - $this->putByte($this->windowid); + $this->putByte($this->windowId); $this->putVarInt($this->property); $this->putVarInt($this->value); } diff --git a/src/pocketmine/tile/Furnace.php b/src/pocketmine/tile/Furnace.php index 966701a7458..e2559daf045 100644 --- a/src/pocketmine/tile/Furnace.php +++ b/src/pocketmine/tile/Furnace.php @@ -265,14 +265,14 @@ public function onUpdate() : bool{ $windowId = $player->getWindowId($this->getInventory()); if($windowId > 0){ $pk = new ContainerSetDataPacket(); - $pk->windowid = $windowId; - $pk->property = 0; //Smelting + $pk->windowId = $windowId; + $pk->property = ContainerSetDataPacket::PROPERTY_FURNACE_TICK_COUNT; //Smelting $pk->value = $this->namedtag->CookTime->getValue(); $player->dataPacket($pk); $pk = new ContainerSetDataPacket(); - $pk->windowid = $windowId; - $pk->property = 1; //Fire icon + $pk->windowId = $windowId; + $pk->property = ContainerSetDataPacket::PROPERTY_FURNACE_LIT_TIME; $pk->value = $this->namedtag->BurnTicks->getValue(); $player->dataPacket($pk); }