From c17d4230124b6557401d047d1cd4088b4022f270 Mon Sep 17 00:00:00 2001 From: dima_dencep Date: Fri, 8 Dec 2023 23:33:55 +0700 Subject: [PATCH] Upstream --- build.gradle | 1 + .../iris/mixin/gui/MixinForgeGui.java | 33 ------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index 292cbeb74e..3b8dff20a6 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,7 @@ loom { "oculus-batched-entity-rendering.mixins.json", "mixins.oculus.compat.sodium.json", "mixins.oculus.compat.indigo.json", + "mixins.oculus.compat.dh.json", "mixins.oculus.compat.indium.json" ] } diff --git a/src/main/java/net/coderbot/iris/mixin/gui/MixinForgeGui.java b/src/main/java/net/coderbot/iris/mixin/gui/MixinForgeGui.java index 96177e607d..1601a5e97d 100644 --- a/src/main/java/net/coderbot/iris/mixin/gui/MixinForgeGui.java +++ b/src/main/java/net/coderbot/iris/mixin/gui/MixinForgeGui.java @@ -1,9 +1,7 @@ package net.coderbot.iris.mixin.gui; -import net.coderbot.iris.Iris; import net.coderbot.iris.gui.screen.HudHideable; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.Screen; import net.minecraftforge.client.gui.overlay.ForgeGui; @@ -13,9 +11,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.ArrayList; -import java.util.List; - @Mixin(ForgeGui.class) public class MixinForgeGui { @@ -32,32 +27,4 @@ public Minecraft getMinecraft() { ci.cancel(); } } - - // TODO: Move this to a more appropriate mixin - @Inject(method = "render", at = @At("RETURN")) - public void iris$displayBigSodiumWarning(GuiGraphics guiGraphics, float pFloat1, CallbackInfo ci) { - if (Iris.isSodiumInstalled() - || Minecraft.getInstance().options.renderDebug - || !Iris.getCurrentPack().isPresent()) { - return; - } - - Font font = Minecraft.getInstance().font; - - List warningLines = new ArrayList<>(); - warningLines.add("[" + Iris.MODNAME + "] Rubidium isn't installed; you will have poor performance."); - warningLines.add("[" + Iris.MODNAME + "] Install Rubidium if you want to run benchmarks or get higher FPS!"); - - for (int i = 0; i < warningLines.size(); ++i) { - String string = warningLines.get(i); - - final int lineHeight = 9; - final int lineWidth = font.width(string); - final int y = 2 + lineHeight * i; - - guiGraphics.fill(1, y - 1, 2 + lineWidth + 1, y + lineHeight - 1, 0x9050504E); - guiGraphics.drawString(font, string, 2, y, 0xFFFF55); - } - } - }