Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird thing #93

Closed
Speiger opened this issue Jun 1, 2015 · 4 comments
Closed

Weird thing #93

Speiger opened this issue Jun 1, 2015 · 4 comments

Comments

@Speiger
Copy link
Contributor

Speiger commented Jun 1, 2015

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...

@dmf444
Copy link
Collaborator

dmf444 commented Jun 1, 2015

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.

@Speiger
Copy link
Contributor Author

Speiger commented Jun 1, 2015

Well if it loading a class that it can not find then it will a execption...

@dmf444
Copy link
Collaborator

dmf444 commented Jun 1, 2015

But it only tries to find the class, then proceeds, success or not

@xbony2 xbony2 closed this as completed Jul 11, 2015
@Speiger
Copy link
Contributor Author

Speiger commented Jul 11, 2015

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants