Weird thing
Speiger opened this issue ยท 4 comments
Hi xBony well i have a question why this class is not causing any crashes:
https://github.com/xbony2/Nuclear-Control/blob/master/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossBuildcraft.java
Now here some information:
You load this class in the modsLoaded Function in your mod class.
In the constructor you have something totally useless, you are asking for a class and when he can not find it he simply say API is not aviable...
Now here is the point where it is already useless to me: When you construct the class he is already importing that class which you are checking for. If that not exsist he will not say API not aviable he will crash the game because of that because he failed at Importing the class before even your check happend...
Now the question why did you do that?
Also i answer the question why it not causing any crash on loading:
A: Any mod that is mixed with your mod (in the modpack they use) has already the API files in it so that it can not crash...
B: Magic...
I think this does work w/out any other mod. But basically: because all the functions are prefaced with checking if the Api is there, there should never be a hard crash.
Well another thing. Even if it is closed. You can not remove the CrossMod Compatiblity classes to deactivate it... I know its very late to say that but that would cause a CouldNotFindClassException...
Thats the only thing that would happen the other things i said (i tested it) were wrong but that would happen if you try to load them directly when someone deleted it because he did not wanted the talk between those two mods...