mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-05 19:20:54 +00:00
Git sillyness
This commit is contained in:
parent
a61dcd6fc3
commit
4a8ea541ff
2 changed files with 10 additions and 2 deletions
|
|
@ -67,7 +67,15 @@ module.exports.player = function(player,serv)
|
||||||
if(clickInfo.mouseButton == 0){
|
if(clickInfo.mouseButton == 0){
|
||||||
// Drop one item at slot
|
// Drop one item at slot
|
||||||
// Inventory handles removing one
|
// Inventory handles removing one
|
||||||
return;
|
|
||||||
|
const heldItem = player.inventory.slots[36+player.heldItemSlot];
|
||||||
|
serv.spawnObject(2, player.world, player.position, {
|
||||||
|
velocity: new Vec3(0, 0, 0),
|
||||||
|
itemId: heldItem.type,
|
||||||
|
itemDamage: heldItem.metadata,
|
||||||
|
pickupTime: 500,
|
||||||
|
deathTime: 60 * 5 * 100
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
// Drop full stack at slot
|
// Drop full stack at slot
|
||||||
// Inventory handles removing the whole stack
|
// Inventory handles removing the whole stack
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ module.exports.player=function(player,serv)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
player.inventory.selectedItem.count--;
|
player.inventory.slots[36+player.heldItemSlot]--;
|
||||||
|
|
||||||
if(heldItem.blockId!=323){
|
if(heldItem.blockId!=323){
|
||||||
player.changeBlock(position, id, damage);
|
player.changeBlock(position, id, damage);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue