embeddedt / embeddium

An open-source client performance mod for Minecraft (based on Sodium 0.5.8) prioritizing reliability & mod compatibility
https://legacy.curseforge.com/minecraft/mc-mods/embeddium
GNU Lesser General Public License v3.0
161 stars 52 forks source link

Remove BiomeSpecialEffects caching of grass/foliage colors #302

Closed embeddedt closed 3 weeks ago

embeddedt commented 1 month ago

This breaks mods that try to modify the original fields. Instead we should just overwrite the problematic methods in Biome to avoid allocations; there will be some performance hit from dereferencing the Optional<Integer> but it's unavoidable without more hacks to track the optional changing, which probably aren't worth it.