Keybind for xray.
BASEBALLMONKEY02 opened this issue ยท 1 comments
I want to know how to change the keybind for the xray. I have found the script that i can translate using an app. but I do not know how to read code. (im stupid ik). so if anyone would like to tell me how or tell me what the script means and how i could change it, go ahead. here is the translated script.
class KeyBindings {
static CATEGORY = "X-Ray";
static toggleXRay;
static toggleGui;
static setup() {
// Implementation not provided in the Java code
}
static registerKeyBinding(event) {
event.register(KeyBindings.toggleXRay);
event.register(KeyBindings.toggleGui);
}
static eventInput(event) {
const mc = Minecraft.getInstance();
if (!mc.player || !Minecraft.screen || !Minecraft.level) {
return;
}
if (KeyBindings.toggleXRay.consumeClick()) {
Controller.toggleXRay();
}
if (KeyBindings.toggleGui.consumeClick()) {
Minecraft.setScreen(new GuiSelectionScreen());
}
}
}