Skip to content

Commit

Permalink
Merge branch '1.19.1' into 1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Dec 26, 2023
2 parents ae13071 + 7c90451 commit c4f17ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/main/java/net/coderbot/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,15 @@ public static void handleKeybinds(Minecraft minecraft) {
}
} else if (shaderpackScreenKeybind.consumeClick()) {
minecraft.setScreen(new ShaderPackScreen(null));
} else if (wireframeKeybind.consumeClick()) {
if (irisConfig.areDebugOptionsEnabled() && minecraft.player != null && !Minecraft.getInstance().isLocalServer()) {
minecraft.player.displayClientMessage(Component.literal("No cheating; wireframe only in singleplayer!"), false);
}
}
}

public static boolean shouldActivateWireframe() {
return wireframeKeybind.isDown();
return irisConfig.areDebugOptionsEnabled() && wireframeKeybind.isDown();
}

public static void toggleShaders(Minecraft minecraft, boolean enabled) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class MixinGlStateManager_DepthColorOverride {
}
}

@Redirect(method = "_drawElements", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDrawElements(IIIJ)V"))
@Redirect(method = "_drawElements", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDrawElements(IIIJ)V"), remap = false)
private static void iris$modify(int mode, int count, int type, long indices) {
if (mode == GL43C.GL_TRIANGLES && ImmediateState.usingTessellation) {
mode = GL43C.GL_PATCHES;
Expand All @@ -37,7 +37,7 @@ public class MixinGlStateManager_DepthColorOverride {
GL43C.glDrawElements(mode, count, type, indices);
}

@Inject(method = "_glUseProgram", at = @At("TAIL"))
@Inject(method = "_glUseProgram", at = @At("TAIL"), remap = false)
private static void iris$resetTessellation(int pInt0, CallbackInfo ci) {
ImmediateState.usingTessellation = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import java.util.function.IntFunction;

@Mixin(GlProgram.class)
@Mixin(value = GlProgram.class, remap = false)
public class MixinGlProgram extends GlObject implements ShaderBindingContextExt {
public <U extends GlUniform<?>> U bindUniformIfPresent(String name, IntFunction<U> factory) {
int index = GlStateManager._glGetUniformLocation(this.handle(), name);
Expand Down

0 comments on commit c4f17ce

Please sign in to comment.