Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
ce5b97ea83
When looking up tile entities for a chunk to send to a player we currently loop through every tile entity in the world checking if it is within the bounds of the relevant chunk. Instead of doing this we can just use the tile entities list stored in the chunk to avoid this costly searching. As a further optimization, we also modify the generic range-based lookup to use chunks as well. For most lookups this will give a smaller search pool which will result in faster lookups. Thanks to @mikeprimm for the idea and most of the implementation. |
||
---|---|---|
.. | ||
main | ||
test/java/org/bukkit |