Generating as "features" instead of structure procedures

Started by TheRidiculousR on

Topic category: Advanced modding

Last seen on 10:28, 25. Nov 2022
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Generating as "features" instead of structure procedures
Tue, 06/30/2020 - 12:49 (edited)

so, I have been working on a mod that adds a few new forests to the game, each with their own new tree type.
These generate as structures that then run a procedure on generate to make the actual trees.
but when flying around you can visibly see that the chunk has to sort of generate double, because first it generates without the tree, and then several ticks later the tree magically appears.
back in 1.12.2, it also said cascading world gen lag in the console, and I think it has to do with this.
because my mod contains rather large and quite dense trees, this absolutely destroys performance when generating terrain...
so is there any way to include my tree script in the world gen itself rather then an event that happens after something has already generated?

looking at the default tree's coding from the custom biome code generated in Mcreator, I can't really tell what exactly is generating the tree itself, and selecting vanilla trees calls for some other files called oak_tree_feature.java or something among the likes.

so does anyone know how I could make a tree generate as such a feature rather then a procedure?

Edited by TheRidiculousR on Tue, 06/30/2020 - 12:49
Last seen on 22:49, 17. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The trees, I'm gonna guess,…
Wed, 07/01/2020 - 15:26

The trees, I'm gonna guess, you did as generated structures. There shouldn't be too much lag, but try spacing them out more.

Last seen on 10:28, 25. Nov 2022
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the trees generate as a…
Thu, 07/02/2020 - 08:26

the trees generate as a structure containing a single block, that then calls a procedure to generate the actual trees.
basically i have a procedure that randomly puts wood above it and ends with another procedure that puts leaves around it.

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could do what I was…
Thu, 07/02/2020 - 10:10

You could do what I was playing around with.. use a sapling the uses the procedure to turn into the tree,  then pepper your biomes with the saplings.