Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting and re-inserting maximally-valuable items voids relatively tiny amounts of EMC due to imprecision #2339

Open
James103 opened this issue May 12, 2024 · 0 comments

Comments

@James103
Copy link

Tickets that do not conform to this template will be closed without comment

Exact ProjectE version (do not say "latest", "latest on Curse", or similar): ProjectE-1.20.1-PE1.0.1

Exact Forge version: 47.2.31

Link to crash log (please use a paste site, do not attach the .txt or paste the log inline): https://gist.github.com/James103/a79f3239706346405ddd255ea2361b2c

Steps to reproduce:

  1. Create a new world with cheats enabled.
  2. Give yourself a couple of Transmutation Tables.
  3. Place one down, and learn the other. You should now have 260 EMC (the value of the Transmutation Table).
  4. Give yourself a barrier block: /give @s barrier
  5. Run this command: projecte setemc 1234567890767676677 barrier
  6. Run /reload.
  7. Transmute and learn the barrier block.
  8. Take out the barrier block.
  9. 5 EMC is voided. (your EMC becomes 255, 250, 245, 240, ... with each cycle)

What I expected to happen: No EMC is voided or duplicated

What happened instead: Very tiny amounts of EMC are voided or duplicated due to imprecision caused by calculations within ProjectE using 64-bit floating point numbers instead of all BigIntegers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant