BuildCraft|Core

BuildCraft|Core

7M Downloads

Is BuildCraft using the "simulate" parameter of "IEnergyProvider#extractEnergy" the wrong way around?

Lordmau5 opened this issue ยท 1 comments

commented

Basically this part in the PipePowerWood class:

if (source instanceof IEnergyProvider) {
int energyExtracted = battery.addEnergy(0, ((IEnergyProvider) source).extractEnergy(o.getOpposite(), energyMaxExtract, true),
false);
((IEnergyProvider) source).extractEnergy(o.getOpposite(), energyExtracted, true);
}

The CoFH API states the proper usage of the "simulate" parameter here:

* @param simulate
* If TRUE, the extraction will only be simulated.

Perhaps someone mixed it up with the IFluidHandler's "doFill" or "doDrain" parameter?

commented

Oh, yes! Thank you very much!