Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Bug report
description: Something in the mod doesn't work as expected.
title: "Bug: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting. Please check the open issues first in case it's already known.
- type: input
id: mod-version
attributes:
label: Mod version
description: Shown in the mod list, or in the jar name (e.g. huddable-0.4.0+26.2.jar).
placeholder: "0.4.0"
validations:
required: true
- type: dropdown
id: mc-version
attributes:
label: Minecraft version
options:
- "26.2"
- "26.3"
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened
description: What you saw, and what you expected instead. Screenshots help a lot.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: For example, which element you moved, its style or font, the Size mode, and the GUI Scale.
placeholder: |
1. Open the HUD Designer from Mod Menu
2. Drag the scoreboard to the left edge
3. ...
validations:
required: false
- type: textarea
id: share-code
attributes:
label: Layout share code
description: If it's about a layout, copy it with the editor's Export button and paste the HUD1 code here.
render: text
validations:
required: false
- type: textarea
id: logs
attributes:
label: Log
description: |
If you can, paste the relevant part of `logs/latest.log` (or upload the file). Crash? Paste the crash
report instead.
render: text
validations:
required: false
- type: textarea
id: other-mods
attributes:
label: Other mods
description: Other client mods you run, especially ones with their own HUD (Skyblocker, SkyCubed, Jade, etc.).
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Readme
url: https://github.com/Toakan-Network/Huddable#readme
about: Features, settings and known limitations.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Feature request
description: Suggest something new or a change to an existing feature.
title: "Feature request: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Huddable is client-side and works on any server. It only changes where and how the HUD draws, so requests
that need server data or send anything to the server can't be added.
- type: textarea
id: summary
attributes:
label: Summary
description: What should the mod do?
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem or use case
description: What are you trying to lay out, and what gets in the way today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposal
description: How it could work, for example in the editor, an element's options panel, or General Settings.
validations:
required: false
- type: textarea
id: notes
attributes:
label: Notes or blockers
description: Anything already known, e.g. another mod involved, or alternatives you considered.
validations:
required: false
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Builds the mod (a jar per Minecraft version) on every push to main or dev and on pull requests, and uploads
# the jars.

name: build
on:
push:
branches: [main, dev]
paths:
- 'src/**'
- 'versions/**'
- 'build.gradle'
- 'common.gradle'
- 'gradle.properties'
- 'settings.gradle'
pull_request:
paths:
- 'src/**'
- 'versions/**'
- 'build.gradle'
- 'common.gradle'
- 'gradle.properties'
- 'settings.gradle'
schedule:
- cron: '27 17 * * *'
workflow_call:
workflow_dispatch:

# Only reads the repository; artifact uploads don't use the token.
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v7
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v6
- name: setup jdk 25
uses: actions/setup-java@v6
with:
java-version: 25
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
uses: actions/upload-artifact@v7
with:
name: Artifacts
path: build/libs/
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Attaches the jars (one per Minecraft version: 26.2 and 26.3) to the GitHub release whenever a release is
# published. Modrinth and CurseForge aren't set up yet; Shopping List's publish.yml shows how to add them.
#
# Runs as three chained jobs: check the tag -> build (reusing build.yml) -> publish.

name: publish

on:
release:
types: [published]

# Read-only by default; only the publish job gets write access.
permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v7

- name: check tag matches mod_version
run: |
v=$(grep '^mod_version=' gradle.properties | cut -d= -f2 | tr -d '[:space:]')
tag="${GITHUB_REF_NAME#v}"
if [ "$tag" != "$v" ]; then
echo "::error::Release tag $GITHUB_REF_NAME does not match mod_version $v in gradle.properties"
exit 1
fi

build:
needs: check
uses: ./.github/workflows/build.yml

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: download built jars
uses: actions/download-artifact@v8
with:
name: Artifacts
path: build/libs/

