Skip to content

Commit

Permalink
Fixed Hud hiding not working on Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Dec 10, 2023
1 parent ad5af9f commit c3b6b5e
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class FiguraModClientForge extends FiguraMod {
public static void onInitializeClient(FMLClientSetupEvent event) {
onClientInit();
ModConfig.registerConfigScreen();
for (VanillaGuiOverlay overlay : VanillaGuiOverlay.values()) {
vanillaOverlays.add(overlay.type());
}
}

@SubscribeEvent
Expand All @@ -48,11 +51,7 @@ public static void registerOverlays(RegisterGuiOverlaysEvent event) {
event.registerBelowAll("figura_underlay", new GuiUnderlay());
}

private static final List<NamedGuiOverlay> vanillaOverlays = new ArrayList<>() {{
for (VanillaGuiOverlay overlay : VanillaGuiOverlay.values()) {
this.add(overlay.type());
}
}};
private static final List<NamedGuiOverlay> vanillaOverlays = new ArrayList<>();

public static void cancelVanillaOverlays(RenderGuiOverlayEvent.Pre event) {
if (vanillaOverlays.contains(event.getOverlay())) {
Expand Down

0 comments on commit c3b6b5e

Please sign in to comment.