Paper 1.9
This commit is contained in:
parent
cf5b4b8828
commit
26eb457a39
139 changed files with 5550 additions and 8067 deletions
|
@ -1,6 +1,6 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 6 Nov 2014 18:29:20 -0600
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Tue, 1 Mar 2016 23:19:01 -0600
|
||||
Subject: [PATCH] Add async chunk load API
|
||||
|
||||
|
||||
|
@ -12,9 +12,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
}
|
||||
|
||||
+ // PaperSpigot start - Async chunk load API
|
||||
+ // Paper start - Async chunk load API
|
||||
+ public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) {
|
||||
+ final ChunkProviderServer cps = this.world.chunkProviderServer;
|
||||
+ final ChunkProviderServer cps = this.world.getChunkProviderServer();
|
||||
+ cps.getChunkAt(x, z, new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
|
@ -22,15 +22,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ public void getChunkAtAsync(Block block, ChunkLoadCallback callback) {
|
||||
+ getChunkAtAsync(block.getX() >> 4, block.getZ() >> 4, callback);
|
||||
+ }
|
||||
+
|
||||
+ public void getChunkAtAsync(Location location, ChunkLoadCallback callback) {
|
||||
+ getChunkAtAsync(location.getBlockX() >> 4, location.getBlockZ() >> 4, callback);
|
||||
+ }
|
||||
+ // PaperSpigot end
|
||||
+ // Paper end
|
||||
+
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
|
||||
return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk;
|
||||
}
|
||||
--
|
Loading…
Add table
Add a link
Reference in a new issue