mirror of
https://github.com/Kas-tle/java2bedrock.sh.git
synced 2025-12-19 14:59:13 +00:00
Update converter.sh
This commit is contained in:
10
converter.sh
10
converter.sh
@@ -152,11 +152,11 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ensure the directories that would contain predicate definitions exist
|
# ensure the directory that would contain predicate definitions exists
|
||||||
if test -d "./assets/minecraft/models/item"; then item_folder="./assets/minecraft/models/item/*.json"; fi
|
if test -d "./assets/minecraft/models/item"
|
||||||
if test -d "./assets/minecraft/models/block"; then block_folder="./assets/minecraft/models/block/*.json"; fi
|
|
||||||
if [[ -z ${item_folder} ]] && [[ -z ${block_folder} ]]
|
|
||||||
then
|
then
|
||||||
|
status_message completion "Minecraft namespace item folder found."
|
||||||
|
else
|
||||||
status_message error "Invalid resource pack! No item or block folders exist. No predicate definitions be found."
|
status_message error "Invalid resource pack! No item or block folders exist. No predicate definitions be found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -218,7 +218,7 @@ if contains(":") then sub("\\:(.+)"; "") else "minecraft" end
|
|||||||
| to_entries | map( ((.value.geyserID = "gmdl_\(1+.key)") | .value))
|
| to_entries | map( ((.value.geyserID = "gmdl_\(1+.key)") | .value))
|
||||||
| INDEX(.geyserID)
|
| INDEX(.geyserID)
|
||||||
|
|
||||||
' ${item_folder} ${block_folder} > config.json || { status_message error "Invalid JSON exists in block or item folder! See above log."; exit 1; }
|
' "./assets/minecraft/models/item" > config.json || { status_message error "Invalid JSON exists in block or item folder! See above log."; exit 1; }
|
||||||
status_message completion "Initial predicate config generated"
|
status_message completion "Initial predicate config generated"
|
||||||
|
|
||||||
# get a bash array of all model json files in our resource pack
|
# get a bash array of all model json files in our resource pack
|
||||||
|
|||||||
Reference in New Issue
Block a user