refinedstorage2 icon indicating copy to clipboard operation
refinedstorage2 copied to clipboard

Fluid disk shown as thousand blocks in disk drive

Open WhiteBoi1211 opened this issue 1 year ago • 7 comments

Describe the bug

The fluid disk shows as blocks in the disk drive. Ex: picture, the 256B disk shows as 256.000 blocks/items.

2023-04-27_16 16 44 2023-04-27_16 16 47 2023-04-27_16 16 50

(Minor issue yes, just wanted to point it out incase it wasn't known! :D)

How can we reproduce this bug or crash?

Simply by putting a fluid disk into a disk drive

What Minecraft version is this happening on?

Minecraft 1.19.3

What Forge or Fabric version is this happening on?

44.1.0

What Refined Storage version is this happening on?

"2.0.0-milestone.2.8"

Relevant log output

No response

WhiteBoi1211 avatar Apr 27 '23 14:04 WhiteBoi1211

since the disk drive allow both types of disks (like it did in RS), having 2 progress bars (eventually showing only if disk type is present) could make the interface better

jonatjano avatar Apr 27 '23 16:04 jonatjano

I thought about that but if you get more types, you'll get more progress bars (think about future Mekanism gas support for example, you could end up with 3 progress bars)

raoulvdberge avatar Apr 28 '23 07:04 raoulvdberge

3 bars wouldn't be a problem; move the disk slots to the left and you'll have space. You shouldn't need any more than items, liquids, and gasses

WhiteBoi1211 avatar Apr 28 '23 17:04 WhiteBoi1211

There could be compatibility with other mods, I have in mind botania mana (mana from many mods tbh), maybe someone would want to put a battery addon

I don't know how much it is feasible using minecraft GUI api, but there are algorithms which takes the number of elements you want to show and return an appropriate number of element per line to have a nice grid

For this case I'd personally use something along the line of countPerLine = ceil(sqrt(elementCount) + epsilon) + 1 which gives a nice rectangle

elementCount countPerLine note
1 2
2 3
3 3
4 4
5 4 second line appear from here
6 4
7 4
8 4
9 5
10 5
11 5 third line appear from here

Having 10 different kind of resources would already be madness imo, but with this technique it should be acceptably rendered

jonatjano avatar Jun 20 '23 15:06 jonatjano

@jonatjano what is a "line"? How would it look like in the UI?

raoulvdberge avatar Aug 02 '23 20:08 raoulvdberge

here's what I have in mind, when having up to 4 different type of resources, it only adds progress bar upTo4

starting from 5 type, the progress bar get squished by half their height and a new line of progress bar is added from5

the color of the progress bar helps recognising them easily


While it's true that the UI becomes a bit overpopulated when you have the second line, it is still more than readable

jonatjano avatar Aug 03 '23 07:08 jonatjano