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
4 changes: 2 additions & 2 deletions .github/scripts/gen-uninstall-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

repo, dest = sys.argv[1], sys.argv[2]

# 121/ holds the overlay of the newest pack format, both are scanned
folders = [os.path.join(repo, "data", "timber", "function"), os.path.join(repo, "121", "data", "timber", "function")]
# 101/ holds the overlay of the older pack formats, both are scanned
folders = [os.path.join(repo, "data", "timber", "function"), os.path.join(repo, "101", "data", "timber", "function")]
uninstall_text = ""
objectives, schedules, storage_keys = set(), set(), set()
for folder in folders:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
if: steps.setup.outputs.ready == 'true'
run: |
mkdir -p world/datapacks/timber world/datapacks/timber_test
cp -r data pack.mcmeta 121 world/datapacks/timber/
cp -r data pack.mcmeta 101 world/datapacks/timber/
cp -r tests/. world/datapacks/timber_test/

# the uninstall test checks the scoreboards the code of the datapack creates, without this step it fails
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-modrinth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build the datapack zip
run: git archive --format=zip -o "Timber-${{ github.event.release.tag_name }}.zip" HEAD -- data 121 pack.mcmeta pack.png LICENSE README.md
run: git archive --format=zip -o "Timber-${{ github.event.release.tag_name }}.zip" HEAD -- data 101 pack.mcmeta pack.png LICENSE README.md

- name: Attach the zip to the GitHub release
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# the newest supported version (data/) plus the oldest version of each overlay range in pack.mcmeta
matrix:
include:
- minecraft: "26.1.2"
- minecraft: "26.1"
java: "25"
- minecraft: "26.3"
java: "25"
Expand All @@ -31,7 +32,7 @@ jobs:
- name: Install datapacks
run: |
mkdir -p world/datapacks/timber world/datapacks/timber_test
cp -r data pack.mcmeta 121 world/datapacks/timber/
cp -r data pack.mcmeta 101 world/datapacks/timber/
cp -r tests/. world/datapacks/timber_test/

# the uninstall test checks the scoreboards the code of the datapack creates, so a forgotten one can't slip through
Expand Down
62 changes: 62 additions & 0 deletions 101/data/minecraft/loot_table/blocks/mushroom_stem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:mushroom_stem"
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch"
}
]
}
}
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:knowledge_book",
"functions": [
{
"function": "minecraft:set_custom_data",
"tag": "{Tags:[\"timber_location\"]}"
}
],
"conditions": [
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "#timber:axes"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "#minecraft:axes"
}
}
]
}
]
}
]
}
]
}
Loading
Loading