Open Discord-Github-Bridge opened 6 months ago
The color of the cards that people get in the discord bridge is random with their name as seed it's always interesting to see them
engineersmith_4628 on Discord says
I want to be able to access the key binding for
key_crafting_on_a_stick.key.open_curios
and others ™️
Easy: minecraft command that when ran writes settings to json file
Hard: an api entry that returns settings
i could try wrapping a class like kubejs does
in javascript
although i have no idea how that works and how complicated it would bve
look at a simple kjs addon
engineersmith_4628 on Discord says
I tried loading
net.minecraft.client.Minecraft
in kubejs but it didn't like me
if there is one
is there a progammatic way to get the keybind
engineersmith_4628 on Discord says
Oh - the github issue doesn't mention who the OP is
engineersmith_4628 on Discord says
no idea other than this 1 blog post for forge 1.7
engineersmith_4628 on Discord says
I assume it can give me the
keyMapping
class for the key and from that you can get the key
ill see what i can do
engineersmith_4628 on Discord says
No big rush - I know how painful the docs are
thats alright, should be relatively simple
engineersmith_4628 on Discord says
you have 12 minutes
yarden.zamir do you know how create classes are available like this: $myclass = Java.loadClass("com.simibubi.create.content.trains.bogey.AbstractBogeyBlock")
need to import the source of ptdye plus into kubejs somehow
I think any loaded mod can be loaded this way
Not realted to kube
for you it will be com/kikis/ptdyeplus
think i need to dump probejs
Yea you need to load it with loadClass then dump
ok im having quite a lot of trouble
was trying to follow the kubejs readme: https://github.com/KubeJS-Mods/KubeJS/tree/2004?tab=readme-ov-file#creating-addons
but the examples it provides are outdated 😢
tried some things but nothing working
going to ask on their discord
also github search is completely broken right now 😭
holy fucking shit i did it
i am a god coder and there is nothing i cant code!
i managed to make an a custom event handler
and i can programmtically fire that event from java
i havent figured out how to just expose a function though
but i can expose a function in the event
console.log('my settings: ' + event.settings()); })```
i think what we need is an exposed function that can just be run whenever but if an event works engineersmith_4628 , when do you need to know what the keybind is?
never mind
got the function working
minecraft.getMinecraft().gamesettings as a variable that can be accessed in kubejs (even write to a file and read with kubejs)