fixed overlays still displaying with F1 enabled

closes #377
This commit is contained in:
Ell 2024-12-05 21:57:44 +01:00
parent 616cedd4bf
commit 9f4a51df18

View file

@ -253,9 +253,8 @@ public class ClientEvents {
var mc = Minecraft.getInstance(); var mc = Minecraft.getInstance();
var graphics = event.getGuiGraphics(); var graphics = event.getGuiGraphics();
var stack = graphics.pose(); var stack = graphics.pose();
if (event.getName() == VanillaGuiLayers.HOTBAR) {
var res = mc.getWindow(); var res = mc.getWindow();
if (mc.player != null) { if (event.getName() == VanillaGuiLayers.HOTBAR && !mc.options.hideGui && mc.player != null) {
if (!ClientEvents.heldCache.isEmpty()) { if (!ClientEvents.heldCache.isEmpty()) {
var container = ClientEvents.heldCache.getCapability(NaturesAuraAPI.AURA_CONTAINER_ITEM_CAPABILITY, null); var container = ClientEvents.heldCache.getCapability(NaturesAuraAPI.AURA_CONTAINER_ITEM_CAPABILITY, null);
var width = Mth.ceil(container.getStoredAura() / (float) container.getMaxAura() * 80); var width = Mth.ceil(container.getStoredAura() / (float) container.getMaxAura() * 80);
@ -433,7 +432,6 @@ public class ClientEvents {
} }
} }
} }
}
private String createTimeString(int totalTicks) { private String createTimeString(int totalTicks) {
var ticks = totalTicks % 20; var ticks = totalTicks % 20;