only when the setting is enabled
This commit is contained in:
parent
b471d7419e
commit
9028564c10
@ -17,6 +17,7 @@
|
||||
|
||||
package baritone.launch.mixins;
|
||||
|
||||
import baritone.Baritone;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ChunkRenderContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@ -37,6 +38,7 @@ public class MixinChunkRenderContainer {
|
||||
at = @At("HEAD")
|
||||
)
|
||||
private void preRenderChunk(RenderChunk renderChunkIn, CallbackInfo ci) {
|
||||
if (Baritone.settings().renderCachedChunks.get()) {
|
||||
if (Minecraft.getMinecraft().world.getChunk(renderChunkIn.getPosition()).isEmpty()) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
@ -46,4 +48,5 @@ public class MixinChunkRenderContainer {
|
||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user