JSM allows you to write mods for the first version of Minecraft in JavaScript (not Java!)
JSM adds APIs for player and level mutation, registering custom blocks, HUD rendering, keybinds, and event hooks. Just drop the .js into the mods/ folder!
var $ = { getModDetails: () => ({ name: "My First Mod", description: "I made this!", authors: ["numenmc"] }), getModNamespace: () => "mymod", start: () => { Game.registerBlock({ texture: ..., name: "My Custom Block", identifier: "custom_block" }); } }
Here, we've made a custom block called "My Custom Block."
$ variable.ModDetails
which the mod loader can interpret.Game.registerBlock to add it to the game.| 1. | Make sure you have Prism Launcher or MultiMC installed. |
| 2. |
Download the .zip file by clicking the "Download latest" button above.
|
| 3. |
Create a new instance in Prism or MultiMC and set the version to rd-132211
|
| 4. |
Edit the instance and click the "Version" tab. Then click "Add to Minecraft.jar" and select the
.zip you just downloaded.
|
| 5. | If the instance fails to launch go to the "Settings" tab and turn on "Skip Java compatability tests." |
| 6. |
You can now place mod .js files into the mods/ folder
|
These mods are written by me, they provide useful features you would otherwise have to write yourself.
| Mod description | Download |
|---|---|
Hotbar - this mod adds a hotbar that you can scroll with the Q and E keys. If you do not want
to use this mod,
you can select the block to place by using the Game API.
|
Download "Hotbar" |
| Crosshair - this mod adds a HUD element in the center of the screen so you can see what you are aiming at. | Download "Crosshair" |
| FPS Counter - this mod displays the game's framerate in a HUD element in the corner of the screen. | Download "FPS Counter" |
.d.ts files, you can download the typings here. Just include this at the top of your file:
// @ts-check
/// <reference path="/path/to/jsm_api.d.ts" />
PixelArray generatorYour output will appear here...