#is there a way to create custom keybinds?
14 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
the previous version examples will probably eb a good starting point. how dont they work?
@hollow abyss been using this in client_scripts
const $KeyMappingRegistry = Java.loadClass('dev.architectury.registry.client.keymappings.KeyMappingRegistry')
const $KeyMapping = Java.loadClass('net.minecraft.client.KeyMapping')
const $GLFWKey = Java.loadClass('org.lwjgl.glfw.GLFW')
ClientEvents.init(event => {
global.HKEY = new $KeyMapping('key.kubejs.hkey', $GLFWKey.GLFW_KEY_H, 'key.categories.kubejs')
$KeyMappingRegistry.register(global.HKEY)
})
and gives me this error
oh yeah that wont do very well cause it uses arch and kjs no longer uses that now
i'm just dumb too
the keybind registery worked and the usage too
now i'm trying to find how to create custom chests gui, if possible
ive been meaning to do an example of those
I could try to make KeyJS to make keybind stuff easier or something
that's cool
code that worked for 1.21.1, closing thread
const $KeyMappingRegistry = Java.loadClass('dev.architectury.registry.client.keymappings.KeyMappingRegistry')
const $KeyMapping = Java.loadClass('net.minecraft.client.KeyMapping')
const $GLFWKey = Java.loadClass('org.lwjgl.glfw.GLFW')
global.HKEY = new $KeyMapping('key.kubejs.hkey', $GLFWKey.GLFW_KEY_H, 'key.categories.kubejs')
StartupEvents.init(event => {
$KeyMappingRegistry.register(global.HKEY)
})