Skip to content

Avoid Overlap: elements make room for each other - #17

Merged
Dream-Master merged 22 commits into
masterfrom
Overlap
Nov 19, 2026
Merged

Dream-Master merged 22 commits into
masterfrom
Overlap

Conversation

@Ranzuu

@Ranzuu Ranzuu commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Avoid Overlap

Elements can make room for each other. While two would cover each other, one moves aside, then moves back once the other is gone (for example Waila's box moving below the boss bar like in example).

Settings (Customize > Placement)

  • Avoid Overlap: turns the feature on (disabled by default to keep the default game functionality)
  • All Elements: every element makes room, not only the ones set up for it (disabled by default)
    • The element that shows up last moves
    • Minecraft's own, locked and attached elements stay put
    • The element that shows up last moves, or the smaller one, if both show up together

Editor

  • V, then click another element: make room for it
  • B: pick which way it moves (Down, Up, Right, Left, or automatic)
    • Automatic picks the closest free spot
  • New avoid icon, blue link lines, and a dashed line for elements that are both attached and avoided
  • An outline in preview shows where an element would move in game
  • Update locked elements so they never move
  • Tooltip wrap helper

API

  • HudElement.setAvoid(String... ids): elements this one makes room for
  • HudElement.setAvoidSides(AvoidSide...): which way to move, in order
  • HudElement.setNeverMove(): never moves, others still make room for it

Implements #16

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Ranzuu Ranzuu added the Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Nov 16, 2026
@Ranzuu
Ranzuu requested a review from a team November 16, 2026 18:07
@github-actions

Copy link
Copy Markdown
Contributor

#18

github-actions Bot and others added 3 commits November 16, 2026 19:07
Co-authored-by: GitHub GTNH Actions <66495944+Ranzuu@users.noreply.github.com>
- (jack) the "who's smaller" check runs again every frame instead of once when they tie. So when one box grows past the other, they swap places mid-display

@Chitak985 Chitak985 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is mostly good except for one thing

@Chitak985
Chitak985 dismissed their stale review November 19, 2026 19:34

Issue fixed

@Dream-Master
Dream-Master merged commit e723689 into master Nov 19, 2026
2 checks passed
@Dream-Master
Dream-Master deleted the Overlap branch November 19, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants