JMOD - The JavaScript MOD Loader

Mods
6,686 Downloads Last Updated: Mar 21, 2017 Game Version: 1.7.10

Overview

JMOD lets you define simple mods without the hassle of setting up a Java development environment and compiling your mods each time you want to try a change. While you don't need to learn Java to write mods with JMOD, you need some basic understanding of JavaScript, however the emphasis definitely is on "basic". 

JMOD excels at building "glue" mods for mod packs, which was its original purpose. It provides you with a multitude of tools to modify existing content in the game, like tool materials, block hardness, recipes or random chest loot. It also allows you to implement new items and blocks in an instant, most of the time with just one single line of code. All the content you add will belong to your own mod, rather than to JMOD or some other mod. So if you want to go ahead and add a few new tools to the game and some new metals - along with ingots and ores, including world generation - JMOD is for you. 

However, if you want build more complicated mods, such that implement machines (will be featured in a later version), custom overlays or altogether complex things that require to alter the game at a deeper level, JMOD is not what you want. While most of this probably is possible with JMOD, it would require to surpass JMODs easy-access-layer and mess with the underlying Java API of MinecraftForge and eventually MineCraft itself, and at this point JMOD's ease-of-use advantages are completely nullified, while the performance disadvantage of JavaScript over Java would still apply. If that is what you desire coding mods in Java is the best way to go. That being said, JMOD will at a later point allow the use of "plugins" which are basically compiled Java classes you can acquire and use with your mods. 

If you desire a feature for JMOD please let me know and I will see if it is possible to implement. 

 

Reference & getting started

A complete API reference will be available as a wiki soon™. You can get a pretty good idea of what you can do with it at the Survival Industry sources for it's JMODs. There is also this amazing Documentation courtesy of @reteo.

 

Basically JMODs come in two flavours: As a directory or as a zipped file. Both versions need to have the ending ".jmod", and be placed in your mods folder. From there on JMOD will take care of the loading. The "mod.json" file is mandatory, as it provides the basic information for your mod as well as the script(s) to execute. Like every normal mod JMODs can contain their own textures and lang files. 

Versions

Right now there is no version planned for 1.8.x, however if I see increasing demand I might put in the work for it.

There will be no version for Java 6 or 7 since the underlying Scripting Engine (Nashorn) is part of the Java 8 JRE. 

Please keep in mind that this is alpha work, so the API is likely to change, bugs are almost guaranteed and I do not take responsibility for broken worlds - so please back them up!

 

Mod Packs & legal stuff


Permission is given to everyone to use this in their mod packs, no matter if private or public. As a courtesy I ask you to use the download from Curse Forge. Also I'd be happy to hear from you if you use this in a public pack.

JMOD is licensed under the MIT License, which gives you a lot of freedom with the software, including building your own versions and distributing them.
JMODs you write yourself are your own work and thereby your property. This means that everyone can (and hereby is encouraged to) distribute their JMODs if they feel they are useful under whatever license model they choose. However, I'd like to see you chose an OpenSource license model, such as the MIT License or LGPL.

 

Contributing

Everyone is free to fork JMOD on github. I however do not guarantee for any pull request to be accepted. I have a very clear vision where I want the project to go, and until I declare a feature freeze I probably will not accept pull requests directly.

 

Credit

Credits go to @reteo and the entire Survival Industry team, whom without this mod would never have existed, both for giving me the idea and incentive to develop it, and providing an amazing testing ground (Special Thanks for the Server @Dulciphi).

I'd also like to thank all the proficient mod developers who share their sources. This is the first real mod I made, and I couldn't have without seeing how things are done by other people. Special Thanks in this department go to @Reika, who has not only developed amazingly well structured and stunningly creative mods, but also has taught me a whole lot about modding just by reading his sources.

Comments

Posts Quoted: