Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Crysyn

      Only help if you can be helpful

      Hey All, A topic has come up of late in the IRC channel in regards to the general feel of the forums and the community that supports them. Things have progressed further than I would have liked with out this being addressed more publicly because I would much rather have snubbed this out sooner rather than later.. but I have been busy. Here is the general rule I would like people to follow: Wheaton's Law "Don't be a dick." Those of you from the IRC channel know that this is the only rule I ask people in there to follow and we generally have a good and lively time chatting about all manner of things. This is basic rule that just about everyone understands and I am going to expand it to the forums from here moving forward. If you can not help people in a helpful and polite manner then I simply ask you to stop. Now I generally take a back seat to moderating the forums as I like to participate in the suggestions forum fairly heavily at times and would rather do so as a forums user than a moderator. But I am also fairly well known for being the person who constantly puts their foot down and so I am stepping up and doing so on here. If you find yourself unable to respond to a message politely then I ask that you do not respond. This mostly focuses on the increasing level of hostility found within the Suggestion forum as well as the Server forum. I do not care if this is the 30th some odd time you have seen someone make the same suggestion. Or even if the new post on an older topic is one entry above the old one. I expect the members of this forum to respond politely to the user, new or old, and point to the older topic if it applies and even go the extra step to suggest they either add in new information or to summarize the outcome of the previous discussion based upon the new post's entry into it. That is what we are here for, that is why I close most topics instead of deleting them, so that they can be found and referenced down the road. The next topic is the slew of derailment attempts I have seen as of late. If you want to have fun and joke around that is what the off topic forum is for and pretty much anything goes there. I do not expect to read a suggestion thread and have to go through 3 pages of image memes people have shot back and forth. Quite simply this is a waste of my time to read and then have to clean up. Now for the summary. I am going to start taking a more active role, especially in policing the suggestion forum, and handing out warn levels to people whom I see doing this. These will be indiscriminate and applied not to just the first person who derails or is impolite on a topic or response, but to everyone whom follows the lead of that person. As I do not like doing things with out giving you all warning this post shall serve as that warning. If you have a desire to bring this topic up with me then I invite you to do so on the IRC channel. Lets raise the level of quality and grow the community. Let us not descend into the quality often found on the minecraft or league of legend forums. There is simply no need for that here. Be passionate about things, just do not be abusive.
    • Kittychanley

      Offline Servers

      Recently I've seen a few server listings showing up on the first page of the Servers forum that have been closed for an extended period of time, but have recently gotten a reply from a new member who didn't realize the server is offline. To help prevent this from happening in the future, it would be greatly appreciated if you could use the report function on the original post of any servers that have been confirmed as offline, so that the topic may be locked. If you are the admin of a server and plan on taking the server offline, please use the report function on the original post of your topic to let the TFC Staff know that the topic should be locked. If you are the admin of a server that has a locked topic, and would wish to bring the server back online, please use the report function on the original post of the topic to let the TFC Staff know that the topic should be unlocked. As always, please remember to follow rule #3 of the servers forum and update your topic title to contain the version of TFC that the server is currently running. You can do so by editing the OP, and then clicking on "Use Full Editor."
Powerman913717

[Request] Addon Devlopment Guide

131 posts in this topic

I'm requesting guides on how to put together addon mods for TFC for a few reasons:

  • Currently there isn't one place to look and read about addon production and all the information is scattered in different threads.
  • Of the information found in threads there is so many different methods each with their own flaws or problems.

 

I have read most of the material on addons for TFC and I still have trouble with it, different methods for setting up the dev environment often result in different problems that I can never seem to find the answer to.

 

So what  I to know from coders who have made addons is the following:

  • How did you setup your dev environment
  • Where did you begin creating files (In a space created by the setup/did you create a space, if so how did you do that?)
  • Did you have to change your run config to be able to test your addon? (if so how did you set the run config)
  • Did you have to do anything else that I didn't ask for here to be able to create your addon?

