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
47 changes: 25 additions & 22 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: setup go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.22"
cache: false # only caches go projects, not general go pkgs

- name: get go cache env
id: go-cache-env
run: |
Expand All @@ -25,7 +26,7 @@ jobs:
echo "$EOF" >> $GITHUB_ENV

- name: cache go
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{env.GOMODCACHE}}
Expand All @@ -35,44 +36,46 @@ jobs:
- name: install yajsv
run: go install github.com/neilpa/yajsv@v1.4.1

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'

- name: get cache week
id: week
run: echo "value=$(date +%Y-%U)" >> $GITHUB_OUTPUT

- name: cache schemas
uses: actions/cache@v3
id: cache-schemas
uses: actions/cache@v4
with:
path: |
schemas/
key: ${{ runner.os }}-schemas
path: schemas/
key: ${{ runner.os }}-schemas-${{ steps.week.outputs.value }}

- name: fetch Schemas
- name: fetch schemas
if: steps.cache-schemas.outputs.cache-hit != 'true'
run: |
curl -o schemas/advancement.json https://json.schemastore.org/minecraft-advancement.json
curl -o schemas/tag.json https://json.schemastore.org/minecraft-tag.json
curl -o schemas/recipe.json https://json.schemastore.org/minecraft-recipe.json
# Disabled due to older version. downloaded and edited manually
#curl -o schemas/pack-mcmeta.json https://json.schemastore.org/minecraft-pack-mcmeta.json

curl -fsSL -o schemas/advancement.json https://json.schemastore.org/minecraft-advancement.json
curl -fsSL -o schemas/tag.json https://json.schemastore.org/minecraft-tag.json
curl -fsSL -o schemas/recipe.json https://json.schemastore.org/minecraft-recipe.json
# pack-mcmeta.json is maintained locally (schemastore version is outdated)

- name: Verify pack.mcmeta
run: |
yajsv -s schemas/pack-mcmeta.json -q "BoxedDataPack/pack.mcmeta"
run: yajsv -s schemas/pack-mcmeta.json -q "BoxedDataPack/pack.mcmeta"

- name: Verify Advancements
run: |
python -c 'from glob import glob;globfile = open("globs.txt", "w");globfile.writelines(filename + "\n" for filename in glob("BoxedDataPack/data/*/advancements/**/*.json", recursive=True));globfile.close()'
python3 -c 'from glob import glob;open("globs.txt","w").writelines(f+"\n" for f in glob("BoxedDataPack/data/*/advancements/**/*.json",recursive=True))'
yajsv -s schemas/advancement.json -q -l globs.txt
rm globs.txt

- name: Verify Tags
run: |
python -c 'from glob import glob;globfile = open("globs.txt", "w");globfile.writelines(filename + "\n" for filename in glob("BoxedDataPack/data/*/tags/**/*.json", recursive=True));globfile.close()'
python3 -c 'from glob import glob;open("globs.txt","w").writelines(f+"\n" for f in glob("BoxedDataPack/data/*/tags/**/*.json",recursive=True))'
yajsv -s schemas/tag.json -q -l globs.txt
rm globs.txt

- name: Verify Recipes
run: |
python -c 'from glob import glob;globfile = open("globs.txt", "w");globfile.writelines(filename + "\n" for filename in glob("BoxedDataPack/data/*/recipes/**/*.json", recursive=True));globfile.close()'
python3 -c 'from glob import glob;open("globs.txt","w").writelines(f+"\n" for f in glob("BoxedDataPack/data/*/recipes/**/*.json",recursive=True))'
yajsv -s schemas/recipe.json -q -l globs.txt
rm globs.txt
72 changes: 72 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/building/all_slabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,78 @@
}
]
}
},
"cherry": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:cherry_slab"
]
}
]
}
},
"bamboo": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:bamboo_slab"
]
}
]
}
},
"bamboo_mosaic": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:bamboo_mosaic_slab"
]
}
]
}
},
"tuff_brick": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:tuff_brick_slab"
]
}
]
}
},
"polished_tuff": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:polished_tuff_slab"
]
}
]
}
},
"resin_brick": {
"trigger": "inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:resin_brick_slab"
]
}
]
}
}
}
}
72 changes: 72 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/building/all_stairs.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,78 @@
}
]
}
},
"cherry": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:cherry_stairs"
]
}
]
}
},
"bamboo": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:bamboo_stairs"
]
}
]
}
},
"bamboo_mosaic": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:bamboo_mosaic_stairs"
]
}
]
}
},
"tuff_brick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:tuff_brick_stairs"
]
}
]
}
},
"polished_tuff": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:polished_tuff_stairs"
]
}
]
}
},
"resin_brick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:resin_brick_stairs"
]
}
]
}
}
},
"rewards": {
Expand Down
48 changes: 48 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/building/all_walls.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,54 @@
}
]
}
},
"tuff": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:tuff_wall"
]
}
]
}
},
"polished_tuff": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:polished_tuff_wall"
]
}
]
}
},
"tuff_brick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:tuff_brick_wall"
]
}
]
}
},
"resin_brick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:resin_brick_wall"
]
}
]
}
}
},
"rewards": {
Expand Down
25 changes: 25 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/building/copper_bulb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"display": {
"icon": {
"item": "minecraft:copper_bulb"
},
"title": "Copper Illuminated",
"description": "Obtain a copper bulb",
"announce_to_chat": false
},
"parent": "bentobox:building/copper_block",
"criteria": {
"copper_bulb": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:copper_bulb"
]
}
]
}
}
}
}
30 changes: 30 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/building/crafter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"display": {
"icon": {
"item": "minecraft:crafter"
},
"title": "Auto-Crafter",
"description": "Place a crafter",
"announce_to_chat": false
},
"parent": "bentobox:building/root",
"criteria": {
"crafter": {
"trigger": "minecraft:placed_block",
"conditions": {
"location": [
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:crafter"
]
}
}
}
]
}
}
}
}
21 changes: 21 additions & 0 deletions BoxedDataPack/data/bentobox/advancements/combat/bogged.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"display": {
"icon": {
"item": "minecraft:bone"
},
"title": "Bogged Down",
"description": "Kill a bogged",
"announce_to_chat": false
},
"parent": "bentobox:combat/root",
"criteria": {
"bogged": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"entity": {
"type": "minecraft:bogged"
}
}
}
}
}
Loading
Loading