From 1968f47fc914a134a12589c260428eb31fee1c9d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 29 Jan 2019 19:44:23 -0800 Subject: [PATCH] add a setting to play with --- src/api/java/baritone/api/Settings.java | 6 ++++++ .../baritone/launch/mixins/MixinChunkRenderContainer.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 9cb4b2ba..a1ae9c71 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -464,6 +464,12 @@ public final class Settings { */ public Setting renderCachedChunks = new Setting<>(false); + /** + * 0.0f = not visible, fully transparent + * 1.0f = fully opaque + */ + public Setting cachedChunksOpacity = new Setting<>(0.5f); + /** * Whether or not to use the "#" command prefix */ diff --git a/src/launch/java/baritone/launch/mixins/MixinChunkRenderContainer.java b/src/launch/java/baritone/launch/mixins/MixinChunkRenderContainer.java index 8075f1f2..286ca5d4 100644 --- a/src/launch/java/baritone/launch/mixins/MixinChunkRenderContainer.java +++ b/src/launch/java/baritone/launch/mixins/MixinChunkRenderContainer.java @@ -42,7 +42,7 @@ public class MixinChunkRenderContainer { if (Minecraft.getMinecraft().world.getChunk(renderChunkIn.getPosition()).isEmpty()) { GlStateManager.enableAlpha(); GlStateManager.enableBlend(); - GL14.glBlendColor(0, 0, 0, 0.5F); + GL14.glBlendColor(1, 1, 1, Baritone.settings().cachedChunksOpacity.get()); GlStateManager.tryBlendFuncSeparate(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, GL_ONE, GL_ZERO); } else { GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);