Topic category: Advanced modding
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?
The trees, I'm gonna guess, you did as generated structures. There shouldn't be too much lag, but try spacing them out more.
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.
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.