From b64ad459921d1710ac9eb8022ccc3cad36745523 Mon Sep 17 00:00:00 2001 From: Rime <81419447+Emirlol@users.noreply.github.com> Date: Tue, 26 Nov 2024 06:49:31 +0300 Subject: Tweak texture positions for quick craft (#1031) * Tweak texture positions * Move the quicknav overlay into the crafting table container * Fix position and texture stuff after rebase * Wtf formatting --- .../skyblock/item/SkyblockCraftingTableScreen.java | 18 +++++++++--------- .../item/SkyblockCraftingTableScreenHandler.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java index b8e42fcc..780d851e 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java @@ -1,7 +1,5 @@ package de.hysky.skyblocker.skyblock.item; -import java.time.Duration; - import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.skyblock.itemlist.recipebook.SkyblockRecipeBookWidget; import net.minecraft.client.gui.DrawContext; @@ -19,6 +17,8 @@ import net.minecraft.screen.slot.SlotActionType; import net.minecraft.text.Text; import net.minecraft.util.Identifier; +import java.time.Duration; + public class SkyblockCraftingTableScreen extends HandledScreen { private static final Identifier TEXTURE = Identifier.ofVanilla("textures/gui/container/crafting_table.png"); protected static final ButtonTextures MORE_CRAFTS_TEXTURES = new ButtonTextures( @@ -27,14 +27,13 @@ public class SkyblockCraftingTableScreen extends HandledScreen { this.recipeBook.toggleOpen(); - this.x = this.recipeBook.findLeftEdge(this.width, this.backgroundWidth) + 11; + this.x = this.recipeBook.findLeftEdge(this.width, this.backgroundWidth); button.setPosition(this.x + 5, this.height / 2 - 49); - if (moreCraftsButton != null) moreCraftsButton.setPosition(this.x + 174, this.y + 62); + if (moreCraftsButton != null) moreCraftsButton.setPosition(this.x + 152, this.y + 63); })); if (!handler.mirrorverse) { - moreCraftsButton = new TexturedButtonWidget(this.x + 174, y + 62, 16, 16, MORE_CRAFTS_TEXTURES, + moreCraftsButton = new TexturedButtonWidget(this.x + 152, y + 63, 16, 16, MORE_CRAFTS_TEXTURES, button -> this.onMouseClick(handler.slots.get(26), handler.slots.get(26).id, 0, SlotActionType.PICKUP)); moreCraftsButton.setTooltipDelay(Duration.ofMillis(250L)); moreCraftsButton.setTooltip(Tooltip.of(Text.literal("More Crafts"))); @@ -97,7 +96,8 @@ public class SkyblockCraftingTableScreen extends HandledScreen