From d6c8501fa908520f99676aefa46dcc20de2840a6 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sat, 4 Nov 2023 15:24:16 +0100 Subject: [PATCH] Fixed classic inventory showing background --- .../java/de/florianmichael/viafabricplus/ViaFabricPlus.java | 4 +++- .../definition/classic/screen/ClassicItemSelectionScreen.java | 1 - .../injection/mixin/fixes/minecraft/MixinMinecraftClient.java | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java index f4776baaf..9d9f8a703 100644 --- a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java +++ b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java @@ -68,7 +68,9 @@ public class ViaFabricPlus { private final InformationSystem informationSystem = new InformationSystem(); public void init() { - if (!RUN_DIRECTORY.exists()) RUN_DIRECTORY.mkdir(); + if (!RUN_DIRECTORY.exists()) { + RUN_DIRECTORY.mkdir(); + } // Load overriding jars first so other code can access the new classes ViaJarReplacer.loadOverridingJars(); diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/classic/screen/ClassicItemSelectionScreen.java b/src/main/java/de/florianmichael/viafabricplus/definition/classic/screen/ClassicItemSelectionScreen.java index 1a745b8e0..1abb1a904 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/classic/screen/ClassicItemSelectionScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/classic/screen/ClassicItemSelectionScreen.java @@ -175,6 +175,5 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) { } y += ITEM_XY_BOX_DIMENSION_CLASSIC; } - super.render(context, mouseX, mouseY, delta); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java index a151a6480..fb6264897 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java @@ -112,7 +112,9 @@ public void updateCooldown(CallbackInfo ci) { @Inject(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;", ordinal = 4, shift = At.Shift.BEFORE)) public void injectTick(CallbackInfo ci) { - if (!DebugSettings.INSTANCE.executeInputsInSync.isEnabled()) return; + if (!DebugSettings.INSTANCE.executeInputsInSync.isEnabled()) { + return; + } while (!viafabricplus_mouseInteractions.isEmpty()) { viafabricplus_mouseInteractions.poll().run();