Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5597c03
Start Albion performance fork 1.1.0 build baseline
wickidcow Aug 11, 2026
df8328d
Remove upstream publishing credentials from Albion fork
wickidcow Aug 11, 2026
30c568d
Require FAWE and Paper 1.21.11+ for Albion fork
wickidcow Aug 11, 2026
d6ecaa0
Add MagmaGuy homage and Albion fork README
wickidcow Aug 11, 2026
76265d4
Modernize Albion CI and verify versioned JAR
wickidcow Aug 11, 2026
6bde3bb
Publish raw BetterStructures 1.1.x JAR release assets
wickidcow Aug 11, 2026
dedcba1
Queue player-driven structure generation by server load
wickidcow Aug 11, 2026
b14dc8a
Throttle new-chunk structure fitting through generation queue
wickidcow Aug 11, 2026
7c80f84
Add Albion MSPT generation and paste budgets
wickidcow Aug 11, 2026
fc3a920
Release queued chunk tickets safely on reload and shutdown
wickidcow Aug 11, 2026
9c1a9f7
Make Albion performance scheduler reload-safe and disable upstream se…
wickidcow Aug 11, 2026
9e5cff7
Spread schematic preparation across ticks before paste
wickidcow Aug 11, 2026
caab62c
Reduce synchronous pedestal scanning and block physics
wickidcow Aug 11, 2026
16102a8
Fix Gradle wrapper permissions in CI
wickidcow Aug 11, 2026
8f6939b
Fix Gradle wrapper permissions in release workflow
wickidcow Aug 11, 2026
58665df
Use stable MagmaCore list argument for module generation
wickidcow Aug 11, 2026
17ce6aa
Remove stale Nightbreak setup helper dependency
wickidcow Aug 11, 2026
4847370
Remove stale Nightbreak command dependencies from Albion fork
wickidcow Aug 11, 2026
02dd7d4
Update module world creation for Paper 1.21.11
wickidcow Aug 11, 2026
d5d2974
Update synthetic clipboard for FAWE WorldEdit API
wickidcow Aug 11, 2026
c51d892
Preserve WorldEdit utilities while adding FAWE clipboard method
wickidcow Aug 11, 2026
a000a23
Adapt content importer to published MagmaCore API
wickidcow Aug 11, 2026
f1e3c03
Use real FAWE BlockArrayClipboard for metadata blocks
wickidcow Aug 11, 2026
777cde5
Move natural structure placement onto serialized async FAWE pipeline
wickidcow Aug 11, 2026
1d4d03b
Prevent recursive generation from FAWE chunk preparation
wickidcow Aug 11, 2026
f8cc52c
Serialize fitting with active FAWE structure work
wickidcow Aug 11, 2026
08fbd40
Run pedestal sampling after async chunk preparation
wickidcow Aug 11, 2026
aa0d1cb
Cancel stale CI runs when branch head changes
wickidcow Aug 11, 2026
90fd9fd
Use FAWE CPU clipboard without global settings dependency
wickidcow Aug 11, 2026
4806302
Make FAWE clipboard test implementation-agnostic
wickidcow Aug 11, 2026
7814542
Run tests against the required FAWE runtime
wickidcow Aug 12, 2026
4ecf490
Document final Albion FAWE performance architecture
wickidcow Aug 12, 2026
2679e86
Publish raw BetterStructures test JAR from green branch CI
wickidcow Aug 12, 2026
242dad5
Start Albion FAWE-native 1.1.1
wickidcow Aug 12, 2026
1fed748
Enforce FAWE-native block writes in CI
wickidcow Aug 12, 2026
1ea4888
Add global serialized FAWE edit queue
wickidcow Aug 12, 2026
a2c57de
Serialize natural structures through global FAWE lane
wickidcow Aug 12, 2026
4c4ded1
Keep FAWE cleanup inside ticketed structure edit
wickidcow Aug 12, 2026
22b4b5b
Move natural post-processing block writes to FAWE
wickidcow Aug 12, 2026
1487d0f
Replace modular Bukkit and NMS placement with FAWE
wickidcow Aug 12, 2026
6023189
Route modular chest and barrel placement through FAWE
wickidcow Aug 12, 2026
8d0ea1c
Move WFC debug block writes to FAWE
wickidcow Aug 12, 2026
3996d1c
Document Albion 1.1.1 FAWE-native architecture
wickidcow Aug 12, 2026
e4cd849
Keep branch-test release tag on exact green head
wickidcow Aug 12, 2026
7c0cce8
Show BetterStructures JAR in workflow outputs
wickidcow Aug 12, 2026
5bb426d
Add automatic milestone release notes
wickidcow Aug 12, 2026
0404e62
Publish only raw JAR release assets
wickidcow Aug 12, 2026
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
137 changes: 137 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: BetterStructures Albion CI

