Enhanced generator, custom chest, spawner, and related utility classes to utilize the fastutil library, yielding a performance increase of up to 3-7% and significantly reducing memory usage (observed differences of up to 1.5GB in certain scenarios).
Optimized the custom chest class by minimizing the number of times the chest block is accessed. Used a "fake" chest represented by an array for item placement calculations, accessed the chest instance only twice, and implemented multithreading to significantly reduce processing time to get random chest items.
Improved material loading by adopting a new alias, resulting in more balanced loading between materials with and without biomes. Fetching random materials for both world and biome is now notably faster, reducing thread blocking during operations like /tpr. Additionally, precomputing wherever feasible and implementing caching mechanisms have been employed to further reduce fetch times for random materials. CPU usage during /tpr decreased from consistently hitting 100% across all cores for 2-3 seconds to a range of 80-90% for less than a second (test done with simulation-distance=8 and view-distance=8).
Note: Many main classes have been almost fully overhauled to use the fastutil library. If you encounter any issues, please submit them on the
GitHub issue page. I tried my best to test every scenario I can think of, but I can't always catch every issue.