Draconic Evolution

Draconic Evolution

77M Downloads

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

SirFluffi opened this issue ยท 1 comments

commented

Base information

  • Minecraft version: 1.20.1
  • Mod version: 3.1.2.575 (newest at the time)
  • Minecraft Forge version: 47.2.32 (2024-05-09) ^ NeoForged 47.1.106 (newest at the time for 1.20.1) [Bug appears on both]
  • CC: Tweaked: 1.111.0

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

commented

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.