Jump to content

Recommended Posts

Posted

I want to create a mod addon and understand I need to have the parent mod installed into my current environment but I can't seem to figure out how to do it. The tutorial I found refers to MCP and its directories which I don't have. It says I need to decompile the mod and then place it into forge/mcp/jars/mods/ which is nowhere in my setup. Can someone steer me in the right direction as I am lost.

Posted

Ya, I was using tutorials from 1.6 and had the same problem. But for 1.7 forge uses gradle to install and I don't think there is an MCP path anymore.

 

Are you using eclipse? If so open your modding project up, there should an "eclipse" folder. Open that and you will see a "mods" folder. Correct me if I'm wrong but I think that's how you do it. Hope this helps. :)

 

Edit: Upon doing more research, I've found a tutorial that should help a bit with the coding aspect of making an addon. It is very short but it might have some useful info in it:

http://www.minecraftforge.net/wiki/Developing_Addons_for_Existing_Mods

Posted

Well I put it in the mods folder but it crashes when it starts up saying:

 

java.lang.NoSuchMethodError: com.blocklings.items.ItemTab.func_77655_b(Ljava/lang/String;)Lnet/minecraft/item/Item;
at com.blocklings.items.ItemTab.<init>(ItemTab.java:12)
at com.blocklings.main.Blocklings.<clinit>(Blocklings.java:44)

 

No clue what would cause this as that item doesn't even exist.

Posted

If you install a mod in your mods folder you also need to install Code Chicken Core because that allows compiled mods to run in the workspace. This will allow you to use the mod in game but it will not allow you to use it in the dev enviernment. For that you simply need to create a new folder in your main directory called libs and put the mod in that.

I am the author of Draconic Evolution

Posted

On the page where you download the mod instead of downloading the normal version you need to download the one labeled either "dev" or "deobf".

 

e.g. for any of Chicken Bones' mods you would go here and you would click on the "dev" link to download a version of the mod that would work in a development environment.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted

The version of Minecraft that you play is obfuscated. This means that instead of things like methods and fields having normal names, they have obfuscated names like: field_149806_a. MPC then deobfuscates the code turning the super cryptic code into nice, human-readable code using mappings. Forge then applies those mappings in the dev environment so you don't have to look at ugly code. Then when you use gradlew build to build your mod ForgeGradle reobfuscates any deobfuscated methods that you used in your mod and packages it up into a JAR file. So if you have a mod that uses an obfuscated field, like field_149806_a, and you try to access it in a deobfuscated environment, it won't exist. You need a deobfuscated version of a mod to run in a deobfuscated environment.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted

Thanks for the explanation, I do appreciate it. So the problem I was having before was because the method was obfusacted? (func_77655_b) If so then how can I create a deobfuscated version myself, like the dev versions of other mods as the mod I want to use doesn't have a dev version? Is it even possible? Thanks in advance :)

Posted

To your build.gradle fiile in the repositories block you need to add something like this:

flatDir {
dirs 'libs'
}

And then to the dependencies blokc:

compile name: 'lwjgl'

This will allow Gradle to access your file when compiling your mod.

 

To access the classes in the JAR from your code you need to add the JAR file as a dependency in your IDE.

How to do this for eclipse and for IDEA.

 

To your @Mod annotation you will also need to add the parameter dependencies which is a string and should look something like this:

required-after:Forge@[10.13.2.1235,);required-after:shadowcore;"

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted

Okay, I have everything done and I understand what I am doing now, but there is just one problem left. Whenever I add my mod to my dev environment I get the error on launching that says I have mod sources that are duplicate within my system, however, I am using a fresh environment with only the example mod.

Posted

Created a completely new folder and setup everything from scratch without the flarDir block and still get them same problem. I have tried reinstalling Eclipse too but it is literally when I add the mod.jar in the libraries bit, I get the error, but I have to do this to access the mod.

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.