
Custom fluid colours are invisible by default in UIs
Fuyukai opened this issue ยท 3 comments
Issue description
Custom fluids are completely invisible in UIs unless you specify an alpha; since Integer.parseInt
is signed you can't prefix it with FF
either.
You can sorta work around this with evil bit hacking (doing -1 * (~{COLOUR} & ((1 << 24) - 1))
sets the upper 8 bits to FF, thanks to two's compliment, so putting that in the JSON does work) but that's kinda silly imo.
Steps to reproduce
- Add a material
- Set its fluid colour (e.g. 0xABCDEF)
- Watch as the fluid itself is invisible in JEI, or in modded tank blocks
Minecraft version
1.19.2 (Latest)
Forge version
43.2.6
Emendatus Enigmatica version
2.1.x (Latest)
Other relevant versions
No response
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response
Sorry, I completely messed up when writing this and forgot to modify it; it's invisible in JEI and fluid tank mods (which use the alpha to e.g. render indicator markers on thee GUI texture, for example). I'll update the main issue body.
Example colour block, shows up blue fine for the fluid block itself:
"colors": {
"materialColor": "25344e",
"fluidColor": "25344e"
}
If I change tthe fluid colour to -00dacbb1
(the inverse of the colour) it works fine. Note that ChemLib had a similar issue with this exact probleem.