How to best expose Util methods to CC that require access to mod config options #947
-
Hi, I was wondering if there is a decent way to expose custom "programs" to CC except that has access to the java side of code. I know that it is possible to add lua scripts to a datapack but I am not sure offhand of any way to make it reference the java side of things. In Mekanism internally all our energy values are in Joules, but given a lot of players probably are going to want to be converting to FE if possible, which I feel like would make the most sense as a "helper" program so that people can say do In theory I could slightly tweak my system that converts annotations into multiple methods especially for returns, and make it so that say every |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Would It's not a perfect solution - new globals are always gross - but I'm not sure of a better solution here. |
Beta Was this translation helpful? Give feedback.
Would
ILuaAPI
do what you want? This allows you to register a global API, so people could domekanism.joulesToFE(123)
or something.It's not a perfect solution - new globals are always gross - but I'm not sure of a better solution here.