fishcute / Celestial

A Minecraft mod for Fabric and Forge that allows you to customize the sky.
MIT License
18 stars 4 forks source link

Updated getDecimal(color) to not call String.format #6

Closed tjmorse closed 1 year ago

tjmorse commented 1 year ago

I noticed getDecimal's call to String.format was causing a lot of slowdown, especially when running alongside Sodium/Rubidium, as those seem to make a lot of calls to biome and sky colors. Converting the RBG values to a hex string using Integer.toHexString and concatenation gets back 10 to 20 fps.

fishcute commented 1 year ago

Yeah, I'm not really sure why it was using String.format in the first place. Will be implemented in the next update.