Upload files to "src/openonyx/render/group_w"

This commit is contained in:
winterflyt committed 2026-11-30 06:12:01 +02:00
1 parent 2f68dddd12
commit d8ebaf1a02
5 files changed
+689

No files matched your search

@@ -0,0 +1,116 @@
package openonyx.render.group_w;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
import openonyx.core.OnyxClient;
import openonyx.features.hud.CustomGui;
import openonyx.features.render.NoRender;
import openonyx.render.Render2D;
public final class CustomGuiRenderer {
private static StatusBarsElement statusBarsElement;
private static float d = Float.NaN;
private static HotbarElement hotbarElement;
private static BossBarElement bossBarElement;
private static TitleElement titleElement;
private static ScoreboardElement scoreboardElement;
public static float L() {
return d;
}
private static CustomGui L() {
CustomGui customGui;
if ((customGui = CustomGuiState.L()) == null) {
return null;
}
if (scoreboardElement == null) {
scoreboardElement = new ScoreboardElement(customGui);
titleElement = new TitleElement(customGui);
bossBarElement = new BossBarElement(customGui);
hotbarElement = new HotbarElement(customGui);
statusBarsElement = new StatusBarsElement(customGui);
}
return customGui;
}
public static boolean L() {
CustomGui customGui = L();
Minecraft minecraft = Minecraft.getMinecraft();
return customGui != null && customGui.isEnabled() && minecraft.thePlayer != null && minecraft.theWorld != null;
}
private CustomGuiRenderer() {
}
public static void L(Render2D render2D, float f, float g) {
Render2D render2D1 = render2D;
CustomGui customGui;
if ((customGui = L()) != null) {
Minecraft minecraft;
if ((minecraft = Minecraft.getMinecraft()).thePlayer != null && minecraft.theWorld != null) {
float h = CustomGuiState.D();
boolean bl = minecraft.currentScreen instanceof GuiChat;
NoRender noRender = OnyxClient.moduleManager.noRender;
CustomGui customGui1;
if (customGui.customGuiPart6.isEnabled() && !noRender.L(noRender.bossBar)) {
bossBarElement.L(render2D1, f, g, bl);
customGui1 = customGui;
} else {
bossBarElement.L();
customGui1 = customGui;
}
if (customGui1.customGuiPart8.isEnabled() && !noRender.L(noRender.scoreboard)) {
scoreboardElement.L(render2D1, f, g, bl);
customGui1 = customGui;
} else {
scoreboardElement.L();
customGui1 = customGui;
}
float l;
if (customGui1.customGuiPart2.isEnabled()) {
titleElement.L(render2D1, f, g, bl);
l = g;
} else {
titleElement.L();
l = g;
}
float j = l;
float i = f / 2.0F - 103.0F;
float k = f / 2.0F + 103.0F;
if (hotbarElement.L()) {
hotbarElement.L(render2D1, f, g, h);
j = hotbarElement.d();
i = hotbarElement.D();
k = hotbarElement.L();
}
f = j;
if (statusBarsElement.L()) {
statusBarsElement.L(render2D1, i, k, j, h);
if (Float.isFinite(statusBarsElement.L())) {
f = Math.min(f, statusBarsElement.L());
}
}
d = f;
}
}
}
public static void L() {
if (scoreboardElement != null) {
scoreboardElement.L();
titleElement.L();
bossBarElement.L();
hotbarElement.L();
statusBarsElement.L();
d = Float.NaN;
}
}
}