Yeregorix / Mirage

The best solution against xray users
MIT License
19 stars 1 forks source link

Improving the setCenter method #49

Closed Gershon123 closed 2 years ago

Gershon123 commented 3 years ago

The setCenter method seems to be called on the player movement & player rotation packets. Is it possible to put it into an async scheduler? image

Yeregorix commented 3 years ago

This method interacts with objects that are modified synchronously, mostly NetworkBlockContainer and PlayerChunkMapEntry. While I guess it's not impossible to make dynamism async, it's quite difficult to make it correctly and would need many synchronization points. I'm not sure it would improves performance significantly, plus I expect some issues to appear because of block changes being handled concurrently.

I definitely not have the time to explore this possibility for Mirage on Sponge API 7, I might think about it when rewriting the plugin for API 8.