Use ItemStack sensitive version of hasContainerItem
This commit is contained in:
parent
b1076d8556
commit
d8d42a3d17
3 changed files with 4 additions and 4 deletions
|
@ -19,7 +19,7 @@ public class SlotWorkbench extends SlotBase {
|
|||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack != null && stack.isStackable() && !stack.getItem().hasContainerItem();
|
||||
return stack != null && stack.isStackable() && !stack.getItem().hasContainerItem(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -211,7 +211,7 @@ public final class InvUtils {
|
|||
|
||||
public static ItemStack consumeItem(ItemStack stack) {
|
||||
if (stack.stackSize == 1) {
|
||||
if (stack.getItem().hasContainerItem()) {
|
||||
if (stack.getItem().hasContainerItem(stack)) {
|
||||
return stack.getItem().getContainerItem(stack);
|
||||
} else {
|
||||
return null;
|
||||
|
|
|
@ -155,7 +155,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
|||
if (!stack.isStackable()) {
|
||||
return null;
|
||||
}
|
||||
if (stack.getItem().hasContainerItem()) {
|
||||
if (stack.getItem().hasContainerItem(stack)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
|||
if (!stack.isStackable()) {
|
||||
return false;
|
||||
}
|
||||
if (stack.getItem().hasContainerItem()) {
|
||||
if (stack.getItem().hasContainerItem(stack)) {
|
||||
return false;
|
||||
}
|
||||
if (getStackInSlot(slot) == null) {
|
||||
|
|
Loading…
Reference in a new issue