This gist contains some absolutely basic programming concepts you should understand before starting to write more complicated scripts. It is targeted towards people with absolutely zero programming experience whatsoever. If you're just changing recipes, you can probably copy and paste from a tutorial instead. This is mostly targeted towards modded Minecraft pack development, and as such all examples will be in both JavaScript (KubeJS) and ZenCode (CraftTweaker).
Note: this is written with Minecraft 1.19.2 in mind. Things may be different on older or newer versions!
When programming, each line of a file represents a different instruction that your computer runs. These instructions can be various things, from displaying text, to adding numbers, to checking values. In ZenCode, every instruction must end in a semicolon (;
). In JavaScript, lines can optionally end in semicolons, but it's not required.