on:
push:
branches:
- master
- 'agent/**'
pull_request:
branches: [ master ]

permissions:
contents: write

concurrency:
group: betterstructures-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6

- name: Make Gradle wrapper executable
run: chmod +x gradlew

- name: FAWE-native block-write audit
shell: bash
run: |
set -euo pipefail
MATCHES="$(grep -RInE '\.(setType|setBlockData)\(|setBlockInNativeDataPalette\(' src/main/java || true)"
if [[ -n "$MATCHES" ]]; then
echo "Direct Bukkit/NMS block writes remain; Albion 1.1.1 must route block changes through FAWE:"
echo "$MATCHES"
exit 1
fi
echo "FAWE-native audit passed: no direct Bukkit/NMS block writes found."

- name: Build and verify raw JAR
shell: bash
run: |
set -euo pipefail
./gradlew clean test shadowJar
VERSION="$(sed -n "s/^version = '\([^']*\)'.*/\1/p" build.gradle)"
JAR="build/libs/BetterStructures-${VERSION}.jar"
test -f "$JAR"
SHA256="$(sha256sum "$JAR" | awk '{print $1}')"
echo "Built raw JAR: $JAR"
echo "SHA-256: $SHA256"
echo "BS_VERSION=$VERSION" >> "$GITHUB_ENV"
echo "BS_JAR=$JAR" >> "$GITHUB_ENV"
echo "BS_SHA256=$SHA256" >> "$GITHUB_ENV"

- name: Publish raw JAR milestone release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/agent/')
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
VERSION="$BS_VERSION"
JAR="$BS_JAR"
TAG="albion-${VERSION}-test"
NOTES="release-notes-${VERSION}.md"
test -f "$JAR"

PREVIOUS_SHA=""
if git rev-parse -q --verify "refs/tags/${TAG}^{commit}" >/dev/null 2>&1; then
PREVIOUS_SHA="$(git rev-parse "refs/tags/${TAG}^{commit}")"
fi

{
echo "## BetterStructures Albion ${VERSION} — Milestone Build"
echo
echo "AlbionMC development build from commit \`${GITHUB_SHA}\`."
echo
echo "- **Raw JAR:** \`BetterStructures-${VERSION}.jar\`"
echo "- **SHA-256:** \`${BS_SHA256}\`"
echo "- **CI:** ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "- **Runtime target:** Paper 1.21.11+ with FastAsyncWorldEdit"
echo
echo "### Changes in this milestone build"
if [[ -n "$PREVIOUS_SHA" && "$PREVIOUS_SHA" != "$GITHUB_SHA" ]]; then
git log --no-merges --max-count=25 --pretty='- %s (`%h`)' "${PREVIOUS_SHA}..${GITHUB_SHA}"
else
git log --no-merges --max-count=25 --pretty='- %s (`%h`)' "origin/master..${GITHUB_SHA}"
fi
echo
echo "This prerelease contains the raw server-ready JAR. No Actions artifact ZIP is created."
} > "$NOTES"

