yorkeJohn / Tainted-Magic

Tainted Magic, an addon to Thaumcraft 4
20 stars 26 forks source link

Thaumic Disassembler running on negative entropy charge #80

Open penguin-glitch opened 2 years ago

penguin-glitch commented 2 years ago

Possible conflict with OreExcavation and therefore not Tainted Magic's fault.

Steps to reproduce:

  1. Reduce Disassembler to low charge
  2. Vein Mine a large group of blocks using a mod such as OreExcavation
  3. Entropic Charge is subtracted correctly, OreExcavation bypasses digspeed check.
  4. Therefore, we end up with a negative entropic charge value.
  5. Disassembler now works infinitely with no speed loss.

I think I've found the line that causes this issue: Line 86 in ItemThaumicDisassembler.java: return getEntropyCharge(stack) != 0 ? getEfficiency(stack) : 1f; where != 0 is used instead of > 0. Changing this line wouldn't prevent the value from going below 0, but would stop the disassembler from functioning at full speed infinitely when it does happen.

Using latest release 8.1.0 with the latest version of Thaumcraft 4. Using OreExcavation version 1.1.134.

penguin-glitch commented 2 years ago

Just had the disassembler go down to negative charge even when I wasn't vein mining, so it's not an OreExcavation issue