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

Growing Trees mod port (?)

21 posts in this topic

Hello,

 

I wanted to draw attention on a new really exciting mod called Growing Trees by ferreusveritas. Here is the link: https://mods.curse.com/mc-mods/minecraft/252818-growing-trees

Maybe there is somebody willing to help the mod author with TFC support. Even if there is no chance check this one out, it is amazing!

 

By the way here is the permission by the author:

Quote

Provide interfaces for other mod developers to expand the mod with add-ons, new trees, effects, mobs and other things. If you need a hook then lemme know :)

I would prefer if you ported the mod as a branch in the growing trees mod itself on github, that way we can benefit from advances made on both sides.  But you can do whatever you want if you name it something else.

And here is the source code: https://github.com/ferreusveritas/Growing-Trees

 

drkoaeg

Edited by drkoaeg
GitHub repository link added
2

Share this post


Link to post
Share on other sites

Wonderful mod! *.* Unfortunately I'm not a coder but agree with drkoaeg - this mod is perfect for TFC and if someone can make this work with it it would be really cool ^^

0

Share this post


Link to post
Share on other sites

That is a neat mod. For it to work for TFC though it would need a version for each tfc tree. Also I am going to assume each change of the tree is based on ticks. You would need to convert that to time based or else you'd go out mining and then come back to see your crops grew but the tree did not. Also need to change the drops. May also get some funky behavior with TFC axe but would have to test to find out. 

If it's tick based I assume. like the orchard trees in tfc when they are still growing, that too many of them in an area will cause lag. 

0

Share this post


Link to post
Share on other sites
1 hour ago, Stroam said:

If it's tick based I assume.

As far as I know there are no ticking entities in this mod

0

Share this post


Link to post
Share on other sites
Quote

Under the hood:

  • Trees grow using a combination of a cellular automata algorithm for leaves and branch network logic for trunk and branches.
  • No tile entities are used. Rendering is done with ISimpleBlockRenderingHandler for better performance with large numbers of tree nodes.
  • Blocks are only updated with updateTick() so chunks are re-rendered when dirty no more than with vanilla crops.
  • Listener interface is used for bottom leaves blocks tick for creating seed drops and other effects. New listeners can be registered by other mods to expand tree behavior.
  • All block states are encoded in the 4 bit metadata.
  • Growing leaves blocks use 4 species sub-blocks to a Block using metadata encoding for conserving BlockIDs.  This mod registers 9 blocks total.

As posted by the author.  It does use update ticks but it seems like they at least thought about performance. I would love to see their leaf algorithm and branch logic not so much to scrutinize, but because I love that sort of stuff. 

0

Share this post


Link to post
Share on other sites
10 minutes ago, Stroam said:

As posted by the author.  It does use update ticks but it seems like they at least thought about performance. I would love to see their leaf algorithm and branch logic not so much to scrutinize, but because I love that sort of stuff. 

sry, my bad

actually, I have added the src code link, check it out = )

Edited by drkoaeg
0

Share this post


Link to post
Share on other sites

OMG! The commenting! It's human readable, organized, and easy to follow! No method I've seen is longer than my screen. Most methods do only one thing. This code is so sexy. I rarely see code this sexy even in industry! Who is this person? Where did they learn to code? What else have they done? I just want to look at more of their code. It's fine art.

2

Share this post


Link to post
Share on other sites

Well if coding in this mod is so pretty then maybe someone wants to take TFC porting challenge? ^^ I literally know nothing about the coding and this mod is so amazing that I can try to learn but I'm not sure if this isn't too difficult task for beginner :P

EDIT

If anyone more experienced would like to help with the rest and check later  I can write code for every TFC tree - probably most simple and boring part of task  :)

Edited by Narmo
0

Share this post


Link to post
Share on other sites

Maybe when TFC 2 comes out. Though by my estimates that's over a year out, probably two if it continues at it's current development rate. Could also potentially never come as who knows what the state of minecraft will be at that time. The funny part is the longer it took the developers to develop the more mods were made and the bigger the community grew. Now that big corporations are involved and updating more, the less time mods have to develop and the more quiet the community seems. At least that's the impression I get from TFC, minecraft, FTB, and Forge forums. 

0

Share this post


Link to post
Share on other sites

I see. Ok, so if anyone else don't decide to do it I will try. Any advice for beginner? :P

0

Share this post


Link to post
Share on other sites

Make sure to get the mod author's permission, or check their legal statements first before you start trying to port. I think there are two ways to do this port, the simple copy and paste way or the super realistic and more interesting way. The latter would involve creating the different systems so that the trees all grow in different patterns, and changing them to work from the TFC time scale as previously suggested. 

