blob: 521bf1a1affba33fbf1905fe5e54083acf9e25ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package makamys.lodmod.mixin;
import java.nio.IntBuffer;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import makamys.lodmod.LODMod;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderGlobal;
@Mixin(RenderGlobal.class)
abstract class MixinRenderGlobal_OptiFine {
// for OptiFine's Fast Render option
@Redirect(method = "renderSortedRenderersFast", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glCallLists(Ljava/nio/IntBuffer;)V"), remap=false)
private void redirectRenderAllRenderLists(IntBuffer buffer) {
if(LODMod.shouldRenderVanillaWorld()) {
GL11.glCallLists(buffer);
}
}
}
|