Skip to content

Commit

Permalink
The obnoxious warning
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Mar 10, 2024
1 parent 0f1ac2d commit 7fcec4d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ sourceSets {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
minecraft(group = "com.mojang", name = "minecraft", version = Constants.MINECRAFT_VERSION)
mappings(loom.officialMojangMappings())
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/irisshaders/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ public static void reload() throws IOException {
}

if (loadedIncompatiblePack() && Minecraft.getInstance().player != null) {
Minecraft.getInstance().player.displayClientMessage(Component.literal("This pack (" + Iris.getCurrentPackName() + ") doesn't have DH support; DH chunks won't show up."), false);
Minecraft.getInstance().gui.setTimes(10, 70, 140);
Iris.logger.warn("Incompatible pack for DH!");
Minecraft.getInstance().gui.setTitle(Component.literal("This pack doesn't have DH support").withStyle(ChatFormatting.BOLD, ChatFormatting.RED));
Minecraft.getInstance().gui.setSubtitle(Component.literal("Distant Horizons (DH) chunks won't show up. This isn't a bug, get another shader.").withStyle(ChatFormatting.RED));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/irisshaders/iris/compat/dh/DHCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void run() {
}

public static boolean lastPackIncompatible() {
return dhPresent && lastIncompatible;
return dhPresent && hasRenderingEnabled() && lastIncompatible;
}

public void clearPipeline() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public class MixinClientPacketListener {
Minecraft.getInstance().player.displayClientMessage(Component.translatable(e instanceof ShaderCompileException ? "iris.load.failure.shader" : "iris.load.failure.generic").append(Component.literal("Copy Info").withStyle(arg -> arg.withUnderlined(true).withColor(ChatFormatting.BLUE).withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, e.getMessage())))), false));

if (Iris.loadedIncompatiblePack()) {
Minecraft.getInstance().player.displayClientMessage(Component.literal("This pack (" + Iris.getCurrentPackName() + ") doesn't have DH support; DH chunks won't show up."), false);
Minecraft.getInstance().gui.setTimes(10, 70, 140);
Iris.logger.warn("Incompatible pack for DH!");
Minecraft.getInstance().gui.setTitle(Component.literal("This pack doesn't have DH support").withStyle(ChatFormatting.BOLD, ChatFormatting.RED));
Minecraft.getInstance().gui.setSubtitle(Component.literal("Distant Horizons (DH) chunks won't show up. This isn't a bug, get another shader.").withStyle(ChatFormatting.RED));
}
}
}

0 comments on commit 7fcec4d

Please sign in to comment.