diff --git a/fabric/src/main/java/net/pcal/fastback/mod/fabric/FabricClientProvider.java b/fabric/src/main/java/net/pcal/fastback/mod/fabric/FabricClientProvider.java index 99b4c227..fb29fad3 100644 --- a/fabric/src/main/java/net/pcal/fastback/mod/fabric/FabricClientProvider.java +++ b/fabric/src/main/java/net/pcal/fastback/mod/fabric/FabricClientProvider.java @@ -65,7 +65,7 @@ public void setMinecraftClient(Minecraft client) { @Override public void renderMessageScreen(GuiGraphics drawContext, float tickDelta) { - onHudRender(drawContext, null); + renderHud(drawContext); } // ==================================================================== @@ -112,6 +112,13 @@ public Path getSavesDir() { @Override public void onHudRender(GuiGraphics drawContext, DeltaTracker tickDelta) { + renderHud(drawContext); + } + + // ==================================================================== + // Private + + private void renderHud(GuiGraphics guiGraphics) { if (this.client == null) return; if (this.hudText == null) return; if (!this.client.options.showAutosaveIndicator().get()) return; @@ -121,6 +128,6 @@ public void onHudRender(GuiGraphics drawContext, DeltaTracker tickDelta) { syslog().debug("hud text timed out. somebody forgot to clean up"); return; } - drawContext.drawString(this.client.font, this.hudText, 2, 2, 1); + guiGraphics.drawString(this.client.font, this.hudText, 2, 2, 1); } }