From 53a0a063ce3a8f5c4dcfcb95114146dd54f6c00d Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Tue, 24 Sep 2024 14:42:30 +0800 Subject: [PATCH] simple vclip + beggining of asyncsink --- examplemods/AsyncSink.js | 2 ++ examplemods/vclip.js | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 examplemods/AsyncSink.js create mode 100644 examplemods/vclip.js diff --git a/examplemods/AsyncSink.js b/examplemods/AsyncSink.js new file mode 100644 index 0000000..80c6449 --- /dev/null +++ b/examplemods/AsyncSink.js @@ -0,0 +1,2 @@ +//AsyncSink is a plugin to debug and override asynchronous methods in EaglercraftX +//WIP \ No newline at end of file diff --git a/examplemods/vclip.js b/examplemods/vclip.js new file mode 100644 index 0000000..8582db3 --- /dev/null +++ b/examplemods/vclip.js @@ -0,0 +1,17 @@ +ModAPI.meta.title("Simple VClip Exploit"); +ModAPI.meta.description("Use .vclip to vertically phase through blocks."); +ModAPI.meta.credits("By ZXMushroom63"); +ModAPI.require("player"); +ModAPI.addEventListener("sendchatmessage", (ev) => { + var msg = ev.message.toLowerCase(); + if (msg.startsWith(".vclip")) { + ev.preventDefault(); + var yOffset = 1; + if (msg.split(" ")[1]) { + yOffset = parseFloat(msg.split(" ")[1]) || 0; + } + ModAPI.player.setPosition(ModAPI.player.posX, ModAPI.player.posY + + yOffset, ModAPI.player.posZ); + ModAPI.displayToChat("[SimpleVClip] VClipped " + yOffset + " blocks."); + } +}); \ No newline at end of file