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
55 changes: 44 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,50 @@ jobs:
JAR_PATH="$(ls -1 build/libs/*.jar | head -n 1)"
echo "CF_FILE_PATH=$JAR_PATH" >> "$GITHUB_ENV"

- name: Upload to CurseForge
uses: itsmeow/curseforge-upload@v3.1.2
with:
token: ${{ secrets.CF_API_TOKEN }}
project_id: "1452160"
game_endpoint: "hytale"
file_path: ${{ env.CF_FILE_PATH }}
game_versions: "14284"
release_type: "release"
changelog: ${{ github.event.release.body }}
changelog_type: "markdown"
- name: Load CurseForge config
shell: bash
run: |
set -euo pipefail
python - <<'PY' >> "$GITHUB_ENV"
import json, pathlib
cfg = json.loads(pathlib.Path("curseforge.json").read_text(encoding="utf-8"))
print(f"CF_PROJECT_ID={cfg['projectId']}")
print(f"CF_GAME_ENDPOINT={cfg['gameEndpoint']}")
print(f"CF_RELEASE_TYPE={cfg.get('releaseType', 'release')}")
print(f"CF_CHANGELOG_TYPE={cfg.get('changelogType', 'markdown')}")
print("CF_GAME_VERSIONS=" + ",".join(str(v) for v in cfg["gameVersions"]))
PY

- name: Build CurseForge zip
shell: bash
run: |
set -euo pipefail
ZIP_PATH="build/libs/bumenfeld-clock-${{ github.ref_name }}.zip"
zip -j "$ZIP_PATH" "$CF_FILE_PATH" "LICENSE" "USAGE.md"
echo "CF_ZIP_PATH=$ZIP_PATH" >> "$GITHUB_ENV"

- name: Upload to CurseForge (Upload API)
shell: bash
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}
run: |
set -euo pipefail
python - <<'PY'
import json, os, pathlib
changelog = os.environ.get("CHANGELOG", "")
metadata = {
"changelog": changelog,
"changelogType": os.environ.get("CF_CHANGELOG_TYPE", "markdown"),
"gameVersions": [int(v) for v in os.environ["CF_GAME_VERSIONS"].split(",") if v],
"releaseType": os.environ.get("CF_RELEASE_TYPE", "release"),
}
pathlib.Path("build/cf-metadata.json").write_text(json.dumps(metadata), encoding="utf-8")
PY
curl -sS -X POST "https://${CF_GAME_ENDPOINT}.curseforge.com/api/projects/${CF_PROJECT_ID}/upload-file" \
-H "X-Api-Token: $CF_API_TOKEN" \
-F "metadata=@build/cf-metadata.json;type=application/json" \
-F "file=@${CF_ZIP_PATH}"

- name: Publish release assets
uses: softprops/action-gh-release@v2
Expand Down
48 changes: 48 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Overview

Bumenfeld Clock adds a lightweight **HUD clock** for every player and lets them customize **format** and **screen position**.

***

## Features

* **Always-visible clock HUD** (default: `HH:mm`)
* **Per-player settings** (each player chooses their own format & position)
* **Instant updates** via commands

***

## Commands

* `/clock format &lt;pattern&gt;` — Set the time format (Java `DateTimeFormatter` patterns)
* `/clock position left|center|right` — Set the HUD position

***

## Dependencies (required)

* [MultipleHUD](https://www.curseforge.com/hytale/mods/multiplehud)

***

## Installation

1. Install **MultipleHUD** (required).
2. Drop this mod’s `.jar` into your server’s `/mods/` folder.
3. Start the server once (config gets generated).
4. Adjust config if needed and restart / rejoin.  

***

## Configuration

Default configuration:

`{ "Format": "HH:mm", "Position": "center", "UpdateIntervalMs": 1000 }`

***

## Changelog

* **1.1.0 (2026-02-02)** — Require MultipleHUD for clock HUD updates; docs/UI refresh.
* **1.0.0 (2026-02-01)** — Initial release.
7 changes: 7 additions & 0 deletions curseforge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"projectId": "1452160",
"gameEndpoint": "hytale",
"gameVersions": [14284],
"releaseType": "release",
"changelogType": "markdown"
}