AGworld recommends the use of VisualStudioCode for development.
First of all, download the software from the official website.
Download VisualStudioCode
While it is possible to create add-ons in JavaScript, we also recommend downloading TypeScript, which is recommended by the official Minecraft reference.
TypeScript requires Node.js.
How to install Node.js and TypeScript
1,Install Node.js : First, visit the official Node.js website and download it.
2,Run the installer : Follow the on-screen instructions to proceed with the installation.
3,After installation is completed : After the installation is complete, check to see if the installation has been completed by using a command pronto or in the terminal.
node -v
4,Use npm and install TypeScript : Type the following command to install TypeScript
npm install -g typescript
5,Confirm version : After installation is complete, check the TypeScript version.
tsc -v
5,Install extensions in VisualStudioCode : Search for "TypeScript" in the VS Code Extensions Marketplace and install the "TypeScript and JavaScript Language Features" plugin.
6,Initialization of project : Create a new folder and open it in VS Code.
Next, initialize the TypeScript project by running the following command in Terminal
7,Create a TypeScript file for trial and compile : Create a new file and save it with the extension .ts.npm init -y npm install typescript --save-dev npx tsc --init
Then, compile the TypeScript file by running the following command in the terminal
npc tsc
Now you can start writing your TypeScirpt code. In fact, when you create the add-on, simply set the extension to .ts and start coding.