git tag -f "$TAG" "$GITHUB_SHA"
git push origin "refs/tags/$TAG" --force

if gh release view "$TAG" >/dev/null 2>&1; then
gh release upload "$TAG" "$JAR" --clobber
gh release edit "$TAG" \
--title "BetterStructures Albion ${VERSION} Milestone Build" \
--notes-file "$NOTES" \
--prerelease
else
gh release create "$TAG" "$JAR" \
--title "BetterStructures Albion ${VERSION} Milestone Build" \
--notes-file "$NOTES" \
--prerelease
fi

- name: Add raw JAR link to workflow summary
if: always() && env.BS_VERSION != ''
shell: bash
run: |
{
echo "## BetterStructures ${BS_VERSION}"
echo
echo "**SHA-256:** \`${BS_SHA256}\`"
echo
if [[ "${GITHUB_EVENT_NAME}" == "push" && "${GITHUB_REF}" == refs/heads/agent/* ]]; then
echo "### [Download raw BetterStructures-${BS_VERSION}.jar](https://github.com/${GITHUB_REPOSITORY}/releases/download/albion-${BS_VERSION}-test/BetterStructures-${BS_VERSION}.jar)"
echo
echo "[Milestone release notes](https://github.com/${GITHUB_REPOSITORY}/releases/tag/albion-${BS_VERSION}-test)"
echo
echo "This is the actual .jar file. No extraction is required."
else
echo "Raw JAR built successfully at \`${BS_JAR}\`."
fi
} >> "$GITHUB_STEP_SUMMARY"
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish BetterStructures JAR

on:
push:
tags:
- 'v1.1.*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6

- name: Make Gradle wrapper executable
run: chmod +x gradlew

- name: Verify tag matches project version
shell: bash
run: |
VERSION="$(sed -n "s/^version = '\([^']*\)'.*/\1/p" build.gradle)"
TAG_VERSION="${GITHUB_REF_NAME#v}"
if [ "$VERSION" != "$TAG_VERSION" ]; then
echo "Tag $GITHUB_REF_NAME does not match build.gradle version $VERSION" >&2
exit 1
fi

- name: Build release JAR
run: ./gradlew clean test shadowJar

- name: Publish raw JAR release asset
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
JAR="build/libs/BetterStructures-${VERSION}.jar"
test -f "$JAR"
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
gh release upload "$GITHUB_REF_NAME" "$JAR" --clobber
else
gh release create "$GITHUB_REF_NAME" "$JAR" \
--title "BetterStructures Albion ${VERSION}" \
--generate-notes
fi
107 changes: 107 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# BetterStructures Performance / Albion

An **AlbionMC.com-only performance and maintenance fork** of BetterStructures, based on upstream **BetterStructures 2.6.3**.

## Homage and upstream credit

BetterStructures was created by **MagmaGuy**. The original concept, structure system, content format, and the overwhelming majority of this codebase are his work and the work of upstream contributors. This fork exists because AlbionMC depends heavily on BetterStructures and needs a performance profile tailored to a large, plugin-heavy survival server and frequently regenerated resource worlds.

This project is **not intended to replace, rebrand, or compete with the original BetterStructures project**. Credit for the plugin belongs with MagmaGuy and the upstream contributors. The original GPLv3 license is retained.

## Albion 1.1.1 — FAWE Native

**FastAsyncWorldEdit is the required world-edit engine for this fork.** Standard WorldEdit is not a supported runtime backend.

FAWE intentionally implements the WorldEdit API, so source imports such as `com.sk89q.worldedit.*` remain normal and expected. Those packages are the API surface used by FAWE; Albion builds require FastAsyncWorldEdit at runtime.

The 1.1.1 goal is simple: **BetterStructures itself does not perform direct Bukkit/NMS block mutations.** Structure, module, cleanup, marker, and debug block writes are routed through FAWE.

### FAWE-native block paths

- natural surface, underground, sky, liquid, and other schematic structures;
- schematic air carving and NBT-rich `BaseBlock` placement;
- BetterStructures bedrock/pedestal filler behavior;
- pedestal construction below natural structures;
- tree/foliage cleanup above surface structures;
- vanilla, EliteMobs, and MythicMobs marker-block removal;
- modular/WFC dungeon batches;
- module directional/light blocks and NBT blocks without a Bukkit slow path;
- modular chest/barrel block placement;
- WFC debug lattice block placement;
- component/elevator schematic pastes.

CI enforces this rule by scanning production Java sources and failing if direct Bukkit `setType`, `setBlockData`, or the old native-palette block-write path is reintroduced.

## Resource-world performance design

This fork is maintained specifically for **AlbionMC.com** with these goals:

- preserve the gameplay, structures, content packages, and visual identity of BetterStructures 2.6.3;
- reduce MSPT/TPS spikes while players explore and generate new chunks, especially in resource worlds;
- queue structure-generation work instead of allowing bursts of expensive fitting work during new-chunk events;
- pause ordinary player-driven structure generation when server MSPT/TPS indicates the main thread is under pressure;
- serialize heavy BetterStructures FAWE edits through one global edit lane instead of allowing several large structures or dungeon batches to compete at once;
- prepare required natural-structure chunks through Paper's async chunk API in small batches;
- keep structure chunk tickets until the FAWE structure and FAWE cleanup phases are complete;
- prevent BetterStructures' own internal chunk loads from recursively generating more BetterStructures structures;
- keep Bukkit primary-thread work for APIs that require it, such as terrain sampling reads, inventory/loot handling, plugin events, and entity spawning;
- target **Paper 1.21.11 and newer only**. Older Minecraft/Paper compatibility is intentionally out of scope.

## Performance defaults

Player-driven structure generation is guarded by conservative load thresholds for new configs:

- pause around **42 MSPT** or **18.5 TPS**;
- resume after recovery around **32 MSPT** and **19.5 TPS**;
- admit expensive fit jobs separately instead of allowing a burst from fast resource-world exploration;
- load structure chunks in small batches before starting the FAWE edit;
- allow only one heavy BetterStructures FAWE edit at a time.

Existing configuration values are preserved when upgrading. These defaults are intended as a safe starting point and can be tuned from real AlbionMC spark profiles after runtime testing.

## Requirements

- Paper **1.21.11+**
- Java **21+**
- FastAsyncWorldEdit **2.14.3+**
- For newer Minecraft versions, use a FAWE release that explicitly supports that server version.

Do **not** install a separate WorldEdit JAR alongside FAWE for this fork. FastAsyncWorldEdit supplies the WorldEdit API/runtime provider BetterStructures uses.

## Fork versioning

Albion fork releases use their own version line beginning at **1.1.0**. The current FAWE-native milestone is **1.1.1**. The upstream source baseline remains BetterStructures **2.6.3**.

Release JARs are named:

```text
BetterStructures-1.1.x.jar
```

The 1.1.1 test build is:

```text
BetterStructures-1.1.1.jar
```

## Building

```bash
./gradlew clean test shadowJar
```

The shaded plugin JAR is written to:

```text
build/libs/BetterStructures-1.1.x.jar
```

GitHub branch test builds publish the JAR directly as a prerelease asset. Tagged releases (`v1.1.x`) also publish the JAR directly as a **raw release asset**, rather than requiring server owners to download an Actions ZIP.

## Upstream updates

The upstream BetterStructures self-update path is intentionally disabled in this fork so an Albion performance build cannot be silently replaced by an upstream plugin JAR. Upstream changes can still be reviewed and selectively merged into this fork.

## License

GPLv3, inherited from BetterStructures. See [LICENSE](LICENSE).
Loading