-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OptiFine changing color and textures of leaves #8
Comments
Looking at the documentation, this is ridiculously complex. There are multiple matching rules:
There are shorthands, e.g. writing Of course we only need to support a subset of this (full block texture replacements), but it also needs to not fail on all other cases. |
The There's still a lot of open questions and it needs more testing on different resource packs. |
It's not just Connected Textures, Custom Colors affect leaf colors as well. The Swamp Colors option also changes the given color if turned off - though that seems to only be an optimization, so no need to support it. |
The ConnectedTexturesMod for Fabric has a very helpful description. Apparently there are two different formats for Connected Textures:
ConnectedTexturesMod for Fabric is obviously for the latter; for the first, there's Connected Block Textures. As mentioned previously, there's also Colormatic for OptiFine/MCPatcher's Custom Colors. I'm not sure if any of those 3 mods are compatible with the way we detect colors (TODO: test), but if they are and it's just OptiFine that's incompatible, it's probably not worth supporting it, seeing all the effort that's being done to replace every aspect of OptiFine. The mods are all GPL licensed, so it's not as easy as getting inspired by their code, but maybe there is/will be an API we could use. |
Ported the old code with some adjustments onto the ctm2 branch and made a test release. BetterVanillaBuilding seems like a good pack to test on. Maybe shipping the code and fixing the errors that pop up will turn it into something usable. edit: 2nd test release fixing the handling of ids like "DarkForest" |
This image shows an issue with certain resource packs using OptiFine (A Little Taste of Jerm V2.5 on picture).
OptiFine can render leaves with different textures depending on the biome.
The actual block color (from
getBlockColors()
) or texture (fromgetSprite()
) does not seem change.This probably means the only way to fix this is by reproducing how OptiFine remaps textures.
Maybe looking at Colormatic can help
though it does not say anything about textures and the colors might not be an issue at all.
The text was updated successfully, but these errors were encountered: