Extracting items out of an Energy Cube (if IC2 is not installed)
p-schneider opened this issue ยท 2 comments
I would like to automate charging and discharging of energy cubes by using the [+] and [-] slots in an EnergyCube (using SFM, Hopper, Translocators or pipes), but it seems to be impossible to pipe items (e.g. Energy Cubes) out of an Energy Cube if IC2 isn't installed and activated. Is it supposed to be that way?
TileEntityEnergyCube.canExtractItem() always returns false for me because ChargeUtils.canBeOutputted() always returns false if IC2 is not installed (MekanismUtils.useIC2() == false).
To be able to extract the items ChargeUtils.canBeOutputted() could be changed to something like this:
if(chargeSlot)
{
return !MekanismUtils.useIC2() || itemstack.getItem() instanceof IElectricItem;
}
else {
return !MekanismUtils.useIC2() || (itemstack.getItem() instanceof IElectricItem && ((IElectricItem)itemstack.getItem()).canProvideEnergy(itemstack));
}
(This only changes the behavior when IC2 is not installed, if IC2 is installed it would still work the same as before.)
Restricting it to only allow fully charged items to be extracted from the [+] slot and only fully discharged items to be extracted from the [-] slot could be useful. Besides that I don't see another reason to restrict what items can be extracted from an energy cube, regardless if IC2 is installed or not.
Thank you!
Sadly it is only fixed in the development branch (0612712).
Is there a Jenkins set up for that branch or do i have to compile it myself?