diff --git a/src/pocketmine/inventory/ChestInventory.php b/src/pocketmine/inventory/ChestInventory.php index 1dc194270..dc1de3231 100644 --- a/src/pocketmine/inventory/ChestInventory.php +++ b/src/pocketmine/inventory/ChestInventory.php @@ -85,8 +85,8 @@ class ChestInventory extends ContainerInventory{ $pk->x = (int) $vector->x; $pk->y = (int) $vector->y; $pk->z = (int) $vector->z; - $pk->case1 = 1; //it's always 1 for a chest - $pk->case2 = $isOpen ? 1 : 0; + $pk->eventType = 1; //it's always 1 for a chest + $pk->eventData = $isOpen ? 1 : 0; $this->getHolder()->getLevel()->addChunkPacket($this->getHolder()->getX() >> 4, $this->getHolder()->getZ() >> 4, $pk); } } diff --git a/src/pocketmine/network/mcpe/protocol/BlockEventPacket.php b/src/pocketmine/network/mcpe/protocol/BlockEventPacket.php index b331f21eb..576bfeaa1 100644 --- a/src/pocketmine/network/mcpe/protocol/BlockEventPacket.php +++ b/src/pocketmine/network/mcpe/protocol/BlockEventPacket.php @@ -38,20 +38,20 @@ class BlockEventPacket extends DataPacket{ /** @var int */ public $z; /** @var int */ - public $case1; + public $eventType; /** @var int */ - public $case2; + public $eventData; protected function decodePayload(){ $this->getBlockPosition($this->x, $this->y, $this->z); - $this->case1 = $this->getVarInt(); - $this->case2 = $this->getVarInt(); + $this->eventType = $this->getVarInt(); + $this->eventData = $this->getVarInt(); } protected function encodePayload(){ $this->putBlockPosition($this->x, $this->y, $this->z); - $this->putVarInt($this->case1); - $this->putVarInt($this->case2); + $this->putVarInt($this->eventType); + $this->putVarInt($this->eventData); } public function handle(NetworkSession $session) : bool{