Skip to content

Feature/newbarsbugfixes#2247

Open
Akar1881 wants to merge 23 commits intoSkyblockerMod:masterfrom
Akar1881:feature/newbarsbugfixes
Open

Feature/newbarsbugfixes#2247
Akar1881 wants to merge 23 commits intoSkyblockerMod:masterfrom
Akar1881:feature/newbarsbugfixes

Conversation

@Akar1881
Copy link

FancyStatusBars: Bug fixes, UX improvements, and hotbar-relative default layout

Hey everyone! This PR bundles a bunch of improvements I made to the FancyStatusBars feature that I've been working through over the past while. There's bug fixes, quality-of-life tweaks, and a new system that makes the default bar layout work correctly at any GUI scale.


Bug fixes

  • Fixed when you click a bar it just vanishs
  • Fixed when you hide a bar you cant show it again

UX / editor improvements

  • Added a nudge overlay timer: the X/Y position overlay now displays not just during sub-element dragging, but also for 80 frames after using Shift+Arrow keys to nudge an element. This gives you visual feedback that the nudge registered without the overlay staying on screen permanently.

Hotbar-relative default layout (new)

The biggest addition here is a new HOTBAR_RELATIVE anchor mode for bars. Previously, the default layout was stored as screen-fraction positions (x, y as 0-1 values). This meant the bars would drift to different positions depending on your GUI scale — what looked perfect at scale 2 would be completely off at scale 1 or 3.

Now, default bars store their position as GUI-pixel offsets from the hotbar's top-center instead. Since the Minecraft hotbar is always 182x22 GUI pixels regardless of scale, this makes the default layout completely scale-independent.

How it works:

  • Each default bar has hotbarRelOffX, hotbarRelOffY, and hotbarPixelWidth fields
  • updatePositions() computes the actual screen pixel position each frame from these offsets and the current screen size
  • The moment you drag a bar in the config screen it detaches from the hotbar anchor and becomes a free-floating bar (same behaviour as before), so you still have full control
  • "Reset to defaults" puts bars back into hotbar-relative mode

Default layout: three stat bars (Health / Intelligence / Defense) tiled across the hotbar width with 1px gaps, XP bar spanning the full hotbar width 1px above the hotbar, and Speed / Air bars flanking just outside the hotbar's left and right edges below it.


For anyone who wants a walkthrough of the config screen and how to customize your bars, here's a video tutorial:
https://youtu.be/DED4CUVz_Og?si=5CoVrLA3MHZgTL4P


Let me know if anything looks off or needs adjusting. Happy to revise!

crownbot and others added 20 commits March 16, 2026 12:41
Add a new file, replit.md, which serves as documentation for the Skyblocker Minecraft mod, detailing its overview, tech stack, dependencies, build instructions, and project structure.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 1b18c6eb-f916-4518-96e6-e099b71411f9
Replit-Helium-Checkpoint-Created: true
Add new visual styles and improve the bar editor functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f7221892-fd25-4f2c-92e4-3fe81d99f493
Replit-Helium-Checkpoint-Created: true
Adds a "Reset to Default" button to the status bars configuration screen. This button calls a new `resetToDefaults()` method in `FancyStatusBars.java` which restores each status bar to its `StatusBarType`'s default anchor, gridY, and recomputes gridX. The UI is then refreshed. This change also includes updates to `StatusBar.java` for visual styling and `StatusBarsConfigScreen.java` for interaction model changes including click-to-select and drag-and-drop improvements, as well as fixes for bars disappearing permanently.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: da03ce20-2a8f-43a3-9d4a-c8bc00c6c4dc
Replit-Helium-Checkpoint-Created: true
Remove unused constants and fields, adjust text rendering position, and refactor mouse event handling for bar selection and tooltip display.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2b5834e7-af04-4ce5-a973-0561564f0610
Replit-Helium-Checkpoint-Created: true
Update bar configuration options to allow custom height, text/icon positioning, and fix hide/show functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 68a2c743-4316-4dfb-b14c-c1619b584923
Replit-Helium-Checkpoint-Created: true
Refactor status bar rendering to introduce a separate pass for custom icons, enhance hit area detection for custom text and icons with larger clickable regions and improved visual handles, and implement global click detection for custom elements in the configuration screen.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2f08e38a-d759-4f64-9e25-097b9e9d192e
Replit-Helium-Checkpoint-Created: true
Introduces a new 'Border Radius' option to the bar customization menu, allowing users to set rounded corners (0-20px) via a dialog. Includes backend logic for rounded rendering and translation updates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 07eed814-d59e-487e-a6f6-4ca2c5b543fc
Replit-Helium-Checkpoint-Created: true
…pdates

