mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Improved Checks on energy items
Additional checks for IC2 api and cofhcore in ChargeUtils before using them fixes #4785
This commit is contained in:
1 parent
31885645f0
commit
e2f87957ca
1 file changed
+2
-2
@@ -143,7 +143,7 @@ public final class ChargeUtils
|
||||
return energized.getEnergy(itemstack) == 0;
|
||||
}
|
||||
}
|
||||
else if(itemstack.getItem() instanceof IEnergyContainerItem)
|
||||
else if(MekanismUtils.useRF() && itemstack.getItem() instanceof IEnergyContainerItem)
|
||||
{
|
||||
IEnergyContainerItem energyContainer = (IEnergyContainerItem)itemstack.getItem();
|
||||
|
||||
@@ -155,7 +155,7 @@ public final class ChargeUtils
|
||||
return energyContainer.extractEnergy(itemstack, 1, true) > 0;
|
||||
}
|
||||
}
|
||||
else if(itemstack.getItem() instanceof ISpecialElectricItem)
|
||||
else if(MekanismUtils.useIC2() && itemstack.getItem() instanceof ISpecialElectricItem)
|
||||
{
|
||||
IElectricItemManager manager = ((ISpecialElectricItem)itemstack.getItem()).getManager(itemstack);
|
||||
|
||||
|
||||
Reference in new issue
Block a user