New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMOD support #77

Open
reteo opened this Issue Mar 17, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@reteo
Copy link

reteo commented Mar 17, 2016

One of my team just finished releasing a new type of modloader called The JavaScript Mod Loader, which uses javascript files with assets in zipfiles using the ".jmod" extension. Would it be possible to allow that extension in the file browser on the website?

@RyanTheAllmighty

This comment has been minimized.

Copy link
Member

RyanTheAllmighty commented Mar 17, 2016

@reteo

This comment has been minimized.

Copy link
Author

reteo commented Mar 17, 2016

I'd consider it more an add-on than a script; the only real difference between a JMOD and a Forge mod is the programming language (and they're both in Java 8 itself). It's still programming and assets all zipped up into a single file that is put in the mods folder and loaded by a modloader. It even shows up in the Forge mods list when Minecraft is running.

Either way, it's not a major priority; the JMOD main mod is still in alpha, and I'm getting around the restriction by zipping the jmod file into another zipfile, and using the "extract" type. Besides, the version of Survival Industry that uses this mod is not even a public release yet (and still under heavy development). But I figured that it would be prudent to make the request.

@RyanTheAllmighty

This comment has been minimized.

Copy link
Member

RyanTheAllmighty commented Mar 17, 2016

@reteo

This comment has been minimized.

Copy link
Author

reteo commented Mar 17, 2016

Well JMOD does not add any languages itself; it uses the JavaScript engine built into Java 8 itself (Nashorn). If I understand this correctly, this means that it has hooks into Java and Forge APIs; as @JeffPengMC mentioned, this means that you could technically use JavaScript to write an entire mod, and JMOD will load it into Minecraft. It won't, however, be very performant, being JavaScript, after all, but it will work.

The hooks into Forge and other mods is where the JMOD API layer comes in; it includes code that duplicates not only MineTweaker, but also Custom Items, Block Properties, some features of Tinker's Construct, and some features of Iguana's Tinker Tweaks, as well as hooks into NEI, Reika's Mods, and Ex Nihilo. It also has a couple mechanics all its own.

As for adding blocks and items, you can see some examples starting here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment