Always good to see a new datapack maker; they're an underrated art form!
So welcome to pmc!
some tips:
- If you're using functions in your datapack, split your main function in to multiple, smaller functions, it reduces lag when the functions aren't being used and it allows you to apply the same commands to multiple situations without having to rewrite them every time.
- Also, try to make everything as concise as possible, for example if you're using a target selector that looks like this:
@e[type=!player,type=!item,type=!wither,type=!zombie]
Instead, make a custom entity tag which includes all the targeted entities and call it whatever, that way you can use the tag in the selector: @e[type=!#your_namespace:your_tag]
- putting a # at the beginning of a line tells minecraft to ignore that line, so you can add comments and descriptions in to your functions, this makes them much more readable for if you come back to them at a later data
- If you're making a big datapack with many, many functions, split them of in to subfolders, organised files will make your life 26.82x better!
- mcStacker is your friend when you're starting out! (and sometimes when you're experienced too)