(NOTE: To run mods on LearnToMod's Minecraft server, you will need an account on the LearnToMod website and a compatible Minecraft launcher.  New users should complete the Skills and Drills < 'Run Your Mod' badge tutorial which explains step by step how to run your mod. Then go to your server page to get a temporary ip; a tutorial video there will explain how to connect)


LearnToMod's Minecraft server and simulator have certain plugins installed on it that help the mods run smoothly. A lot happens in the background after you press the 'mod' button on a badge tutorial page!


The badge tutorial mods on LearnToMod are written in Blockly, which is a JavaScript library. It's mostly JavaScript behind the scenes. To see this in action, pressing the JS button located on all badge tutorial pages will show you what a Blockly mod looks like in JavaScript.


When you press the mod button, the JavaScript code is sent to our cloud storage. Every few seconds, your private LearnToMod Minecraft server runs a routine that will... 1) check the cloud storage for any new mods, or any mods that have been updated under your profile 2) load or reload the mod as a script in a Minecraft server profile we have for your Minecraft user. At this point you should see the following text in the Minecraft chat: "mod loaded ([mod name])" Then you can run the mod with the book or the /js command. 


We use main as an entry point for the mod, so that the mod code doesn't launch immediately. That way, your server won't crash due to too many mods trying to launch at the same time. To avoid this common error, make sure all the mods you've downloaded or made on LearnToMod have a main function. (main should be lowercase) Another benefit of this delayed launch of the mod is that you can choose which way to run it (by deploying the book in your mod chest or by running the /js code).