-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in rubber tree generation is too rare, and a search optimisation #464
Comments
This issue is trouble indeed. It's not clear how to say with confidence that rubber trees spawn very rarely or will never spawn. But at some point the alternatives converge. Rubber is essential to technic; without it, there's only a crippled game. There are two questions. (1) How to fix technic's backup rubber gen; and (2) When to invoke the backup. I think (2) must be resolved before (1). That opens questions of whether moretrees rubber is broken and if it will be fixed. |
In the first post i clearly said with confidence they are too rare:
The fixes are also detailed in the first post, it should use the Biome API and place schematic rubber trees instead of L-system trees. I think it's best to fix this in technic as this mod has the need for rubber. Moretrees uses L-system trees throughout so changing rubber trees in that would be inconsistent. |
Rubber trees are nonexistent with technic + moretrees running on the v7 and carpathian mapgens. (I've spent hours flying around, maybe there was 1 rubber tree on a v7 map, but I never found another). I propose always invoking the backup when on v7, carpathian or flat (I'm not sure about river), at least until moretrees is fixed. The problem with moretrees seems to affect all water-bound trees. Rubber, apple and the palm trees are hit the hardest. |
I ran in to a similar issue with no rubber trees on v7, and in investigating in the code found that rubber trees have no vertical distance on the water block check, meaning they will only spawn on land that is level with the water. Seeing as how most of the coasts I encountered were sandy, this left very few viable spawn locations. I added near_nodes_vertical = 10 in the moretrees biome_defs.lua, and started finding rubber trees at a reasonable rate on newly generated mapblocks. I think this might have been an oversight in moretrees, and possibly an easy fix there? |
The 'find nodes in area' checks that biome_lib does are very intensive, mostly unecessary and a large reason why moretrees is extremely intensive and slow. All the mods that use biome_lib, such as moretrees etc., are unsuitable for use with mapgens other than mgv6. |
On what do they grow on? |
Is this still a problem? If so an issue should be opened here: https://github.com/mt-mods/moretrees/issues As for the biome_lib performance issues, I have some ideas and will open issues on the biome_lib repo for them. |
Filed mt-mods/moretrees#33 |
There has been a complaint about finding rubber trees in non-mgv6 mapgens.
technic/technic_worldgen/rubber.lua
Line 85 in bdd13be
One rubber tree is placed in 1 in 25 mapchunks, an average spacing of 400 nodes, good luck finding it in non-mgv6 dense forests.
That conditional should be removed as an initial workaround, for one rubber tree in every mapchunk with dirt_with_grass.
technic/technic_worldgen/rubber.lua
Line 94 in bdd13be
The radius of this search is too big, it's searching a volume equivalent to 8 mapchunks, that's 4,096,000 nodes which will cause significant server Lua lags. It should be now be
(maxp.x - minp.x) / 2
since every surface mapchunk is being searched.///////////////////////
The current code is crap and about 6 years out of date. It should place rubber trees using the engine's Biome API, which means no need for a huge 'find node near' search. Then multiple rubber trees can be placed in suitable biomes.
Technic shouldn't even place L-system rubber trees during mapgen, because doing so causes lighting bugs, moretrees only places saplings during mapgen which are then quickly grown by ABM.
It shouldn't use L-system trees at all and use schematics, since technic is adding rubber trees itself to mapgens full of schematic trees, L-system trees are inconsistent.
L-system trees are not yet suitable for adding at mapgen time as every one causes it's own lighting update.
It's weird how MT's most popular mods are so intensive, out of date, and poorly coded in terms of mapgen (moretrees, biome lib, technic).
The text was updated successfully, but these errors were encountered: