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) {
|
public static ItemStack consumeItem(ItemStack stack) {
|
||||||
if (stack.stackSize == 1) {
|
if (stack.stackSize == 1) {
|
||||||
if (stack.getItem().getContainerItem() != null)
|
if (stack.getItem().hasContainerItem())
|
||||||
return new ItemStack(stack.getItem().getContainerItem(), 1);
|
return stack.getItem().getContainerItemStack(stack);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue