use of mods.railcraft.common.util.inventory.wrappers.IInventoryComposite in project Railcraft by Railcraft.
the class TileItemManipulator method hasWorkForCart.
@Override
protected boolean hasWorkForCart(EntityMinecart cart) {
IInventoryComposite cartInv = InventoryComposite.of(InventoryFactory.get(cart, getFacing().getOpposite()));
if (cartInv.slotCount() <= 0)
return false;
EnumRedstoneMode state = redstoneController().getButtonState();
switch(state) {
case IMMEDIATE:
return false;
case MANUAL:
return true;
case PARTIAL:
if (InvTools.isInventoryEmpty(cartInv))
return true;
}
this.cart = cartInv;
return modeHasWork.get(getMode()).test(this);
}
Aggregations