Skip to content

Commit

Permalink
Ctrl G
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jan 23, 2025
1 parent 3f273a2 commit 7a6d75b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,9 @@ public boolean shouldAllowUnknownShaders() {
public boolean shouldSkip(ResourceLocation value) {
return shadersToSkip.contains(value); // TODO
}

public void setUnknown(boolean b) throws IOException {
this.allowUnknownShaders = b;
save();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta)
Component.literal("No")));
}

if (Screen.hasControlDown() && InputConstants.isKeyDown(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_KEY_G)) {
Minecraft.getInstance().setScreen(new ConfirmScreen((option) -> {
try {
Iris.getIrisConfig().setUnknown(option);
} catch (IOException e) {
throw new RuntimeException(e);
}
Minecraft.getInstance().setScreen(this);
}, Component.literal("Unknown shader toggle"),
Component.literal("This allows unknown shaders to load in."),
Component.literal("Enable"),
Component.literal("Disable")));
}

if (!this.guiHidden) {
super.render(guiGraphics, mouseX, mouseY, delta);

Expand Down

0 comments on commit 7a6d75b

Please sign in to comment.