Refactor StatusBarsConfigScreen to enable resizing of text and icon sub-elements, add arrows to bar outlines, use exact visual areas for outlines, and ensure resetToDefaults correctly initializes all customizable fields.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 06a4ca25-d817-4596-9786-fed83f07f5ee
Replit-Helium-Checkpoint-Created: true
Refactors StatusBarsConfigScreen to fix bugs related to bar selection, arrow clicking, and X/Y coordinate display during drags, while also introducing independent selection for bar sub-elements (text/icon).

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f0cbd7c7-b2b8-4afa-8f64-e29a7300d9c0
Replit-Helium-Checkpoint-Created: true
… dialog

Implement keyboard shortcuts using Shift and Alt modifiers with arrow keys for fine-tuning the position and size of bars, text, and icons. Replace the old popup with a new paginated TipsScreen accessible via the "?" button, offering navigational buttons and detailed usage instructions.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6655f1dd-8b26-4eee-a11c-6f40dd1ffc2f
Replit-Helium-Checkpoint-Created: true
Update bar editing to require selection before dragging or resizing, and add a 'Reset This Bar' option.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ff011cd4-e141-4ec1-b321-619beee041bf
Replit-Helium-Checkpoint-Created: true
Introduce a new method to apply preferred default status bar settings, updating both the initial configuration for new users and the reset functionality to use this layout.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a46d4de4-8e91-4046-bd4e-72057b75ba97
Replit-Helium-Checkpoint-Created: true
Introduce a position overlay that displays offsets when dragging sub-elements (text/icons) and provides temporary feedback after keyboard nudges. Additionally, update default bar layouts to precisely match the provided JSON configuration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 39941445-5621-40e5-998b-05433ac1a93b
Replit-Helium-Checkpoint-Created: true
Add new anchoring logic to ensure UI elements remain positioned relative to the hotbar across various GUI scales.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: e03c2ee6-519d-40cd-adc0-9b84fa753bcd
Replit-Helium-Checkpoint-Created: true
Update `FancyStatusBars.java`, `StatusBar.java`, and `StatusBarsConfigScreen.java` to introduce hotbar-relative positioning for status bars, allowing them to scale and move with the hotbar.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ac070673-22e9-40c4-bddc-0f9792e0f938
Replit-Helium-Checkpoint-Created: true
Update `FancyStatusBars.java` to recalibrate hotbar-relative offsets, widths, and custom text positions based on the user's provided configuration and reference resolution (960x540), ensuring accurate visual alignment of status bars.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 96bad947-b56c-40e2-a905-e8cc8e5b04ab
Replit-Helium-Checkpoint-Created: true
Update bar positioning in FancyStatusBars.java to adjust widths, offsets, and relative positions of Health, Intelligence, Defense, XP, Speed, and Air bars to align with the hotbar and each other.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a145c3e9-90f0-473e-aa30-31615d8eeec6
Replit-Helium-Checkpoint-Created: true
Update `FancyStatusBars.java` to adjust the vertical offset (`hotbarRelOffY`) for Health, Intelligence, and Defense bars from -19 to -21, creating a 2px gap between these bars and the XP bar.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6802438d-7ead-45bc-a708-df9467e09bda
Replit-Helium-Checkpoint-Created: true
Add new image files showcasing customizable status bars.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fb19da03-0127-4810-a88b-5dcd07c874e7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 3ffc792c-f012-4aa5-839c-01e40f21ec4b
Replit-Helium-Checkpoint-Created: true
@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Mar 17, 2026
@unknown-salt
Copy link

unknown-salt commented Mar 17, 2026

The Reset to Default button does not reset the colors.
Screenshot 2026-03-17 150349

@Akar1881
Copy link
Author

The Reset to Default button does not reset the colors. Screenshot 2026-03-17 150349

I will fix thx for the feedback

@Bloxigus
Copy link
Contributor

Bloxigus commented Mar 17, 2026

so much slop.... couldnt even write a description without it...

@Akar1881
Copy link
Author

The Reset to Default button does not reset the colors. Screenshot 2026-03-17 150349

Fixed it

@waddletz
Copy link

Amazing stuff, minus 5000 credits for the slop. I say why not add adjustable alpha (opacity) option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviews needed This PR needs reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants