You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: ability to convert existing datapack to cbs #7
Hi Seth! Very great job. I once had a project similar to this a few years ago but never ended up finishing it. I'd like to help out and contribute to this project, so expect to see some PR's from me. I'll cover this feature unless you beat me to it.
also any minecraft command can be a valid line of CBScript code, so we're not sure how one determines what can and can't be decompiled in the first place.
it seems to me you'd probably end-up with something akin to a dissaembly
that should be your first step, anyways
i'm not sure how far decompiling/"decompiling" any given datapack would go, but you might be able to, say given an example
"pack/customentity/<spawn.mcfunction,destroy.mcfunction,tick.mcfunction>"
get "pack/customentity.cbs"
[re-]generating loops/ifs and other control flow or logic sounds like it wouldn't be nearly as simple.
you could surely "decompile" the list of commands/functions, themselves
but is that particularly helpful versus porting the whole thing by hand?
how much manual fix-up is needed, regardless?
honestly, I feel like that is quite a bit out of scope from this project and would be better suited as a separate project.
I also have significant doubts about large language models being a good tool for the job, both due the resource usage and the risk of hallucinations. From my (though admittedly limited) experience, large language models struggle with unusual programming languages, though it should be noted the experience I'm drawing from is with a esoteric programming language.
Activity
deli73 commentedon Mar 11, 2024
out of curiosity, how would this work? decompiling minecraft commands sounds like it'd result in some pretty messy code at best.
nick-tonjum commentedon Mar 11, 2024
Yeah probably. A whole new side of the program would have to be made. I was also thinking possibly a llama.cpp model that could possibly convert it?
deli73 commentedon Mar 12, 2024
also any minecraft command can be a valid line of CBScript code, so we're not sure how one determines what can and can't be decompiled in the first place.
Brian151 commentedon Mar 14, 2024
it seems to me you'd probably end-up with something akin to a dissaembly
that should be your first step, anyways
i'm not sure how far decompiling/"decompiling" any given datapack would go, but you might be able to, say given an example
"pack/customentity/<spawn.mcfunction,destroy.mcfunction,tick.mcfunction>"
get "pack/customentity.cbs"
[re-]generating loops/ifs and other control flow or logic sounds like it wouldn't be nearly as simple.
you could surely "decompile" the list of commands/functions, themselves
but is that particularly helpful versus porting the whole thing by hand?
how much manual fix-up is needed, regardless?
MinekPo1 commentedon Mar 15, 2024
honestly, I feel like that is quite a bit out of scope from this project and would be better suited as a separate project.
I also have significant doubts about large language models being a good tool for the job, both due the resource usage and the risk of hallucinations. From my (though admittedly limited) experience, large language models struggle with unusual programming languages, though it should be noted the experience I'm drawing from is with a esoteric programming language.