Connect your Minecraft username to Magikcraft
With Magikcraft, you can write JavaScript code in your web browser at play.magikcraft.io,
The entire process is illustrated in the following process diagram, and step-by-step instructions are given below.
mvcreate ${name} normal
.mvcreate intro normal
world-${name}
, for example: world-intro
.git init
git remote add ...
) in the new world directory:npm init -y
This generates a package.json
file, which allows the world to be managed by npm.
package.json
file and change the package name to @magikcraft-world/${name}.template
. For example: "name": "@magikcraft-world/intro.template",
The @magikcraft-world
part makes it easy to find world packages in our registry, and prevents you from accidentally publishing it to the public npm repository. The .template
part signals to our Multiverse code to refresh the world when players quit, so that it never gets damaged. This is the name when the world is installed from a package.
package.json
file: "publishConfig": {
"registry": "https://npm.magikcraft.io"
},
This allows you to publish the package to our registry, and prevents it from being published to the public npm repository.
description
field in the package.json
file.author
field in package.json
, using your GitHub account's email address, like this:"author": "Josh Wulf <josh@magikcraft.io>"
README.md
in the world's directory. Make the first line a heading with the world's name, for example:# Intro World
README.md
file, and add information about what lesson it is for and any code that it needs to run.git add .
git commit -m "Initial commit"
git push -u origin master
npm publish