Importing some ModTweaker classes in ZenScript fails
zdenek-biberle opened this issue ยท 4 comments
Hello, I am running MineTweaker 1.7.10-3.0.1.0, ModTweaker 0.9.5 and Mekanism 8.1.8. I am currently trying to use arrays of Mekanism gases. To do this, I need to import the modtweaker.gas.IGasStack
Zen class (aka the modtweaker2.mods.mekanism.gas.IGasStack
interface).
Unfortunately, attempting to do that in ZenScript (with a line like import modtweaker.gas.IGasStack;
) fails with just the following line being printed to chat and the Minetweaker log:
ERROR: ?:1 > could not find package null
The same thing happens with modtweaker.gas.IGasDefinition
too, I haven't tested much else.
Importing other classes (such as mods.mekanism.chemical.Dissolution
) works well.
I don't know much about the Minetweaker API, but I think this happens because these interfaces are not registered with MineTweaker. Registering them together with the other Mekanism classes in modtweaker2.mods.mekanism.Mekanism
could help.
Yes i think registering should solve this error.
Actually i was interested why you use this import statement, because for normal recipe modify this is not necessary.
As I have stated in the OP, I am using this so that I can have arrays of gases. I use them to simplify creation of a large number of recipes to better integrate Mekanism with GregTech. I may also need to pass gases as function parameters.
Edit: I've just disassembled the Mekanism.class file, added the appropriate registerClass
call, assembled it, replaced the original one in the ModTweaker jar and it seems to have done the trick.