Git sillyness

This commit is contained in:
C109 2016-04-14 19:47:31 -04:00
parent a61dcd6fc3
commit 4a8ea541ff
2 changed files with 10 additions and 2 deletions

View file

@ -67,7 +67,15 @@ module.exports.player = function(player,serv)
if(clickInfo.mouseButton == 0){
// Drop one item at slot
// 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{
// Drop full stack at slot
// Inventory handles removing the whole stack

View file

@ -34,7 +34,7 @@ module.exports.player=function(player,serv)
});
}
player.inventory.selectedItem.count--;
player.inventory.slots[36+player.heldItemSlot]--;
if(heldItem.blockId!=323){
player.changeBlock(position, id, damage);