mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Protocol changes for 1.16.0
This commit is contained in:
@@ -31,7 +31,9 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\InventoryContentPacket;
|
||||
use pocketmine\network\mcpe\protocol\InventorySlotPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\ContainerIds;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||
use pocketmine\Player;
|
||||
use function array_map;
|
||||
use function array_slice;
|
||||
use function count;
|
||||
use function max;
|
||||
@@ -433,7 +435,7 @@ abstract class BaseInventory implements Inventory{
|
||||
}
|
||||
|
||||
$pk = new InventoryContentPacket();
|
||||
$pk->items = $this->getContents(true);
|
||||
$pk->items = array_map([ItemStackWrapper::class, 'legacy'], $this->getContents(true));
|
||||
|
||||
foreach($target as $player){
|
||||
if(($id = $player->getWindowId($this)) === ContainerIds::NONE){
|
||||
@@ -455,7 +457,7 @@ abstract class BaseInventory implements Inventory{
|
||||
|
||||
$pk = new InventorySlotPacket();
|
||||
$pk->inventorySlot = $index;
|
||||
$pk->item = $this->getItem($index);
|
||||
$pk->item = ItemStackWrapper::legacy($this->getItem($index));
|
||||
|
||||
foreach($target as $player){
|
||||
if(($id = $player->getWindowId($this)) === ContainerIds::NONE){
|
||||
|
Reference in New Issue
Block a user