who can write the script? noSlotChanger in the client LB for Nextgen
-
NoSlotChanger 0.1.zip for Nextgen 0.28
-
encoded a jar into base64 and embed in a script, not crazy at all xD.
-
This might be more than just 'preventing the server side anti-cheat to change the hot bar slot' since you mentioned that you are using noslow while eating. Can you please post what anti cheat (might be using
UpdateSelectedSlotS2CPacket
to sync your hotbar) and what noslow modes are you using? (grim noslow modes switches your hotbar server side)internal class NoSlowSharedGrim2364MC18(override val parent: ChoiceConfigurable<*>) : Choice("Grim2364-1.8") { @Suppress("unused") private val onNetworkTick = handler<PlayerNetworkMovementTickEvent> { event -> if (player.isUsingItem && event.state == EventState.PRE) { // Switch slots so grim exempts noslow... // Introduced with https://github.com/GrimAnticheat/Grim/issues/874 untracked { val slot = player.inventory.selectedSlot network.sendPacket(UpdateSelectedSlotC2SPacket(slot % 8 + 1)) network.sendPacket(UpdateSelectedSlotC2SPacket(slot % 7 + 2)) network.sendPacket(UpdateSelectedSlotC2SPacket(slot)) } } } }
Even if you refuse to accept any
UpdateSelectedSlotS2CPacket
and looks as if your hotbar is not switching, there could be a desync and you won't be able to eat food. Would appreciate if you could provide more information of what you are tying to do. -
Trying with matrix on loyisa.cn with noslow mode set to None indeed will move your slot to other items. However just like I assumed previously simply ignoring the packet just won't do, you can never eat the food, even if you immediately send back a slot change. You might need something else to make a nolow mode for matrix. If you need to verify yourself, here is your script anyway.
function __require(path) { if (path.startsWith("@embedded")) { return globalThis } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // imports /* eslint-disable unused-imports/no-unused-imports */ const _embedded_1 = __require("@embedded"); /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const UpdateSelectedSlotC2SPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket"); const UpdateSelectedSlotS2CPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/UpdateSelectedSlotS2CPacket"); const script = _embedded_1.registerScript.apply({ name: "anti slot changing", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "anti-slot-changing", description: "like no rotate reset but for slots", category: "Exploit", settings: { resyncServerSide: _embedded_1.Setting.boolean({ name: "resync server side", default: true }) }, }, (mod) => { mod.on("packet", (event) => { var _a, _b, _c; if (event.packet instanceof UpdateSelectedSlotS2CPacket_1.UpdateSelectedSlotS2CPacket) { event.cancelEvent(); if (!mod.settings.resyncServerSide.get()) return; (_a = _embedded_1.mc.getNetworkHandler()) === null || _a === void 0 ? void 0 : _a.sendPacket(new UpdateSelectedSlotC2SPacket_1.UpdateSelectedSlotC2SPacket((_c = (_b = _embedded_1.mc.player) === null || _b === void 0 ? void 0 : _b.inventory.selectedSlot) !== null && _c !== void 0 ? _c : 0)); } }); });