Mekanism

Mekanism

111M Downloads

Computercraft APIs for new Multiblocks

mazen opened this issue ยท 3 comments

commented

Since the new induction matrix can store more then 2^31 RF it causes trouble with the 32 bit behavior of ComputerCraft. OpenPeripherals easily overflows if getEnergyStored() / getMaxEnergyStored() is called in this case. .

Can we have some methods which can provide the energy stored / max energy stored (maybe, returning a table with a value + factor) ?

commented

Computronics adds special handlers for both mekanism V8 as well as Draconic Evolution's large power storage. I'd recommend adding that, as it works for both OpenComputers and ComputerCraft.

commented

As you stated, getEnergyStored() and getMaxEnergyStored() are part of Open Peripheral, which has nothing to do with Mekanism nor ComputerCraft. Since those methods are for the RF api, I doubt they will ever return a double but it may be a good idea to ask the author of Open Peripherals.

I implemented those 2 functions on my induction matrix (as well as an average output) and it works perfectly fine (ComputerCraft handle doubles natively). I can send a pull request if the Meka team wants it.

commented

I'd rather not do any kind of additional integration along this path. I'd be happy to accept a feature PR though :)