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);