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

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Necoxus

[Request] Addon Devlopment Guide

136 posts in this topic

Quick question how does TFC handle doing the extra damage/durability for tools and weapons based on smithing skills?

0

Share this post


Link to post
Share on other sites

It's an NBT tag that is saved on the tool head on creation, and then we've got a crafting handler that reads that NBT tag.

 

https://github.com/Deadrik/TFCraft/blob/master/src/Common/com/bioxx/tfc/Handlers/CraftingHandler.java#L216

 

The PreCraft method in that class does the same thing, but for if the player shift-clicks the tool out of the output slot.

 

https://github.com/Deadrik/TFCraft/blob/master/src/API/com/bioxx/tfc/api/Crafting/AnvilManager.java#L139

 

Those getBuff methods are then called in the individual item classes. Here's just one example:

 

https://github.com/Deadrik/TFCraft/blob/master/src/Common/com/bioxx/tfc/Items/ItemTFCArmor.java#L180

0

Share this post


Link to post
Share on other sites

a quick heads up if you're going to be adding axes:

 

extending ItemCustomAxe isn't enough, there is an array of axes types in the Recipes class that trees check to make sure you're using an axe.

0

Share this post


Link to post
Share on other sites

No not axes its for my custom weapons and they currently work fine just I want to give them a little bit more so they are closer to real TFC tools/weapons.

 

P.S. Thanks Kitty

0

Share this post


Link to post
Share on other sites

Anyone know where the minecraft bow renderer is at? Or the TFC one either way I need to take a look at how bows are rendered and I can't find any sort of good info online.

0

Share this post


Link to post
Share on other sites

net.minecraft.client.renderer.ItemRenderer line 459

0

Share this post


Link to post
Share on other sites

Ok, so I'm working on a new building block and due to how TFC has so many stone types I'm attempting to use metadata to create multiple blocks from one. Anyway how do the bricks in TFC do this, I want to go about this as closely as I can to how TFC does it.

0

Share this post


Link to post
Share on other sites

Thanks Kitty, I think I have it mostly working now. :D

0

Share this post


Link to post
Share on other sites

Ok so I have all the important things working, however I'm having trouble with the lang file names.

 

Block Registering

public static Block blockRoadIgEx;

public static Block blockRoadIgIn;

public static Block blockRoadMM;

public static Block blockRoadSed;

 

        blockRoadIgEx = new BlockRoadIgEx().setHardness(16F).setBlockName("blockRoadIgEx");

GameRegistry.registerBlock(blockRoadIgEx, ItemStone.class, "blockRoadIgEx");

blockRoadIgIn = new BlockRoadIgIn().setHardness(16F).setBlockName("blockRoadIgIn");

GameRegistry.registerBlock(blockRoadIgIn, ItemStone.class, "blockRoadIgIn");

blockRoadMM = new BlockRoadMM().setHardness(15F).setBlockName("blockRoadMM");

GameRegistry.registerBlock(blockRoadMM, ItemStone.class, "blockRoadMM");

blockRoadSed = new BlockRoadSed().setHardness(14F).setBlockName("blockRoadSed");

GameRegistry.registerBlock(blockRoadSed, ItemStone.class, "blockRoadSed");

 

Lang File

tile.blockRoadIgEx.Andesite.name=Andesite Road

tile.blockRoadIgEx.Basalt.name=Basalt Road

tile.blockRoadSed.Chalk.name=Chalk Road

tile.blockRoadSed.Chert.name=Chert Road

tile.blockRoadSed.Claystone.name=Claystone Road

tile.blockRoadSed.Conglomerate.name=Conglomerate Road

tile.blockRoadIgEx.Dacite.name=Dacite Road

tile.blockRoadIgIn.Diorite.name=Diorite Road

tile.blockRoadSed.Dolomite.name=Dolomite Road

tile.blockRoadIgIn.Gabbro.name=Gabbro Road

tile.blockRoadMM.Gneiss.name=Gneiss Road

tile.blockRoadIgIn.Granite.name=Granite Road

tile.blockRoadSed.Limestone.name=Limestone Road

tile.blockRoadMM.Marble.name=Marble Road

tile.blockRoadMM.Phyllite.name=Phyllite Road

tile.blockRoadMM.Quartzite.name=Quartzite Road

tile.blockRoadIgEx.Rhyolite.name=Rhyolite Road

tile.blockRoadSed.Rock Salt.name=Rock Salt Road

tile.blockRoadMM.Schist.name=Schist Road

tile.blockRoadSed.Shale.name=Shale Road

tile.blockRoadMM.Slate.name=Slate Road

0

Share this post


Link to post
Share on other sites

Thanks kitty, everything is working fine now. :D

0

Share this post


Link to post
Share on other sites

Where does TFC do its armor rendering at?(The model that appears on the player) I know it has something to do with the TFC proxy but I'm having trouble finding any additional information.

0

Share this post


Link to post
Share on other sites

It's just the vanilla render code. TFC armor directly extends the vanilla armor class.

0

Share this post


Link to post
Share on other sites

I want to prevent TFC from generating mushrooms and want it to generate my custom mushrooms instead. How would I implement that (So far I've only had success adding stuff, not removing/replacing).

0

Share this post


Link to post
Share on other sites

I'm trying to implement some TFC style versions of stained clay and would like to not have to copy and paste minecraft resources into my mod for textures...is there a way to call up minecraft's resources when applying a texture to a block?

 

Edit: Nvm I got it figured out.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

Hey currently I'm trying to remove some recipes like the clock/compass recipes because my addon adds better recipes and I know its possible to remove recipes and I kinda see where TFC does it for some things but could someone provide a more in depth explanation of this?

 

Edit: Also I'm trying to add recipes using the forge/campfire kinda like the sand to glass recipes but I can't find where those recipes are registered as they aren't in the main recipes class.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

Hey Kitty so that script kinda helps but not really, could you put me in the direction of how heat recipes work in TFC? Also any sort of help with the removing recipes would be great, thanks. :D 

0

Share this post


Link to post
Share on other sites

Ok so I got the heat recipe part setup with no errors, so now the problem is the block can't be placed in the forge, and I have no heat indicator thing on the block item. I've looked into how ingots are handled and I don't think iSmeltable is the way to go, and I can't find anything with the sand block that would explain how it can be put in the forge and how it gets a heat indicator when it has heat.

0

Share this post


Link to post
Share on other sites

Look how tfc does sand to glass etc. There is asking for clarification is one thing. Expecting others to do your the leg work for you.

0

Share this post


Link to post
Share on other sites

Look how tfc does sand to glass etc. There is asking for clarification is one thing. Expecting others to do your the leg work for you.

 

What do you think I've been doing? Just having a magical fun tea party with the code? I am asking for clarification, TFC's code does not contain many notes and the notes it does have make zero sense most of the time. 

 

Most of the code contained within the sand class is for the sand to fall and move around, as well as updating itself. In my theory the code that handles this is on the block item which is what the player holds in their inventory. however sand doesn't have its own unique block item, therefore I'm trying to find location of the code that handles this.

0

Share this post


Link to post
Share on other sites