I haven't decided to stick with it, I was only posting that it's technically possible. Internally, that saddles me with somewhat kludgey code for the actual machine operation. At one point during development, the PowerHandler had direct-access functions which were clearly marked "only use these if you know what you are doing." Welp, those are gone now, in the interest of making it a plug-and-play system.
They aren't gone, just not accessible unless you own the PowerHandler (as the original comments expounded). If you only have access to the PowerReceptor, then you can't and shouldn't be able to directly manipulate the PowerHandler. Because in that case it most likely belongs to a block from another mod.
Code:
public float addEnergy(float quantity) {
energyStored += quantity;
if (energyStored > maxEnergyStored) {
quantity -= energyStored - maxEnergyStored;
energyStored = maxEnergyStored;
} else if (energyStored < 0) {
quantity -= energyStored;
energyStored = 0;
}
applyPerdition();
return quantity;
}
public void setEnergy(float quantity) {
this.energyStored = quantity;
validateEnergy();
}
Still there see.