Implement charging tools via 3rd party power sources
shartte opened this issue ยท 9 comments
Should enable charging via EnderIO / IC2.
I have to look into how Caps play into that.
@GuntherDW Yeah please do. We are trying hard to not have to support the "legacy" RF API if possible.
Instead we are doing Forge Energy and Tesla where we can.
EnderIO has support for both Tesla and Forge Energy, thus the charging works.
If DE adds Forge Energy, the charging should also work, even though it's somewhat non-obvious how to do Forge Energy for items I think.
ItemStack caps are completely borked. See MinecraftForge/MinecraftForge#2523 . The only effective way at this point to do it is to wrap Tesla/Forge Energy-based items in Legacy RF. That issue was created on May 25 with no signs of being fixed. This is a huge problem. I really wanted my mod to be dependant solely on Tesla, but I am forced to support RF due to this bug. As for DE, it is legacy RF that just converts the ints to longs via bit shifting.
Wait, doesn't the bug you linked apply only to caps that store their own NBT?
We're not doing that though. The item's NBT storage is not linked to the cap in our case.
Well we have, but we only use caps to expose interfaces. We don't use the dynamic cap-attachment stuff or the associated NBT storage.
So what we're doing is exposing an IEnergyStorage via Caps for the Itemstack, and that seems to work fine.
yup, that's how I do it too..just didn't look..no sleep last night..rather lazy atm..sry to take your time
EnderIO supports a simple solution to this:
https://github.com/SleepyTrousers/EnderIO/blob/1.10/src/main/java/crazypants/enderio/machine/capbank/network/CapBankNetwork.java#L313
It's expecting an IEnergyStorage (Forge) to be returned via cap from the item stack.
I don't know if the EnderIO RF capibility is somewhat different than the Draconic Evolution one, but a flux capacitor from Draconic Evolution doesn't seem to be charging the wireless terminal.
You are however able to charge and use the Ender IO cables and machines to power Draconic Evolution tools and machines.
Or is this a byproduct of the non official RF ports?
I can't seem to charge EnderIO stuff in my inventory with them either, while other mods that also use RF just seem to work fine.
So I can charge the Flux Cap in a EIO Capacitor bank, but it is not able to charge items from EIO in my inventory, but other mods that use RF work fine with the cap.
I have a feeling that this is something that I should ask/shoot at the DE and EIO devs as well though.