From 7aa510189aaa3b532b2309bab7d1b0f9b51a2275 Mon Sep 17 00:00:00 2001 From: octarine-noise Date: Sat, 30 Sep 2017 13:37:43 +0200 Subject: [PATCH] fix gray blocks with Optifine custom colors enabled --- .../kotlin/mods/betterfoliage/client/integration/OptifineCTM.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/mods/betterfoliage/client/integration/OptifineCTM.kt b/src/main/kotlin/mods/betterfoliage/client/integration/OptifineCTM.kt index 8d1846d..36e54de 100644 --- a/src/main/kotlin/mods/betterfoliage/client/integration/OptifineCTM.kt +++ b/src/main/kotlin/mods/betterfoliage/client/integration/OptifineCTM.kt @@ -93,7 +93,7 @@ object OptifineCTM { renderEnv.reset(ctx.world!!, ctx.blockState(Int3.zero), ctx.pos) Refs.getColorMultiplier.invokeStatic(fakeQuad, ctx.blockState(Int3.zero), ctx.world!!, ctx.pos, renderEnv.wrapped) as? Int } else null - return ofColor ?: ctx.blockData(Int3.zero).color + return if (ofColor == null || ofColor == -1) ctx.blockData(Int3.zero).color else ofColor } }