ItemStack-sensitive getContainer
This commit is contained in:
parent
26213ba615
commit
416916502c
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