Posted February 6, 201510 yr 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.
February 6, 201510 yr 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
February 6, 201510 yr Author I will try that then, thanks. Not sure then if I need to do the decompile thing then... we shall see.
February 6, 201510 yr Author 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.
February 6, 201510 yr 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
February 6, 201510 yr Author So you mean make a libs folder alongside all the other folders like eclipse, gradle and src etc, or somewhere else? Thanks for the help though.
February 7, 201510 yr So you mean make a libs folder alongside all the other folders like eclipse, gradle and src etc, or somewhere else? Thanks for the help though. Correct. I am the author of Draconic Evolution
February 7, 201510 yr Author Still getting the exact same crash on launch... anything else I can try?
February 7, 201510 yr You need to use the "dev" or "deobf" version of the mod for it to work in a deobfuscated environment like the development env. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 7, 201510 yr Author Okay, how can I get one of these forms then if I had permission to use the original mod? Sorry if I am not making any sense just never done anything like this before.
February 7, 201510 yr 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
February 7, 201510 yr Author Ahhh right thanks What is the difference between the dev and the regular versions, I am now curious??
February 7, 201510 yr 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
February 7, 201510 yr Author 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
February 7, 201510 yr https://github.com/diesieben07/SevenCommons/blob/master/build.gradle#L49-L52 Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 8, 201510 yr Author I got it working thanks, but now I am just wondering how to access any of the classes inside the parent mod as it just appears as a .jar file.
February 9, 201510 yr 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
February 10, 201510 yr Author That seemed to just make it crash when trying to build. Should I not be copying that exactly.
February 10, 201510 yr No, replace "lwjgl" with the name of the jar file you are trying to use (without the .jar extension) Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 15, 201510 yr Author 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.
February 15, 201510 yr Ummm.. Remove the flatDir block from the dependencies section. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 15, 201510 yr Author That didn't do anything, I really don't know what is going on, it was all working yesterday.
February 15, 201510 yr Make sure that the flatDir block has been removed, run gradlew setupDecompWorkspace eclipse/idea. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 17, 201510 yr Author 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.