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
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,26 @@ jobs:
- name: Build
run: .\gradlew.bat build -Pmod_version="$env:MOD_VERSION"

- name: Extract changelog for this version
shell: pwsh
run: |
$v = $env:MOD_VERSION
$escaped = $v -replace '\.', '\.'
$content = Get-Content CHANGELOG.md -Raw
$pattern = "## \[$escaped\].*?(?=\r?\n## \[|\z)"
$match = [regex]::Match($content, $pattern, [System.Text.RegularExpressions.RegexOptions]::Singleline)
if ($match.Success) {
$match.Value.Trim() | Set-Content release_body.md
} else {
"Border Quest v$v" | Set-Content release_body.md
}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: "v${{ env.MOD_VERSION }}"
body: "Border Quest v${{ env.MOD_VERSION }}"
body_path: release_body.md
files: build/libs/*.jar
draft: false
prerelease: false
Expand Down
10 changes: 8 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Border Quest — Agent Instructions

Server-side Fabric mod for Minecraft 1.21. Single-module Gradle project.
Server-side Fabric mod for Minecraft 1.21.11. Single-module Gradle project.

## Build

Expand All @@ -10,14 +10,19 @@ java -jar gradle/wrapper/gradle-wrapper.jar build
```
Requires Java 21.

Output: `build/libs/border-quest-<version>.jar` (version from `gradle.properties`, or override with `-Pmod_version=X.Y.Z`).
Output: `build/libs/border-quest-<mcversion>-<version>.jar` (version from `gradle.properties`, or override with `-Pmod_version=X.Y.Z`).

No test, lint, or typecheck commands exist.

CI:
- `build.yml` runs on all branches/PRs (compile check, no release)
- `release.yml` triggers on tag `v*` → builds, creates GitHub Release, publishes to Modrinth

Branches:
- `develop` — main dev branch (no releases)
- `1.21.11` — stable branch for Minecraft 1.21.11 releases
- Tags created on version branches only (`git tag vX.Y.Z` from `1.21.11`)

## Source layout

```
Expand Down Expand Up @@ -48,6 +53,7 @@ server/ # actual server runtime
- Commands use Fabric API's `CommandRegistrationCallback`. All start with `/bq`.
- Gson serialization for both config and saved state. Config auto-generated on first server start.
- Recipe locking via `unlockRecipes` per stage. Uses 4 inner mixin classes in `RecipeLockMixin.java` targeting `CraftingScreenHandler`, `PlayerScreenHandler`, `AbstractFurnaceBlockEntity`, and `ServerPlayNetworkHandler`. The `ServerRecipeManager` API (not `RecipeManager`) is used for recipe lookup: `getFirstMatch()` and `get(NetworkRecipeId)`.
- **Update `CHANGELOG.md`** with every user-facing change. Follow the existing format and add a new `## [Unreleased]` section if none exists.

## gradle.properties

Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Changelog

All notable changes to this project are documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [1.1.0] — 2026-05-09

### Added

- **Recipe locking**: Lock specific item recipes behind configurable stages.
Each stage has an `unlockRecipes` list. Recipes are cumulative — at stage N,
all recipes from stages 0 through N are unlocked. Covers crafting table,
player inventory (2×2), furnace/blast furnace/smoker, and recipe book.
- **Dynamic versioning**: Version is now set via git tags (`vX.Y.Z`).
Local builds use the `gradle.properties` fallback.
- **Separate branches per Minecraft version**: `develop` (main development),
`1.21.11` (stable releases), plus future version branches.
- **CI workflows**:
- `build.yml` — compiles on every push/PR (all branches, no release).
- `release.yml` — triggered by tags `v*`; builds, creates a GitHub Release,
and publishes to Modrinth automatically.
- **JAR naming**: Includes both the mod version and the Minecraft version
(`border-quest-<mcversion>-<version>.jar`).
- **AGENTS.md** — instruction file for AI agents working in this repo.

### Changed

- **Build system**: Replaced `build.bat` with direct `gradlew.bat` calls in CI.
Removed `build.bat` and `install.bat`.
- **Documentation**: README updated with build instructions, branch strategy,
and recipe locking documentation.

## [1.0.0] — 2026-05-09

### Added

- Base mod: progressive world border, altar system, stage rewards,
dimension locks, donation leaderboard, altar particles, chat announcements,
HUD sidebar.
- Map integrations: BlueMap, Dynmap, JourneyMap, Xaero's Minimap & World Map
(reflection-based).
- Discord webhook on stage completion.
- Fully configurable via `config/borderquest.json`.
- Server-side only (no client installation required).
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Border Quest

[![Modrinth Version](https://img.shields.io/modrinth/v/border-quest?label=Modrinth&logo=modrinth)](https://modrinth.com/project/border-quest)
[![Modrinth Downloads](https://img.shields.io/modrinth/dt/border-quest?label=downloads&logo=modrinth)](https://modrinth.com/project/border-quest)
[![Modrinth Game Versions](https://img.shields.io/modrinth/game-versions/border-quest?label=game%20versions&logo=modrinth)](https://modrinth.com/project/border-quest)

A **server-side Fabric mod** for Minecraft 1.21 that turns your world border into a cooperative progression challenge.
Players collect resources, donate them to **altars**, and unlock an ever-growing world — stage by stage.

Expand Down Expand Up @@ -309,12 +313,34 @@ Back up this file if you want to preserve progress between map resets.
```bash
git clone <repo>
cd border-quest-mod
./gradlew build
# Output: build/libs/border-quest-mod-x.x.x.jar
# macOS / Linux :
java -jar gradle/wrapper/gradle-wrapper.jar build
# Windows :
gradlew build
# Output: build/libs/border-quest-<mcversion>-<version>.jar
```

**Requirements:** Java 21, internet access (to download Fabric Loom and BlueMap API).

Override the mod version for testing:
```bash
java -jar gradle/wrapper/gradle-wrapper.jar build -Pmod_version=1.1.0
```

This project uses **separate branches per Minecraft version**:
- `develop` — main development branch (no releases)
- `1.21.11` — stable releases for Minecraft 1.21.11
- `1.22`, etc. — future Minecraft version support

Releases are triggered by **git tags** on a version branch:
```bash
git checkout 1.21.11
git tag v1.1.0
git push origin v1.1.0
```

This builds, creates a GitHub Release, and publishes to Modrinth automatically.

Dependencies at a glance:

| Artifact | Scope | Purpose |
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = project.findProperty('mod_version') ?: project.mod_version ?: '0.0.0-d
group = project.maven_group

base {
archivesName = project.archives_base_name
archivesName = "${project.archives_base_name}-${project.minecraft_version}"
}

repositories {
Expand Down Expand Up @@ -50,7 +50,7 @@ jar {

modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "borderquest"
projectId = "border-quest"
versionNumber = project.version
versionType = "release"
uploadFile = remapJar
Expand Down
Loading