mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-14 03:51:07 +00:00
Update inventory.js
This commit is contained in:
parent
23126e1c69
commit
6f7fda93a0
1 changed files with 6 additions and 0 deletions
|
|
@ -3,9 +3,15 @@ module.exports=inject;
|
|||
function inject(serv, player)
|
||||
{
|
||||
heldItemSlot=0;
|
||||
inventory=new Array(54);
|
||||
|
||||
player._client.on("held_item_slot", function (packet) {
|
||||
heldItemSlot = packet.slotId;
|
||||
});
|
||||
player._client.on("set_creative_slot", function (packet) {
|
||||
inventory[packet.slot]=packet.item;
|
||||
});
|
||||
|
||||
player.heldItemSlot = heldItemSlot;
|
||||
player.inventory = inventory;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue