06-30-2015, 09:13 PM
Hi everyone.
NiLSPACE contacted me on youtube regarding WorldEdit for Cuberite. I took the liberty of looking at WorldEdit's source code. It looks like it would be possible to make it lag free. All you need to do is (I assume that commands in Cuberite are executed in the main thread same as in Bukkit):
1. Fork the command to a new thread
2. Store all block changes
3. Place the changed block in packages from a task thats running on the main thread.
In addition you also need to provide a safe way to read the world from non main thread.
NiLSPACE contacted me on youtube regarding WorldEdit for Cuberite. I took the liberty of looking at WorldEdit's source code. It looks like it would be possible to make it lag free. All you need to do is (I assume that commands in Cuberite are executed in the main thread same as in Bukkit):
1. Fork the command to a new thread
2. Store all block changes
3. Place the changed block in packages from a task thats running on the main thread.
In addition you also need to provide a safe way to read the world from non main thread.