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: 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.

Modded Tools - Implementing Other mods tools as compatible with TFC

2 posts in this topic

I began working on a modpack a few weeks ago using Flaxbeard's, HQM, and TFC to name a few of the mods.  After setting up Ore generation, making changes using minetweaker, and adding utility mods I decided to go through each mods items to verify recipies, identify crashes, and ensure all items function properly.  To my dismay Flaxbeards steam tools failed to function with TFC installed.  Since both TFC and Flaxbeards is under the same license and code is provided on GitHub I did some investigation.


To get a "Pickaxe" item to work the changes are pretty simple, implement the ICausesDamage interface and changed the material efficiency, and damage.  


To get a "Shovel" like item to work was a bit more of a challege, Shovels & Axes dont extend off of the MC classes of their related siblings, instead they use ItemTerraTool as their parents.  So changing that and implementing the super followed by copying and pasting the block list was required to implement another mods shovel.  


...Now for the "Axe"  I implemented the shovel changes using the axe expecting it to work the same way.  Rather than the axe being an axe its a generic item, the logs register the event for being harvested then check an internal list of axes.  If the axe is on the list then the wood is returned, else the wood is placed back in the spot you tried to harvest from (Punching wood).  To get an axe to work now the you must import the modded item into TFC and add it to the list Recipes.Axes during item setup.


I cant imagine why the shovel and the axe would be created this way when it would be easier to check in the axe is a member (instance of) an interface (IAxe for example) then allow the harvest.  Im still trying to figure out why tools are programmed the way they are rather than using easier more extensible approaches.


Share this post

Link to post
Share on other sites

The short answer is that the code for axes and shovels was written a long time ago, and has barely been updated other than minimum to port between MC versions. Adding compatibility for other mods is a very recent thing for TFC, and was not even remotely a priority in the past.


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