[SCRIPT BASE] Core 4.11 - Simple, yet powerful ScriptAPI base
-
Core 3.19
Fixed Core's autoupdating on custom LBs with changed file directories.
You will need to update manually to have Core automatically update itself.
(only regarding Core.lib file, script autoupdating works fine)Fixed ClickGUI hooking when there's only a single script that has
scriptAutoUpdate = false
.
this won't matter to most of youAdded a few utils and stuff k thx bye.
-
When I turn on the animation block, it does not work as it should, it does not show what I set up
-
@deadhadijg You need to explain that properly. Contact me directly here or CzechHek#6969.
-
Core 3.23 is here
I've been getting many reports of Core not working properly recently. This was caused by its autoupdating system, which was dependant on dyskord.cc which has been down for quite a time now.
I've adressed the issue like this:
- Recoded broken autoupdating, now it checks github for latest version directly. It should also be more stable.
- Fixed Core reseting its log, which made it check for updates on every reload.
- Fixed minor issue that caused updated scripts to be duplicated in script list.
You have to download this version manually, after that you will receive updates automatically like before.
If you don't know how:
Right click: https://raw.githubusercontent.com/CzechHek/Core/master/Core.lib
Save link as...
Core.lib, put it into %appdata%\Roaming.minecraft\LiquidBounce-1.8\scripts -
Released Core 3.24
-
Added support for custom auto update urls.
Core.updateURL = "arawlink.com/smth.js" or you can disable updates: Core.updateURL = "" or Core.updateURL = false or null or smth like that
- Added TextEditor util. You can edit text files with it:
editor = new TextEditor(new File("smth.txt")); editor.text = "cool" or editor.setText("cool") editor.getText() == editor.text == "cool" editor.file == new File("smth.txt") editor.file = new File("smthelse.txt") or editor.setFile(new File("smthelse.txt"))
- Prevented creation of global variables after use of specific Core utils.
- Improved legacy support. (fixed autoupdates, names of scripts, modules, ...)
- Fixed CME crash when script updated during a reload.
-
-
Update 3.25
-
@plumer-man Yep, I'm only posting about important updates.
-
Core 3.28 brings artificial events!
All events are available for you
Thanks to @commandblock2 for giving me this idea, you can now use all events implemented in LiquidBounce, such as:
- onBlockBB
- onClientShutdown
- onEntityMovement
- onPushOut
- onRenderEntity
- onScreen
- onText
- onTick
Here is an example from https://github.com/CzechHek/Core/blob/master/Examples/artificial events.js
///api_version=2 (script = registerScript({ name: "ArtificialEvents", authors: ["CzechHek"], version: "1.0" })).import("Core.lib"); module = { onBlockBB: function (e) { var x = e.getX(), y = e.getY(), z = e.getZ(), block = e.getBlock(), bb = e.getBoundingBox(); e.setBoundingBox(bb.expand(0, 0.5, 0)); }, onClientShutdown: function () {}, onEntityMovement: function (e) { var entity = e.getMovedEntity(); }, onPushOut: function (e) { e.cancelEvent() }, onRenderEntity: function (e) { var entity = e.getEntity(), x = e.getX(), y = e.getY(), z = e.getZ(), yaw = e.getEntityYaw(), partialTicks = e.getPartialTicks(); }, onScreen: function (e) { var screen = e.getGuiScreen(); }, onText: function (e) { if (mc.thePlayer) { var text = e.getText(); e.setText(text.replace(mc.thePlayer.getName(), "axolotlus")); } }, onTick: function () {} }
-
-
@czechhek said in [SCRIPT BASE] Core 3.28 - Simple, yet powerful ScriptAPI base:
onClientShutdown
-
-
@fartcheese
Java.type("java.lang.Runtime").getRuntime().addShutdownHook( new Thread(function() { var editor = new TextEditor(new File("wtf.txt")); editor.text = "The process has been terminated." }) );
Works but I don't think that using Runtime isn't sus in scripting base scenario.
However I could make it call onClientShutdown event if you wanted.
Edit: For some reason it doesn't do anything probably because it is on other thread, however normal onClientShutdown detects process termination from Task Manager, so I will leave it like it is. Additionally, when I was doing stuff around this I noticed that you cannot call the new "artificial events" using built-in
callEvent
util, so I made them register into ScriptModule's event register as well.