Gamemode4Dev / GM4_Datapacks

Gamemode 4 is a collection of modular Minecraft Datapacks that change or expand on the vanilla experience whilst keeping the vanilla feel. Our modules are developed with a focus on usability and efficiency.
https://gm4.co
GNU General Public License v3.0
108 stars 56 forks source link

Update to 1.21 #1004

Closed misode closed 2 months ago

misode commented 3 months ago

Testing

Download link: https://github.com/Gamemode4Dev/GM4_Datapacks/suites/25283136056/artifacts/1635345349

Changes

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:

The enchantment predicate change was made with the following regex: