Applied Energistics 2

Applied Energistics 2

160M Downloads

Crafting CPU selection list does not handle large numbers elegantly

Mithi83 opened this issue ยท 0 comments

commented

Describe the bug

image

  1. 34816k is hard to read and understand and also too wide if another icon would appear next to it (i.e. player/automation only as seen in the next line)
  2. 148 co-processors overlaps the storage icon
  3. There is a strange vertical line on the top pixels between the two parts of the heading

How to reproduce the bug

Create a large crafting CPU (using mega) and open the Crafting CPU selection screen. Mine has 148 Co-Processors (i.e. 37 MEGA Crafting Co-Processing Units) and 34M (216M + 21M MEGA Crafting Storage) plus a MEGA Crafting Monitor in a 732 layout in this example.

Expected behavior

  1. Convert byte count to "M" rather than just "k" at the appropriate theshold
  2. Maybe move the byte count a bit to the right to allow for 3 digits of co-processors without overlapping. A four-digit case should be unlikely enough to be ignored.

Additional details

The tooltip handles "M" (as in mega) gracefully due to the Tooltips.getByteAmount function. There is another bug in Tooltips as well: BYTE_NUMS has 1024^1, 1024^2, 1024^3, and then again has 1024^3 rather than 1024^4. This would mess up conversions in the "G" and "T" scale of bytes. I haven't seen it happen yet but I'm pretty sure this is incorrect.

However, the GUI itself does not use that function and instead relies on a local implementation in CPUSelectionList.formatStorage that only ever does the "k"-translation.

Problem 3 does not happen in my selfcompiled version, only on ATM10.

Which minecraft version are you using?

1.21

On which mod loaders does it happen?

NeoForge

Crash log

Selfcompiled main branch combined with megacells-4.0.1-alpha.jar as in ATM10 currently