Draconic-Inc / Draconic-Evolution

Other
336 stars 168 forks source link

[1.20.1] Integration CC:Tweaked getEnergy() 32Int Limit #1795

Closed SirFluffi closed 3 months ago

SirFluffi commented 3 months ago

Base information

Description/Reproduction

When placing a computer next to an energy pylon, you can get the energy stored withing the storage with getEnergy(). However, since DE's numbers tend to get quite big quite fast, you hit the integer limit quickly. Which in this case means that it stops there, any value above it just gets put back down to the limit.

If I stored: 3.000.000.000 and i getEnergy() then it will just output 2.147.483.647

I asked on the CC discord about it an they mentioned,

"it comes down to how the mod implements the energy API - it might be forced to use 32-bit integers, and it doesn't handle that well" -JackMacWindows (referring to DE)

It would be awesome if you find a workaround or fix.

Thats all :3 -Fluffy

FoxMcloud5655 commented 3 months ago

CC support is already working for all other versions of DE by outputting the real number as a string via .getEnergyStored(). No integration for CC is available for the alpha of DE as of right now. Same with CraftTweaker.

It will be added later; it's already planned. Just not for the alpha.