mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Check simulation parameters in Tesla integration
This commit is contained in:
1 parent
c073bcaedd
commit
77287cbbcd
1 file changed
+2
-2
@@ -45,13 +45,13 @@ public class TeslaIntegration implements ITeslaHolder, ITeslaConsumer, ITeslaPro
|
||||
@Method(modid = "tesla")
|
||||
public long takePower(long power, boolean simulated)
|
||||
{
|
||||
return (long)Math.round(tileEntity.removeEnergyFromProvider(side, power*general.FROM_TESLA)*general.TO_TESLA);
|
||||
return (long)(tileEntity.extractEnergy(side, (int)(power*general.FROM_TESLA*general.TO_RF), simulated)*general.FROM_RF*general.TO_TESLA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "tesla")
|
||||
public long givePower(long power, boolean simulated)
|
||||
{
|
||||
return (long)Math.round(tileEntity.transferEnergyToAcceptor(side, power*general.FROM_TESLA)*general.TO_TESLA);
|
||||
return (long)(tileEntity.receiveEnergy(side, (int)(power*general.FROM_TESLA*general.TO_RF), simulated)*general.FROM_RF*general.TO_TESLA);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user