Hello world, Mitchellbrine here! And today, I bring you a project I have been working on for a bit. After looking at all my mods, I saw I needed a tech mod, but I didn't want to conform to the old ways of pulverizing ores and so what. About the same time, I figured out javax's ScriptEngine feature and it was set: I was going to create a mod that allows people to customize how technical automation works.
- - -
This mod allows you to use a JavaScript Terminal to create scripts that will customize inventories, world functions, and allow you to just code. The mod runs scripts in JavaScript (or custom languages, see FAQ). The mod is currently a heavy work-in-progress and will be constantly adding in new features and support for more technical aspects.
Requires Minecraft Forge 1291 or newer! (Forge 1.7.10)
How to Use the JavaScript Terminal:
After crafting the JavaScript Terminal, you must place it down and right click it to open it. As you can see, it has one available script for you: HelloWorld. Right-clicking a script after it is already selected runs it for you. This script shows you how to print to the console. This will prove useful when creating/debugging scripts. Now, if you go back into the main GUI, you can see the "Add" and "Edit" buttons. Here is what these two buttons do:
"Add":
- The add button creates a new script. Be sure to put in a name for your script as well as your code to save it.
"Edit":
- This button opens a selected script. If you remove all the code in the script, the terminal will delete the script. This is useful for if you make a mistake.
"Add":
- The add button creates a new script. Be sure to put in a name for your script as well as your code to save it.
"Edit":
- This button opens a selected script. If you remove all the code in the script, the terminal will delete the script. This is useful for if you make a mistake.
Screenshots:
(The JavaScript Terminal in my test world)
(The script list and console in the GUI for the Terminal)
(The script editor showing the default script that prints "Hello World")
(The crafting recipe for the JavaScript Terminal (this is a WIP recipe atm))
FAQ:
Q: How is this useful?
A: Well, this mod can be used for creating your own code to automate processes. You control what your terminal will do, so you can see it happen.
Q: Does this mod support other languages (like dogescript)?
A: Not yet, as of Alpha 3, but in the next alpha, I will add support for dogescript. Other languages can be easily added in code using the ScriptEvent.RuntimeSyntaxEvent.
Q: Is this mod finished yet?
A: No, silly! It's still a WIP and will be added to in due time.
Q: Does it crash?
A: Occasionally, but it's probably one of the more stable mods I've created as it deals with mostly theoretical programming and not too much flash and extensiveness.
Q: Can I put it in my modpack?
A: The real question is: "Can it fit in a manila envelope?" YES IT CAN! (Just not for money. You can't make make money off the pack if you use it. Sorry, it's basically stealing in my eyes.)
A: Well, this mod can be used for creating your own code to automate processes. You control what your terminal will do, so you can see it happen.
Q: Does this mod support other languages (like dogescript)?
A: Not yet, as of Alpha 3, but in the next alpha, I will add support for dogescript. Other languages can be easily added in code using the ScriptEvent.RuntimeSyntaxEvent.
Q: Is this mod finished yet?
A: No, silly! It's still a WIP and will be added to in due time.
Q: Does it crash?
A: Occasionally, but it's probably one of the more stable mods I've created as it deals with mostly theoretical programming and not too much flash and extensiveness.
Q: Can I put it in my modpack?
A: The real question is: "Can it fit in a manila envelope?" YES IT CAN! (Just not for money. You can't make make money off the pack if you use it. Sorry, it's basically stealing in my eyes.)
Changelog:
Alpha 4:
- (ADDED) DOGEScript parser/language (It's WIP and only a partial-parser atm. I'll put up some of my test code on pste.me later)
- (CHANGED) The syntax system to allow for different runtime language checking (runs them through the parsers). It's now modular, so mods can add onto the languages added using the simple system created.
- (ADDED) DOGEScript parser/language (It's WIP and only a partial-parser atm. I'll put up some of my test code on pste.me later)
- (CHANGED) The syntax system to allow for different runtime language checking (runs them through the parsers). It's now modular, so mods can add onto the languages added using the simple system created.
Download: http://minecraft.curseforge.com/mc-mods/227936-javascript-automation/files/latest
JavaScript Automation is licensed under GNU Lesser General Public License v2.1