9
0
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:
Kas-tle
2022-11-21 17:59:28 -08:00
committed by GitHub
parent 39db3c49b7
commit 9c560b15e6

View File

@@ -1096,7 +1096,7 @@ jq '
' config.json | sponge ./target/geyser_mappings.json ' config.json | sponge ./target/geyser_mappings.json
# Add sprites if sprites.json exists in the root pack # Add sprites if sprites.json exists in the root pack
if [ -f scratch_files/sprites.json ]; then if [ -f sprites.json ]; then
status_message process "Adding provided sprite paths from sprites.json" status_message process "Adding provided sprite paths from sprites.json"
jq -r ' jq -r '
to_entries to_entries
@@ -1105,7 +1105,7 @@ if [ -f scratch_files/sprites.json ]; then
| [((.item | split(":")[-1]) + "_c" + (.custom_model_data | tostring) + "_d" + (.damage_predicate | tostring) + "_u" + (.unbreakable | tostring)), .sprite] | [((.item | split(":")[-1]) + "_c" + (.custom_model_data | tostring) + "_d" + (.damage_predicate | tostring) + "_u" + (.unbreakable | tostring)), .sprite]
| @tsv | @tsv
| gsub("\\t";",") | gsub("\\t";",")
' scratch_files/sprites.json > scratch_files/sprites.csv ' sprites.json > scratch_files/sprites.csv
while IFS=, read -r predicate icon while IFS=, read -r predicate icon
do write_hash "${predicate}" "${icon}" "scratch_files/sprite_hashes.csv" & do write_hash "${predicate}" "${icon}" "scratch_files/sprite_hashes.csv" &