62832 / AppliedE

Direct ProjectE EMC integration with Applied Energistics 2.
https://curseforge.com/minecraft/mc-mods/appliede
GNU Lesser General Public License v3.0
4 stars 4 forks source link

Extracting and re-inserting maximally-valuable items voids relatively tiny amounts of EMC #8

Closed James103 closed 4 months ago

James103 commented 4 months ago

When an ME Transmutation Export Bus is pointed into an ME Transmutation Interface, and both devices are on the same ME Network, setting the ME Transmutation Export Bus to export Compact Sun blocks into the ME Transmutation Interface will void 96 EMC from the network's available EMC total for every Compact Sun moved that way.

This is most likely caused by some of the calculations in at least one of the following 3 mods using 64-bit floating point numbers instead of BigIntegers:

64-bit floating point numbers are only integer-precise up to 9 quadrillion, while the Compact Sun has an EMC value of over 2 quintillion.

To reproduce:

  1. Install AE2 + AppliedE + ProjectE + Project Expansion.
  2. Create a new world with cheats enabled.
  3. Create an ME Network consisting of a Creative Energy Cell, ME Transmutation Module, and ME Transmutation Terminal.
  4. Place an ME Transmutation Interface and an ME Transmutation Export Bus, making sure the latter is pointed into the former.
  5. Connect both devices to the same ME network with an ME Transmutation Module and some cable.
  6. Run this command: projecte emc set @s 1000000000000000000000000000, or get that much EMC via other means.
  7. Give yourself a Compact Sun.
  8. Set the ME Transmutation Export Bus to export Compact Suns into the ME Transmutation Interface.
  9. Learn the Compact Sun.
  10. Notice your EMC total reduces by 96 for every Compact Sun moved from the export bus into the interface.
Full mod list ``` ae2wtlib-15.2.3-forge appliede-0.11.0-beta appliedenergistics2-forge-15.2.1 architectury-9.2.14-forge cloth-config-11.1.118-forge curios-forge-5.9.0+1.20.1 jei-1.20.1-forge-15.3.0.4 NoChatReports-FORGE-1.20.1-v2.2.2 ProjectE-1.20.1-PE1.0.1 ProjectExpansion-1.20.1-1.1.0 ```
62832 commented 4 months ago

Working as intended.

Compact Suns have a different "sell value" to their EMC value when taken out of a regular Transmutation Tablet, and as such will void 96 EMC whenever they're re-transmuted. This is the same with the regular Transmutation Table(t) from ProjectE.

62832 commented 4 months ago

However, if this is indeed a problem with the Compact Sun, I would advise opening an issue on Project Expansion's issue tracker instead. For what it's worth, anyway, this isn't a problem with other items that have their EMC value manually set to the maximum amount of ~9.22 quintillion.

James103 commented 4 months ago

With "Maximally-valuable" here referring to items worth in the quintillions of EMC (above 1e18 but less than 9.22e18), I was able to reproduce using only the base ProjectE mod. See also https://github.com/sinkillerj/ProjectE/issues/2339.

62832 commented 4 months ago

I see. Then this is certainly an upstream problem rather than a problem here.