Topic 3: Creating our First ScriptCraft Mods

2014-10-17_20.54.57

(Notes updated September 2015.)

Previous Topic: Connecting to Each Other’s Servers.

Our First Mod: sayhi.js

I’ll show you how to write a very simple one, sayhi.js, and then a more complex one, scraper.js. After that, it’s up to you to figure out what you can do!

In the Canarymod folder, find the folder scriptcraft / plugins, then make a new folder with your name (or any unique folder name).

Using Notepad++, type in the code shown below and save it in a file called sayhi.js. Here are explanations of what everything means:

sayhi-scriptcraft

Try it out in Minecraft and see if it works!

NOTE: Every time you create a new ScriptCraft program or edit one, you have to type /js refresh() in Minecraft to update your changes. If no commands run, make sure you are opped. (In the Canarymod window, type op <your_mincraft_name>).

To run it, type /js sayhi() in Minecraft.

A More Complex Mod: scraper.js

This makes the skyscraper shown above. We will figure out together how it works!

scraper-scriptcraft

4 thoughts on “Topic 3: Creating our First ScriptCraft Mods

  1. Pingback: ModderDojo Topic 1: Getting Started with ScriptCraft and JavaScript | CoderDojo Athenry

  2. Pingback: Topic 2: Connecting to Each Other’s Servers | CoderDojo Athenry

  3. Pingback: Minecraft Modding Taster Session – Week 1 | CoderDojo Athenry

  4. Pingback: ModderDojo Topic 4: Moving from Scratch to JavaScript | CoderDojo Athenry

Leave a comment