Jump to content

Recommended Posts

Posted

Hi all,

 

I'm developing mod M, and want to run tests while simultaneously running mod M and a testing mod T in my dev environment.

 

When I attempt to install T, by placing it in my dev client's "mods" directory (same directory tree where the client logfiles go, etc.) -- it only partly works.  I see on the title screen that it loaded, but none of the other functionality is present.  T works fine on my normal (non-development) Minecraft client.

 

Can anyone help me understand what I'm doing wrong?  I've read some claims that code obfuscation might be related, but I don't understand why that would affect the client software reading a pre-compiled .jar at runtime.

 

If it matters, I am using IntelliJ, and the testing mod in question an x-ray mod (linked below) -- I'm using it to test ore generation code.

 

Thanks in advance

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292688-xray-mod-1-6-4-1-8-3-vanilla-optifine-forge

 

Posted

Trying to add a released mod into a developing minecraft may cause crash. That's because a released mod is reobfuscated, which cannot run in deobfuscated environment.

 

If the mod is open-sourced, you could simply copy these source to your src folder and add them to your source directories in IDE.

 

I have no idea about those not open-sourced.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Posted

This is what src/api/java is for. It gets compiled with your mod but not put in the jar file.

Is it specially created or what? Because i don't have it after building workspace...

 

I think you have to add it manually.  Create the folder, then right-click on basically anything in the project layout (the package list, external jars, etc.) and go to build path -> configure build path.

 

In the tab (sources?) you can add another folder and point it at /api/java and /api/resources.

 

IIRC

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I jknow that i can manually create other source places, and forge will not commpile code inside, but why forge api folder isn't included? no need or?

And also -  i think that in case of api (not whole mod like buildcraft, but just buildcraft-api), you should have api inside your jar, otherwise when you launch your mod and bc isn't present, it will carsh... How ever this what i think i should use because of need of being able to play with my mod without need of bc or te or ae being installed...

Posted
you should have api inside your jar, otherwise when you launch your mod and bc isn't present, it will carsh...

 

Only if you're stupid and do it wrong by not hiding the code inside its own class, which is only instantiated/referenced behind an

if(Loader.isModLoaded("buildcraft")

check.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

You mean

MyMachine extends TileEntity implements ISomeAPIInterface

?

 

Does the machine always exist, even if the external mod that supplies the interface isn't loaded?  Does the machine even work in that case?  by which I mean, if the API is included, but the mod it is for doesn't exist, can the machine be used meaningfully?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

You mean

MyMachine extends TileEntity implements ISomeAPIInterface

?

 

Does the machine always exist, even if the external mod that supplies the interface isn't loaded?  Does the machine even work in that case?  by which I mean, if the API is included, but the mod it is for doesn't exist, can the machine be used meaningfully?

Yes, it can be used meaningfully without bc. BC pipes & TE RF implementation is sort of additional feature...

Posted

Thanks for the feedback... the obfuscation / deobfuscation bit makes sense here after more research...

 

This is what src/api/java is for. It gets compiled with your mod but not put in the jar file.

 

Is there any general documentation about the Forge/Gradle environment that I have missed that would tell me things like this?  Or is this a standard convention in the Java world I just am not aware of? 

 

I have no idea where y'all learn these things... is it just from digging around in the source code for years?

Posted

You can make FML remove interfaces and methods from your classes conditionally using the annotations in the Optional class.

Hmm, but it has one modid only... What should i do then to make optional rf compatibility, because different mods like termal expansion, buildcraft, ender io... Can work together and by themselves, and they are all using rf...

Posted

CoFHCore, I believe, is also more than a library.  That is: it makes changes to Vanilla.

 

Say...by disabling wither skull drops.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

CoFHCore (the thing that does RF) is designed in such a way that you are supposed to ship it with your mod. It's a horrible design, but it's what we got.

But buildcraft doesn't require cofth to play, uses rf and... jar is ditributed with cofth api! Even bc api is distributed with it! (Download any buildcraft (obf/dev/api) and open jar. You will see cofth/api inside...)

Posted

buildcraft jar is ditributed with cofth api

 

Uh.

 

CoFHCore is designed in such a way that you are supposed to ship the api with your mod.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

diesieben said that CoHFCore is designed so that it's API shipped with any mod that uses it.

 

You said that if you "look at buildcraft, you'll find the CoHFCore API inside the buildcraft jar" which is quite literally what diesieben said.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.