Open Discord-Github-Bridge opened 9 months ago
now i can create functions in java and expose them to kubejs like so
console.log(Ptdye.ptdyeUtils.isWorking());
returns true
Ptdye is like a global instance
engineersmith_4628 so i found where keybinds are stored
its options.txt in minecraft root directory
now need to find a way to get this file in java, cant find a function for it
found a way
use that jar
and you can use function
Ptdye.utils.getOptions()
and itll return a string of all the options
its not formatted very well ill make it json
but it works
You'll have to probejs dump and restart vscode
Great job!
Awesome
i just thought of something
im not sure which options.txt its getting
is it getting the one on the server
Depends on where the script that's loading the class
If you put it on client scripts like the ponders it should be fine
engineersmith_4628 on Discord says
Minor problem - the actual ponder code only runs at reload <:betsy:1175697772880609320>
engineersmith_4628 on Discord says
I guess I could look into hacking the lang file instead hmm
anything i can help with?
engineersmith_4628 on Discord says
I'm going to research more in what I can do first - I'll hit you up if I can't find a solution that I can do on my own
what are you trying to do?
oh your trying to get the keybind in the ponder
shouldnt it work like ponder code runs at reload -> get keybinds function -> set keybinds in ponder text
but it's client code that doesnt make sense
reload is not meant for client
engineersmith_4628 on Discord says
It's because ponder is ran - and "cached"
engineersmith_4628 on Discord says
so the scene is "pre-rendered" of sorts
engineersmith_4628 on Discord says
which allows the reversing and time skipping
engineersmith_4628 on Discord says
the function basically just writes the scene - and then the scene is replayed as it was first ran
and my function doesnt work in that context?
engineersmith_4628 on Discord says
It works in the sense, it grabs it on the first run of the function. But then it is set in stone what it played until a reload re-runs the function
engineersmith_4628 on Discord says
You mean with
/kubejs reload client_scripts
? that's what I run
can you do like a translation?
so whatever is set in stone is the translation key
and then do some fancy stuff with the translation file
the set in stone thing still applies i bet
engineersmith_4628 on Discord says
Yeah that was what I was thinking - merging two translation keys e.g. command =
Press %s
Text.translate(command, Text.translate("perass.key"))
engineersmith_4628 on Discord says
translations are even more awful with ponder
engineersmith_4628 on Discord says
they are auto generated.
perass key lmao
minecraft.getMinecraft().gamesettings as a variable that can be accessed in kubejs (even write to a file and read with kubejs)