Also I have practiced modding in other versions of the game, however I haven't created an addon before.

 

Thanks to anyone who helps me with this endeavor.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

To make an addon, you simply have to add the TFC deobf jar as a module dependency of your project. You get the deobf jar by downloading the zip and running gradlew.bat build from command line, and then grab it from *buildlibs. Adding modules and dependencies differs by development environment. You will also have to grab the src from the same place as the deobf and add it as a library depenancy if you want to view TFC source in an IDE.

0

Share this post


Link to post
Share on other sites

Its late for me here so I'm not going to set this up till the morning; however how do I go about setting the deobf as a module dependency (I'm using eclipse), and for library dependencies I know you put it in a .lib folder but do I need to do anything after that?

 

P.S. Thanks for replying

0

Share this post


Link to post
Share on other sites

I'm requesting guides on how to put together addon mods for TFC for a few reasons:

  • Currently there isn't one place to look and read about addon production and all the information is scattered in different threads.
  • Of the information found in threads there is so many different methods each with their own flaws or problems.

 

I have read most of the material on addons for TFC and I still have trouble with it, different methods for setting up the dev environment often result in different problems that I can never seem to find the answer to.

 

So what  I to know from coders who have made addons is the following:

  • How did you setup your dev environment
  • Where did you begin creating files (In a space created by the setup/did you create a space, if so how did you do that?)
  • Did you have to change your run config to be able to test your addon? (if so how did you set the run config)
  • Did you have to do anything else that I didn't ask for here to be able to create your addon?

Also I have practiced modding in other versions of the game, however I haven't created an addon before.

 

Thanks to anyone who helps me with this endeavor.

 

I would just like to say that it is quite a huge task getting the environment working when you are new to it all. I myself had a lot of problem and received no help at all when asked. The problems I had did not concern TFC but to the lwjgl library.

 

Anyway, I have created a document and a template project that you can use to start your development. I have constructed the document in order for me to setup new add-ons when needed. The template project is empty except some main java classes.

 

Document Link - here

Template Link - here

 

Let me know how you go with it.

4

Share this post


Link to post
Share on other sites

Bletch!

Thank you, I'll try it after work. I could make a test forge mod, but I couldn't link it with TFC yet. It was a long time ago when I used Java.

0

Share this post


Link to post
Share on other sites

Thank you so much, I've been trying to get this stuff working for weeks and haven't been able to. Now I might get something put together!

 

If I get an addon made I'll be sure to put you in the credits somewhere!  :D

0

Share this post


Link to post
Share on other sites

When I run the debug client config I get this message and it asks me to select a folder however when I select one it just asks the same question again and again. (Select an mcp config dir for the deobfuscator)

 

I've went back and double check everything and it appears to be setup the same as your guide says.

 

Edit: I was using the latest 79.20 that was on github being that it hasn't been released here yet, I'm retrying this with 79.19.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

I am looking for a Pinn this thread which has yet to be mentioned in the client / run / mods folder currently has purely NEI and code Chicken Core else can you get a crash .

0

Share this post


Link to post
Share on other sites

I got it working now, I had to start over from scratch and I did everything the same just I used 79.19 instead of 79.20. I don't know if that is what caused if there was an error somewhere else in setting it up.

0

Share this post


Link to post
Share on other sites

I got it working now, I had to start over from scratch and I did everything the same just I used 79.19 instead of 79.20. I don't know if that is what caused if there was an error somewhere else in setting it up.

Worked for me too.

0

Share this post


Link to post
Share on other sites

Ok new problem now...I have changed the name as suggested by the guide to match the name of my addon, however I get a crash when I run it now (TFC Addon Client). I think it has to do with the name change based on what the crash log says. But, I have no errors showing up and I don't know where the problem is.

 

Crash Report

---- Minecraft Crash Report ----

// On the bright side, I bought you a teddy bear!

 

Time: 6/24/15 3:20 PM

Description: There was a severe problem during mod loading that has caused the game to fail

 

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: tfctemplatemod.core.ModClientProxy

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:492)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

