OptiFabric

OptiFabric

9M Downloads

OptiFine forces all leaf blocks to use the vanilla foliage colors

coderbot16 opened this issue · 5 comments

commented

Related: sp614x/optifine#5041, TerraformersMC/Terrestria#206, TerraformersMC/Terrestria#178

The issue is probably in CustomColors::getColorMultiplier. All leaves are forced to use the vanilla foliage colors, even if they choose to use a different foliage color otherwise. The issue only occurs when custom colors are enabled; I have attached a resource pack that contains custom birch colors, which triggers the bug on modded leaves. This is because using any colormap causes useDefaultGrassFoliageColors to become false, which makes OptiFine override the block colors for all leaves.

Resource pack using a custom birch color map: Colormap Tester.zip

The easiest way to test this is to enable the resource pack then fly into a Terrestria sakura forest.

commented

Hi, I am not sure if I would be better off making a new ticket for this, but I am coming across this situation when Custom Colors are turned OFF. Latest compatible version of OF, FAPI, etc on 1.18.1.

I am registering the leaves color with ColorProviderRegistry. The item and particles are not affected, but the block is forced upon using the oak colormap. This is resolved when I make the leaves their own block and not LeavesBlock, but I am pretty sure this should not be occurring while the setting is off.

commented

This is still an issue with Minecraft 1.16.5 OptiFine HD U G8 and BoP, but turning Swamp Colors ON and Custom Colors OFF fixes this!!! Posting this for anyone who was still struggling with this.

commented

Fixed in the next version of Optifine (1.20.1)

commented

First of all, really like the Terrestria/Traverse combo, got a very nice EBXL feel I've missed since 1.7

I've fixed this so that any mod foliage which isn't normally tinted won't be with custom colours. If there are any leaves (that extend/are LeavesBlock), tall grass/flowers (TallPlantBlock) or pumpkin/melon type plants (StemBlock) which use different colouring to the biome they're in (i.e. the default vanilla colours, which I didn't see in Terrestria) please do re-open/post here and I can look into getting them to apply their own colours correctly. The patch to do so is not especially difficult, but is more so messy as you have to implement an OptiFine interface which obviously doesn't exist at compile time, and would slightly slow the custom colours logic down. All feels like a bit of a silly oversight in OptiFine that forgets mods can extend vanilla block classes to get to this situation though.

commented

Thanks! This looks like it'll solve the issue with Traverse and Terrestria. Also glad to know that you like the mods 😃