Added some ContainerSetDataPacket constants

This commit is contained in:
Dylan K. Taylor
2017-08-08 12:19:11 +01:00
parent b4c2305c7f
commit 3ad1b1ba7f
2 changed files with 17 additions and 7 deletions

View File

@ -31,18 +31,28 @@ use pocketmine\network\mcpe\NetworkSession;
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);
}