Skip to content

Commit 4a6161a

Browse files
committed
fix shulker box height & inverted tab click hitbox
1 parent 3ee4a3e commit 4a6161a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/folk/sisby/inventory_tabs/TabManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public static Rect2i getPageButton(boolean left) {
282282
}
283283

284284
public static Rect2i getTabArea(WidgetPosition pos) {
285-
return new Rect2i(pos.x, pos.y + (pos.up ? -TAB_HEIGHT : TAB_HEIGHT), TAB_WIDTH, TAB_HEIGHT);
285+
return new Rect2i(pos.x, pos.y + (pos.up ? -TAB_HEIGHT : 0), TAB_WIDTH, TAB_HEIGHT);
286286
}
287287

288288
public static void drawButton(DrawContext drawContext, double mouseX, double mouseY, boolean left) {

src/main/java/folk/sisby/inventory_tabs/mixin/MixinShulkerBoxScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public MixinShulkerBoxScreen(GenericContainerScreenHandler handler, PlayerInvent
2626

2727
@Inject(method = "<init>", at = @At("TAIL"))
2828
public void containerTextHeight(ShulkerBoxScreenHandler handler, PlayerInventory inventory, Text title, CallbackInfo ci) {
29-
this.backgroundHeight -= 2;
30-
this.playerInventoryTitleY = this.backgroundHeight - 93;
29+
this.backgroundHeight -= 1;
30+
this.playerInventoryTitleY = this.backgroundHeight - 94;
3131
}
3232

3333
@Inject(method = "drawBackground", at = @At("TAIL"))

0 commit comments

Comments
 (0)