bte_optimization_fixes-1.16.0.jar
Curse Maven Snippet
What's new
Nature's Compass searches biomes on the server thread through Forge's
WorldWorkerManager, which gives the search the spare time of every tick
and at least 10 ms, so the server loses >= 10 ms per tick while a compass
is searching and the search only goes as fast as the spare tick time.
With the modpack config (radiusModifier 25000, maxSamples 1000000) a
search for a biome that is not nearby can run for a very long time.
- AsyncBiomeSearch: walks exactly the same spiral as BiomeSearchWorker
(same steps, radius and sample limits, same heights) on its own thread
and checks the columns in parallel batches of 256, keeping the first
column in spiral order that has the biome, so the position and sample
count are the ones the original would report.
- BiomeSearchWorkerAsyncMixin: doWork() starts the search, keeps updating
the search radius shown by the compass every 500 blocks and, when done,
calls the original succeed()/fail(); it returns false meanwhile so the
worker manager does not spend tick time on it. stop() cancels it.
- A biome the dimension cannot generate (not in its BiomeSource's
possible biomes, e.g. a Twilight Forest biome searched in the
Overworld) now fails at once instead of walking the whole spiral.
- Nature's Compass 1.19.2-1.10.0 added as compileOnly from libs/
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

