owmii / Powah

Discord:
https://discord.gg/A8TP9JY
GNU Lesser General Public License v3.0
28 stars 22 forks source link

Feature Request: CC Tweaked Energy Capacity Integration #207

Open proferabg opened 2 years ago

proferabg commented 2 years ago

Version:

Issue description:

CC Tweaked getEnergy() and getEnergyCapacity() only return integer values. In this case it only returns Integer.MAX_VALUE for capacities bigger than it.

Steps to reproduce:

CC Lua Code:

cell = peripheral.find("powah:ender_cell")
maxE = cell.getEnergyCapacity() or 1
curE = cell.getEnergy() or 1
print("Max: "..maxE)
print("Current: "..curE)

Is this a crash?

No.

Screenshot

CC Tweaked

Other Issue Possibly Referencing this - #123