[Bleeding] Make InventoryView.setItem(-999, item) drop the item on the ground by default.

This commit is contained in:
Celtic Minstrel 2012-03-13 22:28:27 -04:00 committed by EvilSeph
parent 83265005f6
commit 66e067f373

View file

@ -49,9 +49,11 @@ public class CraftInventoryView extends InventoryView {
@Override
public void setItem(int slot, ItemStack item) {
net.minecraft.server.ItemStack stack = CraftItemStack.createNMSItemStack(item);
if (slot != -999) {
CraftItemStack stack = new CraftItemStack(item);
container.getSlot(slot).set(stack.getHandle());
container.getSlot(slot).set(stack);
} else {
player.getHandle().drop(stack);
}
}