Closed misode closed 2 months ago
Download link: https://github.com/Gamemode4Dev/GM4_Datapacks/suites/25283136056/artifacts/1635345349
attribute
Folder renames were done using the following commands
find . -maxdepth 4 -type d -path "*/data/*/advancements" -exec bash -c 'rm -rf "${0%advancements}advancement" && mv "$0" "${0%advancements}advancement"' {} \; find . -maxdepth 4 -type d -path "*/data/*/functions" -exec bash -c 'rm -rf "${0%functions}function" && mv "$0" "${0%functions}function"' {} \; find . -maxdepth 4 -type d -path "*/data/*/item_modifiers" -exec bash -c 'rm -rf "${0%item_modifiers}item_modifier" && mv "$0" "${0%item_modifiers}item_modifier"' {} \; find . -maxdepth 4 -type d -path "*/data/*/loot_tables" -exec bash -c 'rm -rf "${0%loot_tables}loot_table" && mv "$0" "${0%loot_tables}loot_table"' {} \; find . -maxdepth 4 -type d -path "*/data/*/predicates" -exec bash -c 'rm -rf "${0%predicates}predicate" && mv "$0" "${0%predicates}predicate"' {} \; find . -maxdepth 4 -type d -path "*/data/*/recipes" -exec bash -c 'rm -rf "${0%recipes}recipe" && mv "$0" "${0%recipes}recipe"' {} \; find . -maxdepth 4 -type d -path "*/data/*/structures" -exec bash -c 'rm -rf "${0%structures}structure" && mv "$0" "${0%structures}structure"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/functions" -exec bash -c 'rm -rf "${0%functions}function" && mv -T -f "$0" "${0%functions}function"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/items" -exec bash -c 'rm -rf "${0%items}item" && mv -T -f "$0" "${0%items}item"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/blocks" -exec bash -c 'rm -rf "${0%blocks}block" && mv -T -f "$0" "${0%blocks}block"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/entity_types" -exec bash -c 'rm -rf "${0%entity_types}entity_type" && mv -T -f "$0" "${0%entity_types}entity_type"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/game_events" -exec bash -c 'rm -rf "${0%game_events}game_event" && mv -T -f "$0" "${0%game_events}game_event"' {} \; find . -maxdepth 5 -type d -path "*/data/*/tags/fluids" -exec bash -c 'rm -rf "${0%fluids}fluid" && mv -T -f "$0" "${0%fluids}fluid"' {} \; find . -maxdepth 4 -type d -path "*/data/*/tests" -exec bash -c 'rm -rf "${0%tests}test" && mv "$0" "${0%tests}test"' {} \;
To make sure this operation only renames files, I ran this:
echo "A: $(git status --short | grep "^A " | wc -l), R: $(git status --short | grep "^R " | wc -l), D: $(git status --short | grep "^D " | wc -l)"
The attribute commands were fixed with the following regexes:
((?:^|run )attribute .* modifier add )([^ ]+) [^ ]+
$1minecraft:$2
((?:^|run )attribute .* remove )([^ ]+)
((?:^|run )attribute .* value get )([^ ]+)
The enchantment predicate change was made with the following regex:
(\{\n\s+)"enchantment": "
$1"enchantments": "
Testing
Download link: https://github.com/Gamemode4Dev/GM4_Datapacks/suites/25283136056/artifacts/1635345349
Changes
attribute
commandsFolder renames were done using the following commands
To make sure this operation only renames files, I ran this:
The attribute commands were fixed with the following regexes:
((?:^|run )attribute .* modifier add )([^ ]+) [^ ]+
->$1minecraft:$2
(165 commands)((?:^|run )attribute .* remove )([^ ]+)
->$1minecraft:$2
(49 commands)((?:^|run )attribute .* value get )([^ ]+)
->$1minecraft:$2
(2 commands)The enchantment predicate change was made with the following regex:
(\{\n\s+)"enchantment": "
->$1"enchantments": "