forked from Gamemode4Dev/GM4_Datapacks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
224 changed files
with
1,661 additions
and
1,085 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,9 @@ on: | |
env: | ||
VERSION: '1.20' | ||
COMMIT_MSG: ${{ github.event.head_commit.message }} | ||
TEST_FABRIC_SERVER: https://meta.fabricmc.net/v2/versions/loader/1.20.4/0.15.3/0.11.2/server/jar | ||
TEST_FABRIC_API: https://cdn.modrinth.com/data/P7dR8mSH/versions/JMCwDuki/fabric-api-0.92.0%2B1.20.4.jar | ||
TEST_PACKTEST: https://cdn.modrinth.com/data/XsKUhp45/versions/18smpIeE/packtest-1.6-mc1.20.4.jar | ||
|
||
jobs: | ||
build: | ||
|
@@ -29,8 +32,8 @@ jobs: | |
if: github.event_name == 'pull_request' | ||
run: git fetch origin ${{ github.base_ref }} | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
|
@@ -41,7 +44,7 @@ jobs: | |
|
||
- name: Setup cache | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
@@ -66,7 +69,7 @@ jobs: | |
|
||
- name: Upload artifact | ||
if: github.event_name == 'pull_request' | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'Modules for pull request #${{ github.event.number }}' | ||
path: ${{ github.workspace }}/release/${{ env.VERSION }}/ | ||
|
@@ -87,3 +90,56 @@ jobs: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
directory: release | ||
branch: release | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-in-project: true | ||
|
||
- name: Setup cache | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Build all modules for tests | ||
run: poetry run beet -p beet-test.yaml -l ${{ env.LOG_LEVEL }} build | ||
env: | ||
LOG_LEVEL: ${{ runner.debug == 1 && 'DEBUG' || 'INFO'}} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Download server files | ||
run: | | ||
curl -o server.jar $TEST_FABRIC_SERVER | ||
mkdir mods | ||
curl -o mods/fabric-api.jar $TEST_FABRIC_API | ||
curl -o mods/packtest.jar $TEST_PACKTEST | ||
- name: Copy packs to world | ||
run: | | ||
mkdir -p world/datapacks | ||
cp out/gm4_*.zip world/datapacks | ||
- name: Run test server | ||
run: | | ||
java -Xmx2G -Dpacktest.auto -Dpacktest.auto.annotations -jar server.jar nogui |
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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 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,3 +1,6 @@ | ||
ignore: | ||
- gm4/skin_cache.json | ||
|
||
pipeline: | ||
- gm4.plugins.list_modules | ||
- gm4.plugins.manifest.create | ||
|
This file contains 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 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,26 @@ | ||
pipeline: | ||
- gm4.plugins.list_modules | ||
- gm4.plugins.manifest.create | ||
- gm4.plugins.manifest.update_patch | ||
- gm4.plugins.output.clear_release | ||
- gm4.plugins.manifest.write_meta | ||
- broadcast: 'gm4_*' | ||
extend: 'beet.yaml' | ||
require: | ||
- gm4.plugins.output.test | ||
- gm4.plugins.player_heads | ||
- gm4_guidebook.generate_guidebooks.load_page_data | ||
- gm4_guidebook.generate_guidebooks.load_custom_recipes | ||
- gm4.plugins.test.load_tests | ||
pipeline: | ||
- gm4.plugins.manifest.write_updates | ||
- gm4.plugins.write_mcmeta | ||
meta: | ||
mecha: | ||
formatting: | ||
layout: preserve | ||
nbt_compact: True | ||
|
||
meta: | ||
autosave: | ||
link: false |
This file contains 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 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 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 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 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 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,18 @@ | ||
from beet import Context, TextFile | ||
from typing import ClassVar, Tuple | ||
|
||
|
||
def load_tests(ctx: Context): | ||
ctx.data.extend_namespace += [TestFile] | ||
|
||
|
||
class TestFile(TextFile): | ||
"""Class representing an test function.""" | ||
|
||
scope: ClassVar[Tuple[str, ...]] = ("tests",) | ||
extension: ClassVar[str] = ".mcfunction" | ||
|
||
|
||
def strip_tests(ctx: Context): | ||
for structure in ctx.data.structures.match("*:test_*"): | ||
del ctx.data.structures[structure] |
This file contains 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 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
20 changes: 20 additions & 0 deletions
20
gm4_animi_shamir/data/gm4_animi_shamir/tests/keep_items.mcfunction
This file contains 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,20 @@ | ||
# @template gm4:test_tube | ||
# @dummy ~1 ~1 ~1 | ||
|
||
give @s golden_leggings{gm4_metallurgy:{active_shamir:"animi"}} | ||
give @s wooden_sword | ||
kill @s | ||
|
||
await entity @e[type=item,distance=..3,nbt={Item:{id:"minecraft:wooden_sword",Count:1b}}] | ||
assert not entity @e[type=item,distance=..3,nbt={Item:{id:"minecraft:golden_leggings",Count:1b}}] | ||
|
||
await delay 1s | ||
|
||
kill @e[type=zombie,distance=..3] | ||
kill @e[type=item,distance=..3] | ||
|
||
await delay 1s | ||
|
||
dummy @s respawn | ||
|
||
await entity @p[nbt={Inventory:[{id:"minecraft:golden_leggings",Count:1b,tag:{gm4_metallurgy:{active_shamir:"animi"}}}]}] |
11 changes: 11 additions & 0 deletions
11
gm4_animi_shamir/data/gm4_animi_shamir/tests/smoosh.mcfunction
This file contains 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,11 @@ | ||
# @template gm4_metallurgy:test_smooshing | ||
|
||
loot spawn ~1.5 ~2.5 ~1.8 loot gm4_animi_shamir:band | ||
summon item ~1.5 ~2.5 ~1.8 {Item:{id:"minecraft:diamond_leggings",Count:1b}} | ||
|
||
await delay 1s | ||
|
||
setblock ~1 ~4 ~1 redstone_block | ||
|
||
await entity @e[type=item,distance=..4,nbt={Item:{id:"minecraft:diamond_leggings",Count:1b,tag:{gm4_metallurgy:{active_shamir:"animi"}}}}] | ||
assert entity @e[type=item,distance=..4,nbt={Item:{id:"minecraft:obsidian",Count:1b}}] |
9 changes: 0 additions & 9 deletions
9
gm4_apple_trees/data/gm4_apple_trees/functions/upgrade_path/aec_to_marker.mcfunction
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
gm4_apple_trees/data/gm4_apple_trees/functions/verify/upgrade_aec_to_marker.mcfunction
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
gm4_apple_trees/data/gm4_trees/tags/functions/upgrade_aec_to_marker.json
This file was deleted.
Oops, something went wrong.
This file contains 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,7 @@ | ||
# @template gm4:test_box | ||
# @dummy ~3 ~1 ~3 | ||
# @timeout 200 | ||
|
||
summon bat ~3 ~2 ~3 {Tags:[gm4_test_bat]} | ||
|
||
await not entity @e[tag=gm4_test_bat,distance=..10] |
Oops, something went wrong.