Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[SOLVED] Issue building jar with Forge 10.12.0.996


mercrutio
 Share

Recommended Posts

Hi, I'm having an issue building my code with the latest forge release.  I've been stalking these forums for quite a while and solved my problems on my own (usually reading posts here) in the past , so I've gone over everything I can find.

 

I'm working on OSX, and encountered the lwjgl issue on OSX that's been mentioned.  My solution has been to delete the three occurrences of '-nightly-20131710' (or whatever that date is) from the dev.json file every time I go to use gradlew.  I have successfully run gradlew setupDecompWorkspace and gradlew eclipse, and then pointed my Eclipse workspace at forgedir/eclipse.

 

I have been experimenting with the changes in 1.7, as much as possible, and have written some very basic code creating a new block and item, and texturing them.  This code works within the Eclipse environment.

 

I have also been running a Forge 10.12.0.995 server successfully, without any installed mods.  I have not tested the server with 996, but the client works with 996 (without mods).

 

To try the mod code out, I first ran (after editing the dev.json file) gradlew build.  It produced an output to build/lib/MYMOD.jar, which was not recognized in my mods folder.  I get the error "[Client thread/WARN]: Zip file MYMOD.jar failed to read properly, it will be ignored" as seen in http://www.minecraftforge.net/forum/index.php/topic,15185.msg77325.html#msg77325.  There we are linked to the [Tutorial] Compiling Mod post by PlatonCraft, which says to optionally edit the build.gradle file first.

 

I did so, to no avail.  I also was concerned that it may have been related to the lwjgl issue, and edited my .json file in the client appropriately.  I have googled and searched this forum to the best of my ability.  Here is my game log: https://gist.github.com/mercrutio/8308455

 

What have I missed?

Link to comment
Share on other sites

You need to use gradle to compile it.

 

Open your build.gradle (with NotePad, NotePad++, etc.) and change these:

 

version="1.0" //ex: 2.6, 1.3
group="com.yourname.modid"  //ex: (your package) com.example.example
archivesBaseName="modid" //ex: ExampleMod

 

After that... save it and quit out of build.gradle.

You now need to compile it.

 

Use (cmd for Windows) (terminal -- I believe -- for Mac OSX)

gradlew.bat build

 

Be sure your extension goes to where you gradlew.bat is (aka your Forge folder or MCP)

Link to comment
Share on other sites

coolboy4531,

 

I appreciate the suggestion, but,

To try the mod code out, I first ran (after editing the dev.json file) gradlew build.  It produced an output to build/lib/MYMOD.jar, which was not recognized in my mods folder.  I get the error "[Client thread/WARN]: Zip file MYMOD.jar failed to read properly, it will be ignored" as seen in http://www.minecraftforge.net/forum/index.php/topic,15185.msg77325.html#msg77325.  There we are linked to the [Tutorial] Compiling Mod post by PlatonCraft, which says to optionally edit the build.gradle file first.

 

I did so, to no avail.

 

FYI, it is normally called Terminal in OSX, but I have ported xterm from the GNU/Linux in, as my normal environment is Gentoo.  It has better support for, amongst other things, terminal-based text editors such as nano (yes, I am not a fan of vi/vim).  Moreover, .bat files will not function in a *NIX environment, which is why the bash file gradlew is included.

 

I haven't actually owned or used a Microsoft product on any personal device in over a decade, but I do recall, with vague horror, the experience of editing .bat files; my heart goes out to you.

Link to comment
Share on other sites

well, as far as the dev.json issue goes, copy the lwjgl versions from your working (I hope) client's version.json; as far as building goes, gradlew build should do it all for you, unless you made some derpy changes to build.gradle on that front, as such, could you post your build.gradle?

CreepyPastaCraft git | SCPCraft git

Keep an eye on them, see that I'm still working on it :P

Link to comment
Share on other sites

Hey, I figured it out.  The solution is simple, but surprising.

 

In order to properly register a mod, you have to have the @Mod annotation, as such:

@Mod(modid = MODID, name = NAME, version = VERSION)
public class Lorecraft {

public final static String MODID = "*********";
public final static String NAME = "*********";
public final static String VERSION = "*****";

 

Now, I'm used to storing important values, such as MODID, NAME, and VERSION, in a separate file and importing them.  Apparently, if you do so, Forge 10.12 won't recognize your mod and reject it.  Just a heads up, keep these values here.  (I'm not sure if NAME needs to be here, but it's probably best to keep them together.)

 

At any rate, can anyone confirm this?

Link to comment
Share on other sites

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.