Cyberware icon indicating copy to clipboard operation
Cyberware copied to clipboard

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

Open GeekBeam opened this issue 7 years ago • 6 comments

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.

GeekBeam avatar May 01 '17 04:05 GeekBeam

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

LatentDesire avatar May 01 '17 14:05 LatentDesire

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

GeekBeam avatar May 01 '17 16:05 GeekBeam

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

Flaxbeard avatar May 01 '17 20:05 Flaxbeard

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

Rosethorns avatar Jul 04 '17 03:07 Rosethorns

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.

mallrat208 avatar Jul 06 '17 07:07 mallrat208

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

hay-dude007 avatar Nov 10 '21 12:11 hay-dude007