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

Is you add-on in the sub-folder TFCTemplateMod?

0

Share this post


Link to post
Share on other sites

yes, I never bothered to change the name of the base folder when I changed all the names elsewhere.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

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

 

 

Can you clarify, the name of the file in your add-on folder is build.prop not build.props?

 

Are you running the setup.bat file within Windows Explorer or Eclipse?

0

Share this post


Link to post
Share on other sites

that seems to have fixed it....I added an "s" to the end of the file name...derp.. -_-

0

Share this post


Link to post
Share on other sites

glad that was all it was, I was stumped otherwise!

 

So everything is good now?

0

Share this post


Link to post
Share on other sites

If anyone want to create new mod on new TFC 79.20 following Bletch instructions. Please do read this. May be it'll save you time.

 

You downloaded 79.20 zip. Do all preps as instruction says. On run debug Eclipse will throw you a windows "Select an mcp config dir for the deobfuscator".

Solution:

Go to your project folder "runClientconfig" i.e.:

C:TFCModdingTFCraft-0.79.20runClientconfig

 

There will be empty file named.

 

CodeChickenLib.cfg

 

I don't know why exactly it's empty.

 

Fill it with this. Don't forget to change disk name and user if required. Then save it and debug TFC project again.

 

#CodeChickenLib development configuration file.

 
dump_asm=true
 
#Path to directory holding packaged.srg, fields.csv and methods.csv for mcp remapping
mappingDir=C:Users<userName>.gradlecachesminecraftnetminecraftforgeforge1.7.10-10.13.4.1448-1.7.10unpackedconf
 
textify=true
Edited by meltafire
1

Share this post


Link to post
Share on other sites

I've gotten to the point where I started trying to add anvil plans and recipes, I'm having a bit of trouble...I think the code itself is right but it isn't being read correctly or something. Does anyone have some example/open source code I could take a look at?

0

Share this post


Link to post
Share on other sites

Thanks for the help Emris that makes a lot more sense than how I was trying to do it. :P

0

Share this post


Link to post
Share on other sites

I'm still having trouble with this and I can't find the error.

 

initialiseAnvil is ran by my mod class during FMLInitializationEvent

public static void initialiseAnvil()

{

// check if the plans/recipes have already been initialized.

if (ModRecipes.areAnvilRecipesInitialised()) return;

 

System.out.println("[" + ModDetails.ModName + "] Registering Anvil Recipes");

 

registerAnvil();

 

System.out.println("[" + ModDetails.ModName + "] Done Registering Anvil Recipes");

}

 

initialiseAnvil calls up registerAnvil.

private static void registerAnvil()

{

AnvilManager anvil = AnvilManager.getInstance();

 

//Plans

anvil.addPlan("Casing", new PlanRecipe(new RuleEnum[] {RuleEnum.HITLAST, RuleEnum.BENDSECONDFROMLAST, RuleEnum.HITTHIRDFROMLAST}));

 

//Recipes

anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.WroughtIronIngot), null, "Casing", AnvilReq.WROUGHTIRON, new ItemStack(ModItems.itemCompassCasing, 1)));

anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.RoseGoldIngot), null, "Casing", AnvilReq.COPPER, new ItemStack(ModItems.itemClockCasing, 1)));

}

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

The initialAnvil should not be called during the initialise but when you log into a world. The template code I provided already has this in place.

Also how do you know it is not working? What is going wrong?

0

Share this post


Link to post
Share on other sites

I didn't see and still don't see how it is being called...

 

As far as my issue when I enter a test world and attempt to craft the item on the anvil using the recipe/plan there is no plan there to select in the anvil.

0

Share this post


Link to post
Share on other sites

There are three places the initialise anvil method is called. I am unable to tell you where at the moment but searching for the method should let you know.

As for the recipes and plan they seem fine to me. Can you check something

Start your mod, debug mode and log into a world. Look for the console output generated by the initialiseAnvil method.

0

Share this post


Link to post
Share on other sites

