Fixed eggs, snowballs and the likes being dupable with /stack.

This commit is contained in:
TomyLobo 2012-07-16 16:08:04 +02:00
parent 3e0b2ef3e4
commit 6c8d13690e

View File

@ -278,14 +278,14 @@ public void stack(CommandContext args, CommandSender sender) throws CommandExcep
item.getEnchantments().equals(item2.getEnchantments())) {
// This stack won't fit in the parent stack
if (item2.getAmount() > needed) {
item.setAmount(64);
item.setAmount(max);
item2.setAmount(item2.getAmount() - needed);
break;
// This stack will
} else {
items[j] = null;
item.setAmount(item.getAmount() + item2.getAmount());
needed = 64 - item.getAmount();
needed = max - item.getAmount();
}
affected++;