- name: attach jars to the release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "$GITHUB_REF_NAME" build/libs/huddable-*+26.2.jar build/libs/huddable-*+26.3.jar --clobber --repo "$GITHUB_REPOSITORY"
18 changes: 17 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ update it in the same commit when a step lands or an issue is found or fixed.
`mixin.GuiToastsMixin`, wraps `Gui`'s one `ToastManager.extractRenderState` call: toasts aren't a Fabric HUD
element, and Fancy Notify draws its notifications from a HEAD inject inside that call, so they move too. Add no
other mixins without a reason like these.
- meowdding-lib overlays (`compat.MeowddingCompat`): meowdding draws every overlay in one loop
(`Overlays.onHudRender`) inside SkyblockAPI's `RenderHudEvent`, fired from vanilla's sleep overlay, so they
aren't Fabric layers. Each overlay is registered as an API part, and `mixin.meowdding.OverlaysMixin` wraps the
loop's `Overlay.extract` call. That mixin config (`huddable.meowdding.mixins.json`) is optional: its plugin
applies it only when meowdding-lib is loaded, with `defaultRequire: 0`, so a meowdding change only turns the
compat off. meowdding-lib is `compileOnly`; only that class and package may touch it. General Settings'
Advanced toggle (`meowddingOverlays`) turns it off.
- Fonts (`HudFonts`): vanilla prepares text after an element draws, with the `Font` it was given, so an element's
font is a wrapper `Font` (built through `mixin.FontAccessor`) that sends the default font to the chosen one.
`mixin.HudFontMixin` hands it to vanilla's HUD classes in place of `Minecraft.font` while `HudWrapper` (or
Expand All @@ -42,7 +49,7 @@ update it in the same commit when a step lands or an issue is found or fixed.
types.
- Fabric HUD API sources for checking names are in `..\.mc-sources\fabric-rendering-v1\<mc>\`; vanilla in
`..\.mc-sources\<mc>\`.
- Dependencies: Fabric API only. Mod Menu is optional (`compileOnly`, `suggests`) and is the only way to open
- Dependencies: Fabric API only (meowdding-lib is compile-only, see above). Mod Menu is optional (`compileOnly`, `suggests`) and is the only way to open
Huddable's screen (`HuddableScreen`: HUD Designer and General Settings); only `compat.ModMenuCompat` may touch
its API.

Expand All @@ -53,6 +60,15 @@ As in CraftingTracker: `./gradlew build` builds `:mc26.2` and `:mc26.3` from the
- No `org.lwjgl.glfw`. Read `InputConstants` key and mouse codes with `HuddableClient.inputCode("MOUSE_BUTTON_LEFT")`;
they differ between 26.2 and 26.3.

## Branches and CI
- Repo: `Toakan-Network/Huddable` (`origin`). Work happens on `dev`; `main` is what's released. Commit to `dev`
and leave merging into `main` to the user.
- `.github/workflows/build.yml` builds both jars on pushes to `main` and `dev`, on pull requests, nightly and by
hand, and uploads `build/libs` as the `Artifacts` artifact.
- `.github/workflows/publish.yml` runs when a GitHub release is published: the tag must equal `mod_version`
(`v` prefix allowed), then it builds and attaches the 26.2 and 26.3 jars to the release. GitHub only for now;
Modrinth and CurseForge can be added the way Shopping List's `publish.yml` does it.

## Testing in game
Mod Menu isn't in the dev client, so test the editor in the live instance
(`G:\Games\Minecraft\Instances\Hypixel 26.2\`) or any instance with Mod Menu. Config is `config\huddable\`.
9 changes: 9 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ in game. v1 is the base: wrapping and moving the vanilla elements.
(each toolbar drag step).
- 0.3.10: `inputCode` looks each key code up once (same helper as ChatTabs and Shopping List).
- 0.3.11: share codes import with line breaks or spaces in them (as Discord wraps long codes).
- 0.4.0: meowdding-lib overlays (SkyCubed, SkyOcean) placed one by one: each is an API part, and an optional
mixin (`mixin.meowdding`, applied only with meowdding-lib loaded) moves its draw call inside meowdding's
overlay loop. General Settings has an Advanced toggle to turn it off.
- 0.4.1: overlays switched off in their own mod aren't listed in the editor (they showed as empty boxes).

## Untested in game
- The whole editor: dragging, snapping, scaling, the options panel, and the profile buttons.
Expand All @@ -56,6 +60,11 @@ in game. v1 is the base: wrapping and moving the vanilla elements.
toasts), the font list paging, a profile font from a disabled pack falling back, share codes keeping fonts,
Font quality reloading once and surviving a restart.

- 0.4.0: meowdding overlays on SkyBlock with SkyCubed: listed with stable IDs, boxes matching what they draw
(RPG overlay, text overlays, alignment END/CENTER), moving, scaling and hiding them, the profile screen scale,
the Advanced toggle off and on, and meowdding's own editor still working alongside. 0.4.1: an overlay
switched off in SkyCubed leaves the list and comes back, at its saved position, when switched on.

## Next (ElvUI direction)
- Shopping List on Huddable: register its five panels through the API (resizable), hand its Move HUD to
Huddable's editor and ignore its `sandbox_widget` layer. Waiting for Huddable on Modrinth, so Shopping List's CI
Expand Down
11 changes: 11 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ repositories {
url = "https://maven.terraformersmc.com/releases"
content { includeGroup "com.terraformersmc" }
}
maven {
url = "https://maven.teamresourceful.com/repository/maven-public/"
content { includeGroupAndSubgroups "me.owdding" }
}
}

dependencies {
Expand All @@ -39,6 +43,13 @@ dependencies {
// uk.toakan.tad.huddable.compat.ModMenuCompat (fabric.mod.json entrypoint).
compileOnly("com.terraformersmc:modmenu:${project.modmenu_version}") { transitive = false }

// meowdding-lib (optional): its overlays are placed one by one. Only compat.MeowddingCompat and
// mixin.meowdding touch it, and that mixin config applies only when meowdding-lib is loaded.
compileOnly("me.owdding.meowdding-lib:meowdding-lib:${project.meowdding_lib_version}") {
transitive = false
capabilities { requireCapability("me.owdding.meowdding-lib:meowdding-lib-${project.minecraft_version}") }
}

// Unit tests for the plain logic (snapping, share codes); nothing here ships in the jar.
testImplementation platform("org.junit:junit-bom:5.14.2")
testImplementation "org.junit.jupiter:junit-jupiter"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ loader_version=0.19.5
# Minecraft, Fabric API and Mod Menu versions are per Minecraft version, in versions/<mc>/gradle.properties.

# Mod Properties
mod_version=0.3.11
mod_version=0.4.1
maven_group=uk.toakan.tad
archives_base_name=huddable
Empty file modified gradlew
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions modrinth.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Rearrange the vanilla HUD in game, no resource packs needed.
- Scale elements from 25% to 400%, resize chat and bars by their edges, or hide them
- Place other mods' HUD elements too (anything added through Fabric API's HUD registry), and toasts, Fancy
Notify's notifications included
- Place SkyCubed's and SkyOcean's overlays one by one (meowdding-lib overlays, can be turned off)
- Window, GUI Scale or Fixed sizing for the whole HUD
- Restyle health, hunger, armor and air as bars or numbers, in your own colours
- Put the scoreboard, chat, tab list and other HUD text in any font from your resource packs, per profile or
Expand Down
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ resize too. Positions are kept in the profile even if you remove the mod.
at the corner set in Fancy Notify's options, and Huddable moves it from there. Hiding toasts also pauses Fancy
Notify's notifications until you show them again.

**meowdding overlays** (SkyCubed, SkyOcean and other mods built on meowdding-lib) are listed one by one under
their mod's name, for example `SkyCubed: Health`, and move, scale and hide like the rest. Their box is the one
meowdding's own overlay editor highlights. meowdding's own editor (dragging overlays with chat open) still works, but its
highlight and clicks stay where meowdding places the overlay, so pick one editor per overlay. SkyCubed's Moveable
Hotbar and Moveable Item Text aren't listed: SkyCubed draws those on the vanilla hotbar, which Huddable already
places. Overlays switched off in their own mod aren't listed; switch them on there and they come back with
their saved position. Turn this off under General Settings, Advanced.

Other mods that draw their HUD some other way can't be moved until they support Huddable.

### Fonts
Expand Down Expand Up @@ -96,6 +104,9 @@ bar (armor only with armor on, air only underwater or while it refills).
scales but uses more video memory. Players on the old 4x default were moved to Pack's own in 0.3.4.
This applies to every TrueType font in the game, other mods' included, as Minecraft loads each font once for
everyone. Changing it reloads the resource packs once when you leave the screen.
- **Advanced, meowdding overlays** (default on, only shown with meowdding-lib installed): list meowdding-lib's
overlays as their own elements (see Other mods' HUD elements). Turned off, they go back to where meowdding puts
them and leave the editor; their saved positions are kept for when you turn it on again.

Saved in `config/huddable/settings.json`, which also remembers the active profile.

Expand Down
13 changes: 13 additions & 0 deletions src/main/java/uk/toakan/tad/huddable/ExternalPart.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package uk.toakan.tad.huddable;

import java.util.function.BooleanSupplier;
import uk.toakan.tad.huddable.api.HuddableApi;
import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElement;
import net.minecraft.client.DeltaTracker;
Expand Down Expand Up @@ -37,6 +38,8 @@ public final class ExternalPart implements HudPart {
private int measuredWidth = -1;
private int measuredHeight = -1;
private long lastMeasure;
/** Listed in the editor only while true: false while the element's own mod has it switched off. */
private BooleanSupplier listed = () -> true;

private ExternalPart(Identifier id, Component label, HuddableApi.Spec spec) {
this.id = id;
Expand All @@ -52,6 +55,16 @@ public static ExternalPart api(Identifier id, Component label, HuddableApi.Spec
return new ExternalPart(id, label, spec);
}

/** Leaves the part out of the editor while {@code listed} is false; its saved layouts are kept. */
public ExternalPart listedWhen(BooleanSupplier listed) {
this.listed = listed;
return this;
}

public boolean listed() {
return listed.getAsBoolean();
}

boolean isFabric() {
return spec == null;
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/uk/toakan/tad/huddable/GeneralSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public final class GeneralSettings {
public String active = Profiles.DEFAULT_NAME;
/** Oversample for every TrueType font, or 0 for the pack's own. Read on font-loading threads. */
public volatile int fontOversample = DEFAULT_FONT_OVERSAMPLE;
/** Advanced: list meowdding-lib's overlays (SkyCubed, SkyOcean) as parts and move their drawing. */
public boolean meowddingOverlays = true;
/**
* 0 in files from before 0.3.4, so their old default can be moved once. No initializer: Gson runs the
* constructor, so one would also fill it in for old files.
Expand Down Expand Up @@ -62,6 +64,7 @@ public static void save() {
GeneralSettings copy = new GeneralSettings();
copy.active = s.active;
copy.fontOversample = s.fontOversample;
copy.meowddingOverlays = s.meowddingOverlays;
copy.settingsVersion = s.settingsVersion;
JsonFiles.writeAsync(FILE, () -> copy);
}
Expand Down
Loading
Loading