Skip to content

Commit

Permalink
fix shulker box height & inverted tab click hitbox
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Apr 7, 2024
1 parent 3ee4a3e commit 4a6161a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/folk/sisby/inventory_tabs/TabManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public static Rect2i getPageButton(boolean left) {
}

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

public static void drawButton(DrawContext drawContext, double mouseX, double mouseY, boolean left) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public MixinShulkerBoxScreen(GenericContainerScreenHandler handler, PlayerInvent

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

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

0 comments on commit 4a6161a

Please sign in to comment.