Also, a note on the TFC axe, the axe item doesn't do anything itself, the TFC wood blocks check the oreDictionary for items registered as "axe" when a block is broken to determine if the whole tree should be taken down.

0

Share this post


Link to post
Share on other sites

Mod's author seems to be very open about glue mods and other versions of minecraft mods but I will ask him anyway, I would prefer to do this in the second way you talked about :) Thanks for the axe tip.

0

Share this post


Link to post
Share on other sites
3 hours ago, Powerman913717 said:

The latter would involve creating the different systems so that the trees all grow in different patterns, and changing them to work from the TFC time scale as previously suggested. 

It seems as if the author had already built in some hooks, so it would be easier for others to add different tree growth characteristics.

0

Share this post


Link to post
Share on other sites

Just do a search on oak and then whenever it pops up you'll have to add in the tfc trees. So under the file trees you'll have to see how those parameters affect tree tree growth. If a class doesn't mention a tree type then it's generic and used for all trees. For the most part you'll be adding to the code not modifying so don't unless you have to. Some potential exceptions is where biome, humidity, and temp comes into play. The tree is based on ticks so if you don't want to afk for an hour during tests then you'll need a way to increase the tick rate for the tree. Lots of options there. If you tie it into TFC temp and humidity then I suggest get 4 test worlds. Each one for a different season. Don't use the growth speed to test because the mod maker said increasing that changes the look of the tree. 

Edited by Stroam
0

Share this post


Link to post
Share on other sites

Thank you very much,  it is pretty much what I needed and my initial strategy seems to be similar with your suggestions :)

0

Share this post


Link to post
Share on other sites

Hi guys,

 

This mod is amazing. I would like to know if you have made any progress to port this mod to TFC ?

0

Share this post


Link to post
Share on other sites

Unfortunately not exactly, I need to learn java first because I have no experience with modding at all and like now I have so much other responsibilities that I don't have time and power to do so. Maybe someone else will be able to try.

Edited by Narmo
0

Share this post


Link to post
Share on other sites

In order to revive this thread, I would like to give somebody the chance to get a feeling on how assessable this could be:

Adding trees *should be* simple. create a class that extends my GrowingTree class and add whatever it is that differentiates it from other trees.  An example(birch tree):

 

///////////////////////////////////////

public class TreeBirch extends GrowingTree {

 

public TreeBirch(int seq) {
super("birch", seq);

//Birch are tall, skinny, fast growing trees
setBasicGrowingParameters(0.1f, 14.0f, 4, 4, 1.25f);

retries = 1;//Special fast growing

 

//Vanilla Birch Stuff
setPrimitiveLeaves(Blocks.leaves, 2); //Vanilla Birch Leaves Block/Meta
setPrimitiveLog(Blocks.log, 2); //Vanilla Birch Log Block/Meta
setPrimitiveSapling(Blocks.sapling, 2); //Vanilla Birch Sapling/Meta

 

//How the biome affects the growth rate
envFactor(Type.COLD, 0.75f);
envFactor(Type.HOT, 0.50f);
envFactor(Type.DRY, 0.50f);
envFactor(Type.FOREST, 1.05f);
}

       

@Override
public boolean isBiomePerfect(BiomeGenBase biome) {
return isOneOfBiomes(biome, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills);
};

}

 

///////////////////////////////////////

 

Then you register it like so:

TreeRegistry.registerTree(new TreeBirch(seq));  

Where seq is the sequential tree number for the mod.

The mod uses existing textures so you basically will make another mod that depends on growing trees and whatever mod provides the remainder of the 15 trees you are interested in.

 

The source is still at the link at the first post to be forked. Hope to see some interest = )

Edited by drkoaeg
clearer instructions
0

Share this post


Link to post
Share on other sites

I have now some free time so I can finally learn java coding but it would be better if someome with at least little experience do this modding thing, really. I could try rewriting code (since I have the example above) for all of terrafirma trees but most probably my code will be full of errors so anyway I would need someone to check it xD

Edited by Narmo
0

Share this post


Link to post
Share on other sites
1 hour ago, Narmo said:

I have now some free time so I can finally learn java coding but it would be better if someome with at least little experience do this modding thing, really. I could try rewriting code (since I have the example above) for all of terrafirma trees but most probably my code will be full of errors so anyway I would need someone to check it xD

Ferreusveritas will be happy to help looking over the code, if you make a fork in GitHub. But he has no knowledge with TFC, so it would be needed someone who is well experienced there. You can contact him on the link below:

https://mods.curse.com/members/ferreusveritas

0

Share this post


Link to post
Share on other sites

TFC does not register biomes like othe mods. There is no Type.HOT, Type.DRY etc. This is why Forestry doesn't work properly. So a call to TFCs temperature and rainfall methods will be needed.

1

Share this post


Link to post
Share on other sites