mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Inventory array
This commit is contained in:
parent
937888a655
commit
bff4d92bcd
2 changed files with 4 additions and 1 deletions
|
|
@ -45,6 +45,7 @@ class Player{
|
|||
var $CID;
|
||||
var $MTU;
|
||||
var $spawned = false;
|
||||
var $inventory = array();
|
||||
var $equipment = array(1, 0);
|
||||
function __construct(PocketMinecraftServer $server, $clientID, $ip, $port, $MTU){
|
||||
$this->MTU = $MTU;
|
||||
|
|
@ -125,6 +126,7 @@ class Player{
|
|||
case "player.pickup":
|
||||
if($data["eid"] === $this->eid){
|
||||
$data["eid"] = 0;
|
||||
$this->inventory[] = array($data["entity"]->type, $data["entity"]->meta, $data["entity"]->stack);
|
||||
}
|
||||
$this->dataPacket(MC_TAKE_ITEM_ENTITY, $data);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue