Cyberware

Cyberware

3M Downloads

[1.11.2] UltraDense Capacitor doesn't charge from the Charger block.

GeekBeam opened this issue ยท 6 comments

commented

Ultradense capacitor doesn't charge from anything at all. internal charging devices to not charge it (which seems to be intentional, according to the tooltip.) but it doesn't charge from the Charger block when I stand atop it.

this bug is unique to the ultradense capacitor, as I am able to fully charge ALL other batteries I have available EXCEPT that one.

commented

I have tried everything it doesn't charge my stuff. I use cyberware version 1.12.2-0.2.11.29

commented

What version of Cyberware? What other mods, and their versions, are you using?

commented

Cyberware Version Alpha0.2.9.
loaded as part of The Raxpack 2, for 1.11.2:
https://mods.curse.com/modpacks/minecraft/263527-raxpack-2

commented

I'll see what I can do. Elucent is on leave from modding so I'll probably start maintaining this branch myself.

commented

Can Confirm
Of note the basic internal battery and the marrow battery work fine. So what ever they are doing the ultra dense isn't. Probably a comma somewhere :P

commented

if the version @elucent has up on GitHub is close to what the working version of 1.11.2 Cyberware is, I found the problem.

https://github.com/elucent/Cyberware/blob/master/src/main/java/flaxbeard/cyberware/common/item/ItemDenseBattery.java#L28

@Override
public int add(ItemStack battery, ItemStack power, int amount, boolean simulate)
{
   if (power == null)
   {
       int amountToAdd = Math.min(getCapacity(battery) - getStoredEnergy(battery), amount);
       if (!simulate)
       {
           NBTTagCompound data = CyberwareAPI.getCyberwareNBT(battery);
           data.setInteger("power", data.getInteger("power") + amountToAdd);
       }
       return amountToAdd;
   }
   return 0;
}

That needs to be a check for power.isEmpty() as it's always evaluating false.