Add Urgent API for Async Chunks API and use it for Async Teleport

This also cleans up the implementation of Async Chunks to get rid of most
Consumer callbacks and instead return futures.

This lets us propogate errors correctly up the future chain
(barring one isn't lost even deeper in the chain...)

So exceptions can now bubble to plugins using getChunkAtAsync
This commit is contained in:
Aikar
2020-05-09 22:30:28 -04:00
parent 04becc8a1c
commit 56d8694bd9
6 changed files with 238 additions and 77 deletions

View File

@@ -222,8 +222,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.server.IChunkAccess;
+import net.minecraft.server.MCUtil;
import net.minecraft.server.MinecraftKey;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.MovingObjectPosition;
import net.minecraft.server.PacketPlayOutCustomSoundEffect;
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
return ret;
}