forked from Bard-Gaming/Minecraft-Script
-
Notifications
You must be signed in to change notification settings - Fork 0
Update project configuration and enhance documentation #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
44255b3
Update project configuration and enhance documentation
SpyC0der77 3cd222e
Add Gradle wrapper script for POSIX environments
SpyC0der77 c9271b3
Enhance Gradle build configuration and update permission handling
SpyC0der77 0f05688
Enhance build and validation processes for mod development
SpyC0der77 f1bbb62
Enhance mod build process and platform support
SpyC0der77 7d52ac0
Remove obsolete architectury-cache project ID file from Gradle config…
SpyC0der77 55623a9
e
SpyC0der77 8d4c593
Update platform support and improve build scripts
SpyC0der77 275feb6
Refactor version management in build scripts for Forge and NeoForge
SpyC0der77 bb3902d
Update Java version handling and improve build scripts
SpyC0der77 c779d21
Update Gradle wrapper and remove obsolete script
SpyC0der77 ed78759
Update Forge version in manifest.json for compatibility with new game…
SpyC0der77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| *.cmd text eol=crlf | ||
| *.bat text eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Mod | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'mod/**' | ||
| - 'minecraft_script/versions/**' | ||
| - '.github/workflows/mod.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'mod/**' | ||
| - 'minecraft_script/versions/**' | ||
| - '.github/workflows/mod.yml' | ||
|
|
||
| jobs: | ||
| build-matrix: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| profile: [1.21.2, 1.21.4, 1.21.5, 1.21.6, 1.21.7-8, 1.21.9-10, 1.21.11, 26.1] | ||
| loader: [fabric, forge, neoforge] | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: ${{ !startsWith(matrix.profile, '1.') && '25' || '21' }} | ||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | ||
| - name: Install Spyglass bundle dependencies | ||
| working-directory: mod/scripts | ||
| run: bun install --frozen-lockfile | ||
| - name: Apply version profile | ||
| run: python mod/scripts/apply_version.py ${{ matrix.profile }} --loader ${{ matrix.loader }} | ||
| - name: Build ${{ matrix.loader }} for ${{ matrix.profile }} | ||
| working-directory: mod | ||
| run: ./gradlew :${{ matrix.loader }}:build -Pmcs_profile=${{ matrix.profile }} -Penabled_platforms=${{ matrix.loader }} -x test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
minecraft_script/compiler/build_templates/builtins/1.21.2/log.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| data modify storage minecraft:temp mcs_log set value "" | ||
| data modify storage minecraft:temp mcs_log append value from storage $(s0) $(n0) | ||
| data modify storage minecraft:temp mcs_log append value from storage $(s1) $(n1) | ||
| data modify storage minecraft:temp mcs_log append value from storage $(s2) $(n2) | ||
| data modify storage minecraft:temp mcs_log append value from storage $(s3) $(n3) | ||
| data modify storage minecraft:temp mcs_log append value from storage $(s4) $(n4) | ||
| $data modify storage minecraft:temp mcs_log set value "" | ||
| $data modify storage minecraft:temp mcs_log append value from storage $(s0) $(n0) | ||
| $data modify storage minecraft:temp mcs_log append value from storage $(s1) $(n1) | ||
| $data modify storage minecraft:temp mcs_log append value from storage $(s2) $(n2) | ||
| $data modify storage minecraft:temp mcs_log append value from storage $(s3) $(n3) | ||
| $data modify storage minecraft:temp mcs_log append value from storage $(s4) $(n4) | ||
| $tellraw @a [{"nbt":"mcs_log","storage":"minecraft:temp","interpret":true}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # MCS Packs Mod | ||
|
|
||
| Architectury mod for Fabric, Forge, and NeoForge. Watches `.minecraft/mcs_packs/<pack>/`, runs `mcs lint` → `mcs compile` → Spyglass validation, then hot-reloads into the active world. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Java 21 | ||
| - MCS installed (`pip install -e .` from this repo). The mod auto-detects `mcs`, `python -m minecraft_script`, or common Windows Python installs; launchers with a limited PATH (Modrinth, Prism, etc.) get a bundled `mcs-compile.cmd` fallback. | ||
| - Node.js on PATH (Spyglass post-compile validation; optional — disable in `config/mcs-packs.json`) | ||
|
|
||
| ## Supported Minecraft versions | ||
|
|
||
| All MCS profiles from `minecraft_script/versions/index.json`: | ||
|
|
||
| | MCS profile | Minecraft versions | | ||
| | ----------- | ------------------ | | ||
| | `1.21.2` | 1.21.2 | | ||
| | `1.21.4` | 1.21.4 | | ||
| | `1.21.5` | 1.21.5 | | ||
| | `1.21.6` | 1.21.6 | | ||
| | `1.21.7-8` | 1.21.7, 1.21.8 | | ||
| | `1.21.9-10` | 1.21.9, 1.21.10 | | ||
| | `1.21.11` | 1.21.11 | | ||
| | `26.1` | 26.1 | | ||
|
|
||
| Build one profile: | ||
|
|
||
| ```bash | ||
| cd mod | ||
| python scripts/apply_version.py 1.21.11 | ||
| ./gradlew :fabric:build -Pmcs_profile=1.21.11 | ||
| ``` | ||
|
|
||
| Build every profile × loader (24 artifacts): | ||
|
|
||
| ```bash | ||
| cd mod | ||
| python scripts/build_all.py | ||
| ``` | ||
|
|
||
| Build a single target: | ||
|
|
||
| ```bash | ||
| python scripts/build_all.py --profile 1.21.4 --loader fabric | ||
| ``` | ||
|
|
||
| ## Layout | ||
|
|
||
| ``` | ||
| .minecraft/ | ||
| config/mcs-packs.json | ||
| mcs_packs/ | ||
| starter/pack.mcs | ||
| my_pack/pack.mcs | ||
| _compiled/ | ||
| ``` | ||
|
|
||
| ## Dev run (Fabric) | ||
|
|
||
| ```bash | ||
| python scripts/apply_version.py 1.21.11 | ||
| ./gradlew :fabric:runClient -Pmcs_profile=1.21.11 | ||
| ``` | ||
|
|
||
| Loader dependency versions live in `versions/manifest.json`. Update those pins when bumping Minecraft support. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.