at net.minecraft.client.Minecraft.run(Minecraft.java:931)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

Caused by: java.lang.ClassNotFoundException: tfctemplatemod.core.ModClientProxy

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59)

... 35 more

Caused by: java.lang.NullPointerException

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

... 41 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_79, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 101705000 bytes (96 MB) / 341311488 bytes (325 MB) up to 928514048 bytes (885 MB)

JVM Flags: 0 total; 

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 9 mods loaded, 9 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed

Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed

NotEnoughItems{1.0.4.95} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.4.95-dev.jar) Unloaded->Constructed

tfc_coremod{0.79.19} [TFC[coremod]] (minecraft.jar) Unloaded->Constructed

CodeChickenCore{1.0.4.35} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed

terrafirmacraft{0.79.19} [TerraFirmaCraft] (bin) Unloaded->Constructed

Waila{1.5.11} [Waila] (Waila-1.5.11-RC2-NONEI_1.7.10.jar) Unloaded->Constructed

TFCM{0.1.1} [TerraMisc] (bin) Unloaded->Errored

0

Share this post


Link to post
Share on other sites

Did you rename the ModClientProxy in the template he gave you? If so, you have to make sure to update all references to use the new name. I don't use eclipse, but usually an IDE will have an option to rename the class and automatically update all references to it.

0

Share this post


Link to post
Share on other sites

I made it!!! :lol:

 

 Bletch 

 

 

 

I would just like to say that it is quite a huge task getting the environment working when you are new to it all. I myself had a lot of problem and received no help at all when asked. The problems I had did not concern TFC but to the lwjgl library.

 

Anyway, I have created a document and a template project that you can use to start your development. I have constructed the document in order for me to setup new add-ons when needed. The template project is empty except some main java classes.

 

Document Link - here

Template Link - here

 

Let me know how you go with it.

 

Thank you very much! And can you teach me how exactly did you create "template mod". Yoy know TFC will be updated from time to time. So we in deep need to keep our mods up to date against main TFC mod. TY once more. :rolleyes:

 

 

 

Ok new problem now...I have changed the name as suggested by the guide to match the name of my addon, however I get a crash when I run it now (TFC Addon Client). I think it has to do with the name change based on what the crash log says. But, I have no errors showing up and I don't know where the problem is.

 

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: tfctemplatemod.core.ModClientProxy

 

Good man. I had the same issue. I'm studying the java just about month. But even for me it's very clear where to look at. Just suggestion... But may be you should learn some more about java: packages, debuging, stacktrace? Belive me it's totaly worth it and it will take only couple of weeks. 

Edited by meltafire
0

Share this post


Link to post
Share on other sites

I had already looked into that file and hadn't seen any issues, I spent a semester doing java...but I have a bad habit of skimming through walls of text :P

0

Share this post


Link to post
Share on other sites

I had already looked into that file and hadn't seen any issues, I spent a semester doing java...but I have a bad habit of skimming through walls of text :P

Ok. Just by fat chance.

 

Recheck all params in class.

 

src.main.java.yourmodname.core.ModDetails.java

Edited by meltafire
0

Share this post


Link to post
Share on other sites

I understood that much, I just wanted to make sure no one thought I was an idiot...thanks for helping.

0

Share this post


Link to post
Share on other sites

Sorry guys, just logged on. Have you solved ALL the problems or are you still having trouble?

 

1. 79.20 should have worked, you should be able to download the current code zip and follow the document. I never do this as the dev build is currently changing and hard to keep applying the new changes. I just wait until they do their releases now.

2. I left something important out of the document - Building your add-on. I will add that section and re-upload the document.

3. ModCommonProxy & ModClientProxy are referenced as STRINGS in the main java class. This will NOT cause compile errors but will cause runtime errors. I might add a point to the rename section to get those.

 

Can you make any suggestions for the document?

1

Share this post


Link to post
Share on other sites

