2
Old Datapack to 1.20.2+ syntax updater python script
Hey I know that a lot of people may have made datapacks pre-1.20.2 and the syntax change. With the syntax change going forward from 1.20.2 everyone's datapack code will have to be different. I have made a simple python script to update datapacks made before the syntax change. You can just insert the directory of the folder you want to update and run the script. The script will automatically rewrite all the files so that it is in the new format. I suggest making a copy of your code and then updating the copy as this will rewrite your code with no going back.
The link below goes to a public Google Drive file that include instructions on how to use. Please leave any comments on the file or here to let me know if any changes are needed. Also please let me know if it works well for you in a comment here if you can. I like to know if people use this.
Google Drive Link - Python Code File
The link below goes to a public Google Drive file that include instructions on how to use. Please leave any comments on the file or here to let me know if any changes are needed. Also please let me know if it works well for you in a comment here if you can. I like to know if people use this.
Google Drive Link - Python Code File
Create an account or sign in to comment.
5
did i miss something? what syntax was change from 1.20.1 to 1.20.2?
Or is this for pre 1.20 packs?
*im dumb, i just didnt scroll far enough to see the updates ^^*
Or is this for pre 1.20 packs?
*im dumb, i just didnt scroll far enough to see the updates ^^*
so its like a datapack updater?
Exactly what it does. Updates your data packs to be 1.20.2+ compatible. If you have a large datapack with a ton of files, it would take forever to update every change like this. I just made a "find and replace" script so that you can just run it and it will do all the changes for you over your entire datapack. Then you don't have to do that huge task manually.
A few of the changes in 1.20.2 Change Log
A few not mentioned that got changed too:
'Id:3b' -> 'id:"minecraft:haste"'
'id:3b' -> 'id:"minecraft:haste"'
A few of the changes in 1.20.2 Change Log
A few of the technical changes (Dropdown list of examples, click here)
- Id -> id, also changed from number to string id
- Ambient -> ambient
- Amplifier -> amplifier
- Duration -> duration
- ShowParticles -> show_particles
- ShowIcon -> show_icon
- HiddenEffect -> hidden_effect, also since it's mob effect instance, changes apply recursively
- FactorCalculationData -> factor_calculation_data
A few not mentioned that got changed too:
'Id:3b' -> 'id:"minecraft:haste"'
'id:3b' -> 'id:"minecraft:haste"'
oh ok thx ill use this
Mac Copy Path Instructions:
Open Finder and and navigate to the directory with the folder with your datapack folder in it
Right click on the datapack folder
Hold the option/alt key (It's the same key, two names) so that "Copy" shows as "Copy as Pathname"
Then click "Copy as Pathname", paste that below for the directory varaiable.
Windows Copy Path Instructions:
Open File Explorer and navigate to the directory with the folder with your datapack folder in it
Click once on the address bar at the top of the File Explorer window. This will highlight the entire path.
Right-click on the highlighted path, and a context menu will appear.
Select "Copy" from the context menu. This will copy the full path to your clipboard.