aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/InGameOverlayRendererMixin.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/com/dulkirfabric/mixin/render/InGameOverlayRendererMixin.java b/src/main/java/com/dulkirfabric/mixin/render/InGameOverlayRendererMixin.java
new file mode 100644
index 0000000..38fb623
--- /dev/null
+++ b/src/main/java/com/dulkirfabric/mixin/render/InGameOverlayRendererMixin.java
@@ -0,0 +1,20 @@
+package com.dulkirfabric.mixin.render;
+
+import com.dulkirfabric.config.DulkirConfig;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.hud.InGameOverlayRenderer;
+import net.minecraft.client.util.math.MatrixStack;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(InGameOverlayRenderer.class)
+public class InGameOverlayRendererMixin {
+
+ @Inject(method = "renderFireOverlay", at = @At("HEAD"), cancellable = true)
+ private static void onFireOverlay(MinecraftClient client, MatrixStack matrices, CallbackInfo ci) {
+ if (DulkirConfig.ConfigVars.getConfigOptions().getHideFireOverlay())
+ ci.cancel();
+ }
+}