MineTweaker3
MineTweaker3 copied to clipboard
Feature Request: The ability to check if a mod has loaded
I don't know if this is already in, but if it is not it would be great to use in a library file (#55) such as in the PhoenixConfigs
That is already requested feature by me on Forum ;) It is planned.
@CastielAngelow thanks, close?
It's planned. Actually you can use the following expression:
if "IC2" in loadedMods {
print("Doing stuff");
}
However, evaluation of bracket expressions would still fail if the items can't be found and variables declared inside if blocks are not available outside them, making this construct not very useful at this point. I will soon enable lazy evaluation of bracket values so this becomes possible.
Sorry if I bother anyone, but I wonder if there is any progress? Cause I try to use the following scripts but doesn't work:
if (loadedMods.contains("Railcraft")) {
print("[Info] Welcome to use Railcraft");
}
If I make any mistakes please point out.
The example was if "IC2" in loadedMods
, your syntax is completely different. Maybe that's the problem?
@PrincessRTFM I know that's completely different, but I noticed something different from the actual codes: https://github.com/stanhebben/MineTweaker3/blob/master/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/mods/MCLoadedMods.java#L20 https://github.com/stanhebben/MineTweaker3/blob/master/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/MineTweakerMod.java#L96
Uh @3tusk, congrats! You are the first person that I have seen that has tried to use java in zenscript :P
What you are trying is how a mod would check if another mod is present, try the method that Stan showed.
Technically the second @jaredlll08 lol I tried it in the Fluid Dict handling Blank Spaces for Life Essence lol
- Edit: added link.