Fixed deprecation warning.

This commit is contained in:
drcrazy 2018-03-23 12:05:22 +03:00
parent a69fa60436
commit 67fab7cdf2
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ public class TileChargeOMat extends TilePowerAcceptor
}
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage energyStorage = stack.getCapability(CapabilityEnergy.ENERGY, null);
int max = Math.min(maxInput, getEnergyStored(null));
int max = Math.min(maxInput, (int) getEnergy()) * RebornCoreConfig.euPerFU;
useEnergy(energyStorage.receiveEnergy(max, false) / RebornCoreConfig.euPerFU);
}
}

View file

@ -86,7 +86,7 @@ public class TileEnergyStorage extends TilePowerAcceptor implements IToolDrop, I
}
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage energyStorage = stack.getCapability(CapabilityEnergy.ENERGY, null);
int max = Math.min(maxInput, getEnergyStored(null));
int max = Math.min(maxInput, (int) getEnergy()) * RebornCoreConfig.euPerFU;
useEnergy(energyStorage.receiveEnergy(max, false) / RebornCoreConfig.euPerFU);
}
}