I don't see where it did anything.

 

I did search for the initialise anvil method and it does come up in the three locations, and I know for sure that I haven't touched those files before.

 

Here is the console output from when I started the world.

[16:32:33] [server thread/INFO]: Starting integrated minecraft server version 1.7.10

[16:32:33] [server thread/INFO]: Generating keypair

[16:32:33] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance

[16:32:33] [server thread/INFO] [FML]: Applying holder lookups

[16:32:33] [server thread/INFO] [FML]: Holder lookups applied

[16:32:34] [server thread/INFO] [FML]: Loading dimension 0 (test) ([email protected])

[16:32:34] [server thread/INFO] [FML]: Loading dimension 1 (test) ([email protected])

[16:32:34] [server thread/INFO] [FML]: Loading dimension -1 (test) ([email protected])

[16:32:35] [server thread/INFO]: Preparing start region for level 0

[16:32:36] [server thread/INFO]: Preparing spawn area: 14%

[16:32:37] [server thread/INFO]: Preparing spawn area: 73%

[16:32:38] [server thread/INFO]: Changing view distance to 5, from 10

[16:32:39] [Netty Client IO #0/INFO] [FML]: Server protocol version 2

[16:32:39] [Netty IO #1/INFO] [FML]: Client protocol version 2

[16:32:39] [Netty IO #1/INFO] [FML]: Client attempting to join with 9 mods : [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]

[16:32:39] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT

[16:32:39] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER

[16:32:39] [server thread/INFO] [FML]: [server thread] Server side modded connection established

[16:32:39] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established

[16:32:39] [server thread/INFO]: Powerman913717[local:E:df19e683] logged in with entity id 117 at (-61.86892608830776, 144.0, -11830.182473671735)

[16:32:39] [server thread/INFO]: Powerman913717 joined the game

[16:32:40] [server thread/INFO] [Waila]: Player EntityPlayerMP['Powerman913717'/117, l='test', x=-61.87, y=144.00, z=-11830.18] connected. Sending ping

[16:32:42] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 4246ms behind, skipping 84 tick(s)

[16:32:55] [Client thread/INFO] [Waila]: Received server authentication msg. Remote sync will be activated

[16:33:04] [server thread/INFO]: Saving and pausing game...

[16:33:04] [server thread/INFO]: Saving chunks for level 'test'/DEFAULT

[16:33:05] [server thread/INFO]: Saving chunks for level 'test'/Nether

[16:33:06] [server thread/INFO]: Saving chunks for level 'test'/DEFAULT

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

I'm working on adding just standard recipes and that's going well except I'm having trouble using some of the TFC items because how how everything is set up how would I go about using small magnetite in a recipe. (I'm mainly confused by the whole metadata thing.)

 

P.S. Still don't have anvil recipes working/the plans aren't loading, I removed the call in the main intial event so that the correct handlers in place would take care of it but it still doesn't load.

0

Share this post


Link to post
Share on other sites

There are two java classes for the ores, they are ItemOre (15, 25 & 35 unit ores) and ItemOreSmall (10 unit ores), they are under the /src/Common/com/bioxx/tfc/Items folder.

 

The meta used for each ore is based on it's position in a metanames array in the class.

MetaNames = new String[]{
"Native Copper", "Native Gold", "Native Platinum", "Hematite", "Native Silver", "Cassiterite", "Galena", "Bismuthinite", "Garnierite", 
"Malachite", "Magnetite", "Limonite", "Sphalerite", "Tetrahedrite", 
"Bituminous Coal", "Lignite", "Kaolinite", "Gypsum", "Satinspar", "Selenite", "Graphite", "Kimberlite", 
/*22*/"Petrified Wood", "Sulfur", "Jet", "Microcline", "Pitchblende", "Cinnabar", "Cryolite", "Saltpeter", "Serpentine", "Sylvite", 
/*32*/"Borax", "Olivine", "Lapis Lazuli", "Rich Native Copper", "Rich Native Gold", "Rich Native Platinum", "Rich Hematite", 
"Rich Native Silver", "Rich Cassiterite", "Rich Galena", "Rich Bismuthinite", "Rich Garnierite", "Rich Malachite", 
"Rich Magnetite", "Rich Limonite", "Rich Sphalerite", "Rich Tetrahedrite", 
"Poor Native Copper", "Poor Native Gold", "Poor Native Platinum", "Poor Hematite", 
"Poor Native Silver", "Poor Cassiterite", "Poor Galena", "Poor Bismuthinite", "Poor Garnierite", "Poor Malachite", 
"Poor Magnetite", "Poor Limonite", "Poor Sphalerite", "Poor Tetrahedrite"};
 
In your case by counting through to find the first instance of Magnetite you would get 10 (arrays are 0 based). At the bottom of the class you will find a method called GetMetalReturnAmount. This is a big case statement of the return metal amounts for each of the ores.
 
Find 10 and it returns TFCOptions.normalOreUnits (25).
Starting at 35 (the first number of the next case section) count the same number down and you get the rich ore meta number. In this case 45 is Magnetite (35 units).
Starting at 49 (the first number of the next case section) count the same number down and you get the poor ore meta number. In this case 59 is Magnetite (15 units).
To get the small ore meta, use the same as the normal, in this case 10.
 
So Magnetite is meta values 10, 45 and 59. 
 
To use them in a recipe you create an ItemStack and the meta number is the third parameter. E.g.
ItemStack smallMagnetite = new ItemStack(TFCItems.SmallOreChunk, 1, 10);   // 10 unit ore
ItemStack poorMagnetite = new ItemStack(TFCItems.OreChunk, 1, 59);    // 15 unit ore
ItemStack normalMagnetite = new ItemStack(TFCItems.OreChunk, 1, 10);     // 25 unit ore
ItemStack richMagnetite = new ItemStack(TFCItems.OreChunk, 1, 45);    // 35 unit ore
 
I hope this help a little.
0

Share this post


Link to post
Share on other sites

Thanks for the help, I had found the class but was unsure of how to use that information.

 

Between you and Emris helping everyone I get most of my questions solve quickly. :P

0

Share this post


Link to post
Share on other sites

Ok new issue, I think the handler that registers/initializes my anvil recipes is having issues on world loading. Any source code out there for anvil handlers that I could take a look at?

 

Working with Bletch on fix.

Edited by Powerman913717
0

Share this post


Link to post
Share on other sites

I'm trying to use planks in a recipe but I don't need a specific type of wood just any of it but the recipe doesn't work by just leaving the meta data field or whatever blank.

 

GameRegistry.addRecipe(new ItemStack(ModItems.itemPistonBase), new Object[]{"   ","PRP","PPP", 'P', TFCBlocks.Planks, 'R', Items.redstone});

0

Share this post


Link to post
Share on other sites

try this

 

To use Lumber - 

GameRegistry.addRecipe(new ItemStack(ModItems.itemPistonBase), new Object[]{"   ","PRP","PPP", 'P', "woodLumber", 'R', Items.redstone});

 

To use Planks - 

GameRegistry.addRecipe(new ItemStack(ModItems.itemPistonBase), new Object[]{"   ","PRP","PPP", 'P', "plankWood", 'R', Items.redstone});

Edited by Bletch
0

Share this post


Link to post
Share on other sites

Thanks I saw that being used in TFC recipes but I figured that I would need to create my own Item Stack for that to work. 

0

Share this post


Link to post
Share on other sites

these are OreDictionary strings defined by the TFC devs.

 

When you use the strings instead of an item or block, it allows the player to specify any of the items/block defined in the ore dictionary with that key. 

 

Keep in mind that the user can mixes planks types using this method.

 

If you look in the TFC_OreDictionary.java file under the core folder of the TFC code, you will see all the ore dictionary definitions.

0

Share this post


Link to post
Share on other sites

just stumbling through, reading TFC and other mod code to work out what is happening and why.

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