Merge pull request #408 from Deatrathias/master
Using an ItemStack-sensitive version of getContainerItem for consumeItem
This commit is contained in:
commit
1e5d6e0966
1 changed files with 2 additions and 2 deletions
|
@ -481,8 +481,8 @@ public class Utils {
|
|||
|
||||
public static ItemStack consumeItem(ItemStack stack) {
|
||||
if (stack.stackSize == 1) {
|
||||
if (stack.getItem().getContainerItem() != null)
|
||||
return new ItemStack(stack.getItem().getContainerItem(), 1);
|
||||
if (stack.getItem().hasContainerItem())
|
||||
return stack.getItem().getContainerItemStack(stack);
|
||||
else
|
||||
return null;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue