mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
NetworkInventoryAction does not require an InventoryTransactionPacket
This commit is contained in:
parent
60b26a7ea8
commit
24a2889758
@ -29,7 +29,7 @@ use pocketmine\inventory\transaction\action\DropItemAction;
|
|||||||
use pocketmine\inventory\transaction\action\InventoryAction;
|
use pocketmine\inventory\transaction\action\InventoryAction;
|
||||||
use pocketmine\inventory\transaction\action\SlotChangeAction;
|
use pocketmine\inventory\transaction\action\SlotChangeAction;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\network\mcpe\protocol\InventoryTransactionPacket;
|
use pocketmine\network\mcpe\NetworkBinaryStream;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class NetworkInventoryAction{
|
class NetworkInventoryAction{
|
||||||
@ -85,7 +85,7 @@ class NetworkInventoryAction{
|
|||||||
/**
|
/**
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function read(InventoryTransactionPacket $packet){
|
public function read(NetworkBinaryStream $packet){
|
||||||
$this->sourceType = $packet->getUnsignedVarInt();
|
$this->sourceType = $packet->getUnsignedVarInt();
|
||||||
|
|
||||||
switch($this->sourceType){
|
switch($this->sourceType){
|
||||||
@ -114,7 +114,7 @@ class NetworkInventoryAction{
|
|||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function write(InventoryTransactionPacket $packet){
|
public function write(NetworkBinaryStream $packet){
|
||||||
$packet->putUnsignedVarInt($this->sourceType);
|
$packet->putUnsignedVarInt($this->sourceType);
|
||||||
|
|
||||||
switch($this->sourceType){
|
switch($this->sourceType){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user