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

[TUTORIAL] Getting Started with ForgeGradle


GrygrFlzr
 Share

Recommended Posts

  • 1 month later...

Hey guys, I've been having some problems trying to compile my mod. My mod is for version 1.7.10, and i tried compiling it using both "bash gradlew build" and "./gradlew build" (I use a mac). Both attempts failed due to this error:

 

* Where:

Build file '/Users/MinecraftModding/Desktop/SlayersToolbox/build.gradle' line: 21

 

* What went wrong:

Could not compile build file '/Users/MinecraftModding/Desktop/SlayersToolbox/build.gradle'.

> startup failed:

  build file '/Users/MinecraftModding/Desktop/SlayersToolbox/build.gradle': 21: expecting anything but ''\n''; got it anyway @ line 21, column 26.

    group= "com.slayer.main”

                              ^

 

  1 error

 

Link to comment
Share on other sites

Ok, so I managed to fix the error, and my mod properly compiled. However, when I tried to run the mod on my minecraft forge profile, it didn't appear. Forge acted as if the mod didn't exist. I'm not sure why this happened, so I guessed that it was a problem with the forge version. I changed it in the build file, but still got the same result ._.

Link to comment
Share on other sites

My source code is in the src/main/java/com/slayer, as I believe it should be. However, when I open the jar file with JD-Gui, the only thing that shows up is a MANIFEST.MF inside a META-INF folder. The manifest file only has this line of text:

 

Manifest-Version: 1.0

 

I'm really not sure what's going on here. I made sure that all of the syntax errors in the build file were fixed, and my java files are in the right place. It seems that I'm doing everything correctly, so why wouldn't the mod compile properly?

 

 

Link to comment
Share on other sites

  • 4 months later...

If you mean "java archive", which literally means ".jar file", then I do not know where your problem is. Your screenshot is full of them.

If you mean ".java file" (which is not an archive, it's just a text file), then I also do not see your problem. You can either navigate through the jar files I already mentioned above and see what they contain or you can use eclipse's "go to type" feature where it will open any class you tell it to (press Ctrl-Shift-T).

Link to comment
Share on other sites

inside the .jar archive there's not .java file to edit...

 

How can i edit the entities?

i cant edit files .class

Yes, of course you cannot edit them. They are part of libraries that Minecraft uses resp. part of Minecraft itself. You cannot just edit other people's code.
Link to comment
Share on other sites

And what i do to edit (create) mods?

You create a mod by writing code in src/main/java. If you want to alter the behavior of existing things, you can use a variety of techniques, e.g. events, reflection, etc. It depends on the use-case.

like put the arrow entity to explode with the primedTnt method?

You could do that by replacing arrows with your own arrow entity using EntityJoinWorldEvent.
Link to comment
Share on other sites

  • 1 month later...

inside the .jar archive there's not .java file to edit...

 

How can i edit the entities?

i cant edit files .class

Yes, of course you cannot edit them. They are part of libraries that Minecraft uses resp. part of Minecraft itself. You cannot just edit other people's code.

 

And why i saw people editing it?

in tutorials all this .class is .jar, and they edit by it.

 

i still don't understanding.

 

 

diesieben07, i cant understand it too, i dont know what is  EntityJoinWorldEvent.

as i said, i'm beginner.

 

Link to comment
Share on other sites

And why i saw people editing it?

in tutorials all this .class is .jar, and they edit by it.

 

i still don't understanding.

Then you probably saw old tutorials.

Editing the jar files has been highly discouraged since forever and basically not possible since 1.6.4 (even before then you had to jump through some hoops to make it work).

diesieben07, i cant understand it too, i dont know what is  EntityJoinWorldEvent.

as i said, i'm beginner.

EntityJoinWorldEvent is fired when an Entity joins the world. Look up a recent tutorial on forge events to understand the concept behind events.
Link to comment
Share on other sites

  • 1 month later...

Hello. I am getting the error "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path". You have an entry in your troubleshooting section for that, however I couldn't find a folder 'natives' within a folder 'build' anywhere on my harddisk. I followed your tutorial to the letter. Could you shed some light on this problem?

Link to comment
Share on other sites

  • 1 month later...

Just wanted to chime in here and say that if anyone is receiving a stackoverflow exception during the :recompileMc task - update your JDK. This had me confused for about an hour this morning. - I updated to jdk 7u80 and everything went off without a hitch.

 

[Original Error] http://pastebin.com/BDhapB5Q

As it was generated from "gradle setupDecompWorkspace eclipse"

Link to comment
Share on other sites

  • 5 months later...
Guest
This topic is now closed to further replies.
 Share




×
×
  • Create New...

Important Information

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