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
|
@Override
|
||||||
public boolean isItemValid(ItemStack stack) {
|
public boolean isItemValid(ItemStack stack) {
|
||||||
return stack != null && stack.isStackable() && !stack.getItem().hasContainerItem();
|
return stack != null && stack.isStackable() && !stack.getItem().hasContainerItem(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -211,7 +211,7 @@ public final class InvUtils {
|
||||||
|
|
||||||
public static ItemStack consumeItem(ItemStack stack) {
|
public static ItemStack consumeItem(ItemStack stack) {
|
||||||
if (stack.stackSize == 1) {
|
if (stack.stackSize == 1) {
|
||||||
if (stack.getItem().hasContainerItem()) {
|
if (stack.getItem().hasContainerItem(stack)) {
|
||||||
return stack.getItem().getContainerItem(stack);
|
return stack.getItem().getContainerItem(stack);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
||||||
if (!stack.isStackable()) {
|
if (!stack.isStackable()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (stack.getItem().hasContainerItem()) {
|
if (stack.getItem().hasContainerItem(stack)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
||||||
if (!stack.isStackable()) {
|
if (!stack.isStackable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (stack.getItem().hasContainerItem()) {
|
if (stack.getItem().hasContainerItem(stack)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getStackInSlot(slot) == null) {
|
if (getStackInSlot(slot) == null) {
|
||||||
|
|
Loading…
Reference in a new issue