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

    • Dries007

      Server Move   09/13/18

      I (Dries007) have recently taken over as main developer and server admin. This involved moving servers to reduce cost. It's likely there will be some more downtime in the future but most  things should be sorted by now. This forum is in dire need of replacement as the software is quite old and can't be easily updated. If you wish to discuss or stay updated, join our discord: https://invite.gg/terrafirmacraft. The forum will remain available to read, but will be locked in the future, when a new system is setup. The forum and wiki are now ad free. If you'd like to contribute to keeping it that way, you can do so via paypal or patreon.
Powerman913717

[Request] Addon Devlopment Guide

135 posts in this topic

1 minute ago, Powerman913717 said:

It has come to my attention that some other addons may be having the time reversion bug that my addon experienced a while ago, this is caused by an issue in the addon template created by Bletch.

 

To correct the issue go to your mod file, which the file named after your addon. Scroll down to line 49 which reads as "proxy.registerTickHandler();". Open up that method.

The code inside that method will read as "FMLCommonHandler.instance().bus().register(new ServerTickHandler());", due to the file for the template being named the same thing eclipse can become confused and register TFC's handler again which is what causes the bug.

To correct this simply name your handler something slightly different, and change the line to have your handler. Ex. "FMLCommonHandler.instance().bus().register(new YourServerTickHandler());"

I hope this is helpful, took me a while to track down the issue of this bug. :)

 

You can Control Click (at least in intellij, but I think its the same for eclipse) the name of the class (then part after the 'new') to open the file it thinks you mean. If it opens the wrong file, look at the top of your file in the list of 'import' lines. Look for the line 'import com.bioxx.tfc.Handlers.ServerTickHandler' and remove it. Intellij (or eclipse) will now tell you your code it wrong, but should suggest a couple of classes to import for you, make sure you pick the right one.

If you ever need to use 2 classes with the same name in one file, remember that you can always specify the full name as its called 'com.bioxx.tfc.Handlers.ServerTickHandler' and use that just like you'd have used 'ServerTickHandler'.

Have fun Java-ing!

3

Share this post


Link to post
Share on other sites

"select an mcp conf dir for the deobfuscator." keeps popping up and no matter what folder i open they are all empty (as in it doesn't show any contents, even if there is any) then it says that it needs me to attach a source "CodeChickenCore-1.7.10-1.0.4.35-dev.jar".  (im running eclipse btw)

admittedly i only have a basic understanding of java, so i dont know exactly what this means, or more specifically what source i have to attach. (i already thought it was asking for me to tell it where the jar itself is, but when i specified the exact folder where the jar was located in, it still wouldnt work) 

This is my first attempt at making an addon, though i did make a few simple regular mods before. any help would be appreciated, thanks for taking the time to read this.

 

TL;DR - i could use a little help with my dev setup and the guide Bletch made doesnt say how to fix this.

0

Share this post


Link to post
Share on other sites
9 minutes ago, Mathias Ademar said:

"select an mcp conf dir for the deobfuscator." keeps popping up and no matter what folder i open they are all empty (as in it doesn't show any contents, even if there is any) then it says that it needs me to attach a source "CodeChickenCore-1.7.10-1.0.4.35-dev.jar".  (im running eclipse btw)

admittedly i only have a basic understanding of java, so i dont know exactly what this means, or more specifically what source i have to attach. (i already thought it was asking for me to tell it where the jar itself is, but when i specified the exact folder where the jar was located in, it still wouldnt work) 

This is my first attempt at making an addon, though i did make a few simple regular mods before. any help would be appreciated, thanks for taking the time to read this.

 

TL;DR - i could use a little help with my dev setup and the guide Bletch made doesnt say how to fix this.

You need to find your .gradle file on your computer. For me, it is in C:/Users/[UserName]/.gradle. Once you have that, you need to select the file containing the mcp conf dir for the version of forge you are using: C:/Users/[UserName]/.gradle/caches/minecraft/net/minecraftforge/forge/[forge version used]/unpacked/conf. You need to have that version of forge installed to use it.

Make sure you have run "gradlew setupdecompworkspace eclipse". The project should include the "CodeChickenCore-1.7.10-1.0.4.35-dev.jar". Check and make sure the "CodeChickenCore-1.7.10-1.0.4.35-dev.jar" is in the project explorer. If not, you might need to add the jar in the "build path" for the project. Right click the project and select "Build path" then "Configure build path", then use "Add external jars" button under the "Libraries" Tab and find a copy of the CodeChickenCore-1.7.10-1.0.4.35-dev.jar.

2

Share this post


Link to post
Share on other sites

thanks. ill try that and hope i dont mess up somewhere else. XD

0

Share this post


Link to post
Share on other sites
28 minutes ago, StrayWolfe said:

You need to find your .gradle file on your computer. For me, it is in C:/Users/[UserName]/.gradle. Once you have that, you need to select the file containing the mcp conf dir for the version of forge you are using: C:/Users/[UserName]/.gradle/caches/minecraft/net/minecraftforge/forge/[forge version used]/unpacked/conf. You need to have that version of forge installed to use it.

looks like this was what i messed up on, works perfectly now. ^_^ again, thatnks man. ^_^

0

Share this post


Link to post
Share on other sites
On 8/13/2016 at 8:25 PM, Mathias Ademar said:

looks like this was what i messed up on, works perfectly now. ^_^ again, thatnks man. ^_^

I had some problems with "Select MCP Conf Dir" as well, since I'm on a mac and the .gradle folder is hidden. I unhid it but it still doesn't show up in the file chooser.

My solution was to go to the .gradle folder in file browser, find the conf folder, and copy it to my desktop, then point the file chooser at that, which seemed to work.

0

Share this post


Link to post
Share on other sites
On 24.06.2015 at 7:22 AM, Bletch said:

...

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

Thanks for the comprehensive manual (it is not available online, but I downloaded it previously).

Unfortunately, I can not figure, which command should be used to replace DOS gradle.bat files in Linux environment?

Edit: there is gradlew script for Unix, I didn't spotted it earlier because it has no executable flag.

I executed ./gradlew setupDecompWorkspace and ./gradlew eclipse - succesfull, no errors, but eclipse get stalled when I tried to import project. I'm using mars eclipse, is it a cause?  Edit: there was gnome bug, forcing GTK in eclipse.ini solved problem.

Currently I encountered another bug:

 

Edited by ciekma
0

Share this post


Link to post
Share on other sites

I stucked on the next step:  when trying to compile and run, eclipse ask to define config folder for deobfuscator, after that quits showing many errors concerned with codechicken lib. Is NEI source/libs required to compile TFC?

EDIT: I had used the latest version 29, which caused many problems, version 19 works fine.

Edited by ciekma
solved
0

Share this post


Link to post
Share on other sites

How to add heat conversion recipe? I can't find any example :(

Edit: I found it: HeatRegistry and HeatIndex

 

Edited by ciekma
solved
0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now