Closed Crec0 closed 1 year ago
Looks good to me. I might modify this to include a conceptual change: Instead of checking whether all sourrounding chunks were already preloaded, it might be faster to store that all necessary sourrounding chunks are preloaded for a given center chunk. However, this requires additional profiling to confirm that a significant amount of time is spent inside this function after your changes.
I noticed that you are excluding the top most chunk section of every chunk. I assume this is unintentional and change it, unless you give a reason for it.
Merged a modified version manually
Overwrite chunk preloading method to not use streams. This gives a considerable server performance when large amount of entities are going through nether portals
Theoretical test
Average mspt with with 1024 repeating command blocks spawning items that go through portals to other dimension
Practical test
A stacking raid farm at 32mspt without optimization decreased to 24mspt with this optimization