rbhud-1.21.0.jar
Curse Maven Snippet
What's new
RBHUD 1.21.0
Side tabs can now hang on the right side of the inventory panel, not just the left. Existing tabs are untouched: left stays the default, down to the pixel.
✨ Added
- Right-side tabs. A tab built with
.side(SideTab.Side.RIGHT)hangs on the right edge of the inventory panel as an exact mirror of a left tab: flipped banner, tip and label facing outward, notification particles bursting away from the panel. - One stack per side. Each side sorts its own tabs by
orderand stacks them from the top, independently of the other side. - One open tab per side. Left and right selections are independent, so a tab can be open on each side at the same time.
- Works in the survival inventory and on every page of the creative inventory.
🧩 For mod developers
RBHudApi.registerSideTab(
SideTab.builder("mymod:tab")
.side(SideTab.Side.RIGHT) // optional, LEFT by default
.order(100)
.element(() -> new ItemStack(Items.COMPASS))
.onClick(() -> Minecraft.getInstance().setScreen(new MyScreen()))
.build());
- New:
SideTab.Side { LEFT, RIGHT },SideTab.Builder.side(Side)andSideTab.side(). RBHudApi.isTabExpanded(id)keeps its meaning and now answers for the open tab of either side.- Fully backward compatible: no existing call needs to change.
Under the hood
SideTabManager.renderBehindnow receives the right edge of the custom panel, taken from the texture actually drawn:leftPos + 216in survival, and per page in creative, since the category, search and inventory textures each have their own offset.- The banner is mirrored through its UVs (a negative
uWidthinGuiGraphics.blit) rather than a negative scale: the quad keeps its winding, so back-face culling cannot drop it, and no mirrored texture is needed. - Click hitboxes reuse the right edge drawn on the last frame, so they always line up with what is on screen, whichever creative page is open.
🔎 Known limitations
- JEI's ingredient list sits on the right of the screen and RBHUD does not declare an exclusion area to it yet: a right-side tab can end up under the list.
- On the creative "Inventory" page, side tabs are rendered twice per frame and slide twice as fast there. This predates 1.21.0.
This mod has no additional files