Closed liaic closed 2 years ago
Yes. I have no documentation on it, because it is meant to be modified by the coder. If you want to edit it: https://github.com/superblaubeere27/ClientBase/blob/master/src/main/java/net/superblaubeere27/clientbase/scripting/ScriptManager.java And itt uses the Nashorn Engine (https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)). If you want to know how to use it just google it :D
Do you have like a basic script to test if it works?
Do you have like a basic script to test if it works?
I reconstructed how a script should look like, but I am not sure if it works:
First of all, every file related to the script has to be in a zip file.
The most important file is the (manifest.json
).
{
"name": "Test",
"description": "Test script",
"modules": [
{
"name": "TestModule",
"description": "Script engine test",
"category": "FUN",
"script": "test_module.js"
}
]
}
Each module has it's own javascript file in the zip file (test_module.js
):
function onMotionUpdate(event) {
if (event.getEventType().name() != 'POST') {
return;
}
const player = rt.getMinecraft().getThePlayer();
if (event.isOnGround()) {
event.setPitch(-90);
}
}
Ok thanks
seems like it's different from liquidbounce?