From 55f911e98a69c95dcd5c3ff8a6dae8e0f35d6d73 Mon Sep 17 00:00:00 2001 From: viciscat <51047087+viciscat@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:08:44 +0100 Subject: [PATCH] Garden plot fixes (#1126) --- .../skyblocker/skyblock/garden/GardenPlotsWidget.java | 7 +++++-- .../itemlist/recipebook/SkyblockRecipeBookWidget.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/garden/GardenPlotsWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/garden/GardenPlotsWidget.java index 213315ca16..41da74dab3 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/garden/GardenPlotsWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/garden/GardenPlotsWidget.java @@ -211,7 +211,7 @@ protected void renderWidget(DrawContext context, int mouseX, int mouseY, float d if (hovered) { context.fill(slotX + 1, slotY + 1, slotX + 17, slotY + 17, 0xAA_FF_FF_FF); matrices.push(); - matrices.translate(slotX, slotY, 100.f); + matrices.translate(slotX, slotY, 50.f); matrices.scale(1.125f, 1.125f, 1.125f); context.drawItem(item, 0, 0); matrices.pop(); @@ -221,7 +221,10 @@ protected void renderWidget(DrawContext context, int mouseX, int mouseY, float d boolean infested = infectedPlots.contains(i); if (infested && (timeMillis & 512) != 0) { + matrices.push(); + matrices.translate(0, 0, 200.f); context.drawBorder(slotX + 1, slotY + 1, 16, 16, 0xFF_FF0000); + matrices.pop(); } // tooltip @@ -281,7 +284,7 @@ public void onClick(double mouseX, double mouseY) { if (SkyblockerConfigManager.get().farming.garden.closeScreenOnPlotClick && MinecraftClient.getInstance().currentScreen != null) MinecraftClient.getInstance().currentScreen.close(); - if (hoveredSlot == 12) MessageScheduler.INSTANCE.sendMessageAfterCooldown("/warp garden", true); + if (hoveredSlot == 12) MessageScheduler.INSTANCE.sendMessageAfterCooldown("/plottp barn", true); else MessageScheduler.INSTANCE.sendMessageAfterCooldown("/plottp " + gardenPlots[hoveredSlot].name, true); } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java index 0390c98110..b1767acd0f 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java @@ -161,7 +161,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { @Override public boolean keyPressed(int keyCode, int scanCode, int modifiers) { var client = MinecraftClient.getInstance(); - if (client.isWindowFocused()) { + if (client.isWindowFocused() && currentTab != null) { var mouse = client.mouse; var window = client.getWindow(); var mouseX = (mouse.getX() * ((double) window.getScaledWidth() / (double) window.getWidth()));