Skip to content

Commit

Permalink
Use "logger" instead of "Iris.logger" in Iris.java
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbot16 committed Aug 26, 2021
1 parent 5d483c5 commit c746896
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/net/coderbot/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public void onInitializeClient() {
try {
Files.createDirectories(SHADERPACKS_DIRECTORY);
} catch (IOException e) {
Iris.logger.warn("Failed to create the shaderpacks directory!");
Iris.logger.catching(Level.WARN, e);
logger.warn("Failed to create the shaderpacks directory!");
logger.catching(Level.WARN, e);
}

irisConfig = new IrisConfig();
Expand Down Expand Up @@ -106,7 +106,7 @@ public void onInitializeClient() {
}

} catch (Exception e) {
Iris.logger.error("Error while reloading Shaders for Iris!", e);
logger.error("Error while reloading Shaders for Iris!", e);

if (minecraftClient.player != null) {
minecraftClient.player.sendMessage(new TranslatableText("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).formatted(Formatting.RED), false);
Expand All @@ -123,7 +123,7 @@ public void onInitializeClient() {
minecraftClient.player.sendMessage(new TranslatableText("iris.shaders.toggled", config.areShadersEnabled() ? currentPackName : "off"), false);
}
} catch (Exception e) {
Iris.logger.error("Error while toggling shaders!", e);
logger.error("Error while toggling shaders!", e);

if (minecraftClient.player != null) {
minecraftClient.player.sendMessage(new TranslatableText("iris.shaders.toggled.failure", Throwables.getRootCause(e).getMessage()).formatted(Formatting.RED), false);
Expand Down Expand Up @@ -362,9 +362,9 @@ private static void destroyEverything() {
try {
zipFileSystem.close();
} catch (NoSuchFileException e) {
Iris.logger.warn("Failed to close the shaderpack zip when reloading because it was deleted, proceeding anyways.");
logger.warn("Failed to close the shaderpack zip when reloading because it was deleted, proceeding anyways.");
} catch (IOException e) {
Iris.logger.error("Failed to close zip file system?", e);
logger.error("Failed to close zip file system?", e);
}
}
}
Expand Down Expand Up @@ -407,7 +407,7 @@ private static WorldRenderingPipeline createPipeline(DimensionId dimensionId) {
return new DeferredWorldRenderingPipeline(programs);
}
} catch (Exception e) {
Iris.logger.error("Failed to create shader rendering pipeline, disabling shaders!", e);
logger.error("Failed to create shader rendering pipeline, disabling shaders!", e);
// TODO: This should be reverted if a dimension change causes shaders to compile again
currentPackName = "(off) [fallback, check your logs for details]";

Expand Down

0 comments on commit c746896

Please sign in to comment.