allow interface itemstack handler to accept over sized stacks
This commit is contained in:
+12
@@ -222,6 +222,18 @@ public final class ContainerInterfaceConfigurationTerminal extends AEBaseContain
|
||||
ItemHandlerUtil.setStackInSlot(theSlot, 0, player.inventory.getItemStack().copy());
|
||||
}
|
||||
|
||||
break;
|
||||
case HALVE:
|
||||
if (inSlot.getCount() > 1) {
|
||||
ItemStack halved = inSlot.copy();
|
||||
halved.setCount(inSlot.getCount() / 2);
|
||||
ItemHandlerUtil.setStackInSlot(theSlot, 0, halved);
|
||||
}
|
||||
break;
|
||||
case DOUBLE:
|
||||
ItemStack doubled = inSlot.copy();
|
||||
doubled.setCount(Math.min(512, inSlot.getCount() * 2));
|
||||
ItemHandlerUtil.setStackInSlot(theSlot, 0, doubled);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user