Skip to content

Commit d96082c

Browse files
committed
fix: add fabric-loom non-remap to pluginManagement
Required for 26.x builds (non-remap Loom plugin)
1 parent e6ca223 commit d96082c

48 files changed

Lines changed: 2764 additions & 328 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ on:
44
push:
55
branches:
66
- dev
7-
- 1.20.x
8-
- 1.21.x
9-
- 26.1.x
7+
- main
108
workflow_dispatch:
119

1210
permissions:
@@ -72,5 +70,5 @@ jobs:
7270
git checkout -b build
7371
git add .
7472
git commit -m "Build v${{ steps.mod_info.outputs.mod_version }} - $(date +'%Y-%m-%d %H:%M:%S')"
75-
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
76-
git push -f origin build
73+
git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
74+
git push --force-with-lease origin build 2>/dev/null || git push -f origin build

.github/workflows/publish.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- id: gen_matrix
1616
run: |
17-
MATRIX=$(jq -c '{include: [.versions[] | {
18-
version: .version,
19-
mc_src: (.mcVersion // .version),
20-
mc_ver: .minecraft_version,
21-
fabric_api: .fabric_api_version,
22-
yarn: (.yarn_mappings // ""),
23-
loader: (.loader_version // "")
24-
}]}' versions.json)
25-
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
17+
ENTRIES=$(jq -c '[.versions[] | {version, mc_src: (.mcVersion // .version), mc_ver: .minecraft_version, fabric_api: .fabric_api_version, yarn: (.yarn_mappings // ""), loader: (.loader_version // "")}]' versions.json)
18+
FILTERED="[]"
19+
while read -r entry; do
20+
MC_SRC=$(echo "$entry" | jq -r '.mc_src')
21+
if [ -d "src/mc-$MC_SRC" ]; then
22+
FILTERED=$(echo "$FILTERED" | jq ". + [$entry]")
23+
fi
24+
done < <(echo "$ENTRIES" | jq -c '.[]')
25+
echo "matrix={\"include\": $FILTERED}" >> $GITHUB_OUTPUT
2626
2727
publish:
2828
needs: setup

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,24 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- id: gen_matrix
2323
run: |
24-
MATRIX=$(jq -c '{include: [.versions[] | {
24+
INCLUDE=$(jq -c '[.versions[] | {
2525
version: .version,
2626
mc_src: (.mcVersion // .version),
2727
mc_ver: .minecraft_version,
2828
fabric_api: .fabric_api_version,
2929
yarn: (.yarn_mappings // ""),
3030
loader: (.loader_version // "")
31-
}]}' versions.json)
32-
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
31+
}]' versions.json | jq -c '[.[] | select("src/mc-" + .mc_src as $d | $d | type == "string")]' 2>/dev/null || echo "[]")
32+
# Fallback: filter by directory existence
33+
ENTRIES=$(jq -c '[.versions[] | {version, mc_src: (.mcVersion // .version), mc_ver: .minecraft_version, fabric_api: .fabric_api_version, yarn: (.yarn_mappings // ""), loader: (.loader_version // "")}]' versions.json)
34+
FILTERED="[]"
35+
while read -r entry; do
36+
MC_SRC=$(echo "$entry" | jq -r '.mc_src')
37+
if [ -d "src/mc-$MC_SRC" ]; then
38+
FILTERED=$(echo "$FILTERED" | jq ". + [$entry]")
39+
fi
40+
done < <(echo "$ENTRIES" | jq -c '.[]')
41+
echo "matrix={\"include\": $FILTERED}" >> $GITHUB_OUTPUT
3342
3443
build:
3544
needs: setup

.github/workflows/sync-readmes.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: Sync READMEs across branches
1+
name: Sync shared files across branches
22

33
on:
44
push:
55
branches:
66
- dev
7-
- 1.20.x
8-
- 1.21.x
9-
- 26.1.x
107
paths:
118
- README.md
129
- README_FR.md
10+
- versions.json
11+
- compile-all.sh
12+
- .github/workflows/**
1313

1414
jobs:
1515
sync:
@@ -26,12 +26,13 @@ jobs:
2626
git config user.name "github-actions[bot]"
2727
git config user.email "github-actions[bot]@users.noreply.github.com"
2828
29-
- name: Sync READMEs to all branches
29+
- name: Sync shared files to all branches
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
run: |
3333
SOURCE_BRANCH="${GITHUB_REF#refs/heads/}"
34-
TARGETS=("dev" "1.20.x" "1.21.x" "26.1.x")
34+
TARGETS=("main")
35+
SHARED_FILES=("README.md" "README_FR.md" "versions.json" "compile-all.sh" ".github/workflows/")
3536
3637
for target in "${TARGETS[@]}"; do
3738
if [ "$target" = "$SOURCE_BRANCH" ]; then
@@ -40,9 +41,9 @@ jobs:
4041
4142
if git show-ref --verify --quiet refs/remotes/origin/"$target"; then
4243
git checkout "$target"
43-
git checkout "$SOURCE_BRANCH" -- README.md README_FR.md
44+
git checkout "$SOURCE_BRANCH" -- "${SHARED_FILES[@]}"
4445
if ! git diff --cached --quiet; then
45-
git commit -m "docs: sync READMEs from $SOURCE_BRANCH [skip sync]"
46+
git commit -m "chore: sync shared files from $SOURCE_BRANCH [skip sync]"
4647
git push origin "$target"
4748
fi
4849
fi

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,14 @@
4242
> [!IMPORTANT]
4343
> To build the mod yourself, you **must** configure your environment first.
4444
45-
1. Open [compile_config.json](compile_config.json) (or copy it from [compile_config_sample.json](compile_config_sample.json)).
46-
2. Update the fields to match your local environment:
47-
```json
48-
{
49-
"output_path": "path/to/your/custom/output",
50-
"minecraft_version": "1.21.4",
51-
"fabric_loader_version": "0.16.9"
52-
}
45+
1. Edit [versions.json](versions.json) to configure your local launcher path and instance directories.
46+
2. Run the build script for all versions:
47+
```bash
48+
./compile-all.sh
5349
```
54-
3. Run the build script:
50+
Or for a single version, use Gradle directly:
5551
```bash
56-
./compile.sh
52+
./gradlew build -PmcVersion=1.20.4 -Pminecraft_version=1.20.4 -Pyarn_mappings=1.20.4+build.3 -Pfabric_api_version=0.97.3+1.20.4
5753
```
5854

5955
## Installation (User)

0 commit comments

Comments
 (0)