I have updated the document to include the proxy issue and have included a section on how to build both TFC and your add-on.

1

Share this post


Link to post
Share on other sites

I have everything working now, thanks for all of your help Bletch! :D

 

Now I just need to go through and figure out the TFC side of things and where the coding differs from base minecraft code...shouldn't be too hard just need to take the time to read through the api files and such.

0

Share this post


Link to post
Share on other sites

 

Thank you very much! And can you teach me how exactly did you create "template mod". 

 

 

I created the template mod after my first add-on. As I mention in the document, it may not be the best way, but it works for me. I have spent quite a lot of time developing my first mod and am about to start another and needed a template to create the new one from. Setting up the main classes was painful the first time, so I just stripped down a copy of my current mod.

 

 

 

Yoy know TFC will be updated from time to time. So we in deep need to keep our mods up to date against main TFC mod. TY once more.  :rolleyes:

 

 

As new versions of TFC are released, just follow the TFC setup in the document to add them to your workspace. Currently in my workspace I have TFC 79.15, 79.17, 79.18 and 79.19.

 

Using the project reference (Configure Add-on Build Settings, page 22 and on) you can change the version of TFC you debug against. Which is great for testing against older versions of TFC.

 

NOTE: If you do this though, always remember to update the DEBOF file in the libs folder of your add-on when building against a different version.

 

I have everything working now, thanks for all of your help Bletch!  :D

 

Now I just need to go through and figure out the TFC side of things and where the coding differs from base minecraft code...shouldn't be too hard just need to take the time to read through the api files and such.

 

Now the hard work starts. The best place to learn is trolling through the TFC code. Find something similar to what you want to build in TFC and study it.

 

Good luck!

Edited by Bletch
1

Share this post


Link to post
Share on other sites

Just a heads up, it looks as though 79.20 is ready to be released. This change also has a forge upgrade. I do not cover this in the document.

Note: After this is done, you may not be able to build this against 79.19.

 

1. Open the build.props file of your add-on.

2. change the following line - 

-forge_version=10.13.2.1291   +forge_version=10.13.4.1448-1.7.10

3. Double-click the setup.bat file. This will start gradle and download the new forge libraries.

 

Note: only do this when 79.20 has been released, you have downloaded the release zip file and setup 79.20 in your workspace using the document.

 

Let me know if you need any help.

0

Share this post


Link to post
Share on other sites

I followed the method in the doc for adding TFC projects in, and added 79.20.

I then changed my debug/run configs to use 79.20, and it runs correctly.

After all of that I changed the build path on my addon to use 79.20 instead of 79.19

Finally I made the change to the forge version and the TFC version in the build.props file.

 

My problem is when I run setup.bat to add in the new forge libraries, but it fails. The error comes up on line 21 of build.gradle and I looked there and didn't see anything that looked like it needed to be changed.

 

Note: I didn't change the DEBOF file in .libs because there is no DEBOF file in my .libs or any other files at all.

0

Share this post


Link to post
Share on other sites

would it be possible to post a screenshot of the dos window when you run setup.bat? I would like to see the error.

 

A question for you, in my previous email on how to update I included this line, -forge_version=10.13.2.1291  +forge_version=10.13.4.1448-1.7.10 did you just update the forge version or copy the whole line? If you copied the whole line, check if it has the + symbol at the start. If so, remove it.

Edited by Bletch
0

Share this post


Link to post
Share on other sites

I just edited the line to use the numbers in green instead of the numbers in red.

 

 

Error:

 

FAILURE: Build failed with an exception.

 

* Where:

Build file 'E:TerraMiscTFCTemplateModbuild.gradle' line: 21

 

* What went wrong:

A problem occurred evaluating root project 'TFCTemplateMod'.

> E:TerraMiscTFCTemplateModbuild.prop (The system cannot find the file specif

ied)

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug

option to get more log output.

 

BUILD FAILED

 

Total time: 15.64 secs

Press any key to continue . . .

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now