From 13e34d8e1c1cf3f67d7f10a449e4285417883048 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 16:57:04 -0400 Subject: [PATCH] [CI-SKIP] delete removed patches --- .../api/0006-Add-async-chunk-load-API.patch | 92 ------------------- .../0023-Add-async-chunk-load-API.patch | 40 -------- 2 files changed, 132 deletions(-) delete mode 100644 removed/api/0006-Add-async-chunk-load-API.patch delete mode 100644 removed/server/0023-Add-async-chunk-load-API.patch diff --git a/removed/api/0006-Add-async-chunk-load-API.patch b/removed/api/0006-Add-async-chunk-load-API.patch deleted file mode 100644 index f9c375098..000000000 --- a/removed/api/0006-Add-async-chunk-load-API.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 2ad2461cb05bc1fa8091df72d18dc4c6bc7e363e Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 29 Feb 2016 17:43:33 -0600 -Subject: [PATCH] Add async chunk load API - - -diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 33b14a07..22ab4633 100644 ---- a/src/main/java/org/bukkit/World.java -+++ b/src/main/java/org/bukkit/World.java -@@ -107,6 +107,78 @@ public interface World extends PluginMessageRecipient, Metadatable { - */ - public Chunk getChunkAt(Block block); - -+ /** -+ * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods -+ * to request a {@link Chunk} to be loaded, with this callback receiving -+ * the chunk when it is finished. -+ * -+ * This callback will be executed on synchronously on the main thread. -+ * -+ * Timing and order this callback is fired is intentionally not defined and -+ * and subject to change. -+ */ -+ public static interface ChunkLoadCallback { -+ public void onLoad(Chunk chunk); -+ } -+ -+ /** -+ * Requests a {@link Chunk} to be loaded at the given coordinates -+ * -+ * This method makes no guarantee on how fast the chunk will load, -+ * and will return the chunk to the callback at a later time. -+ * -+ * You should use this method if you need a chunk but do not need it -+ * immediately, and you wish to let the server control the speed -+ * of chunk loads, keeping performance in mind. -+ * -+ * The {@link ChunkLoadCallback} will always be executed synchronously -+ * on the main Server Thread. -+ * -+ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16) -+ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16) -+ * @param cb Callback to receive the chunk when it is loaded. -+ * will be executed synchronously -+ */ -+ public void getChunkAtAsync(int x, int z, ChunkLoadCallback cb); -+ -+ /** -+ * Requests a {@link Chunk} to be loaded at the given {@link Location} -+ * -+ * This method makes no guarantee on how fast the chunk will load, -+ * and will return the chunk to the callback at a later time. -+ * -+ * You should use this method if you need a chunk but do not need it -+ * immediately, and you wish to let the server control the speed -+ * of chunk loads, keeping performance in mind. -+ * -+ * The {@link ChunkLoadCallback} will always be executed synchronously -+ * on the main Server Thread. -+ * -+ * @param location Location of the chunk -+ * @param cb Callback to receive the chunk when it is loaded. -+ * will be executed synchronously -+ */ -+ public void getChunkAtAsync(Location location, ChunkLoadCallback cb); -+ -+ /** -+ * Requests {@link Chunk} to be loaded that contains the given {@link Block} -+ * -+ * This method makes no guarantee on how fast the chunk will load, -+ * and will return the chunk to the callback at a later time. -+ * -+ * You should use this method if you need a chunk but do not need it -+ * immediately, and you wish to let the server control the speed -+ * of chunk loads, keeping performance in mind. -+ * -+ * The {@link ChunkLoadCallback} will always be executed synchronously -+ * on the main Server Thread. -+ * -+ * @param block Block to get the containing chunk from -+ * @param cb Callback to receive the chunk when it is loaded. -+ * will be executed synchronously -+ */ -+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb); -+ - /** - * Checks if the specified {@link Chunk} is loaded - * --- -2.18.0 - diff --git a/removed/server/0023-Add-async-chunk-load-API.patch b/removed/server/0023-Add-async-chunk-load-API.patch deleted file mode 100644 index 5992a89ad..000000000 --- a/removed/server/0023-Add-async-chunk-load-API.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cfeda276a4e161703f02b62d97e39a1ddd65193f Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Tue, 1 Mar 2016 23:19:01 -0600 -Subject: [PATCH] Add async chunk load API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0b2a9d09d..4df849eef 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -133,6 +133,26 @@ public class CraftWorld implements World { - } - } - -+ // Paper start - Async chunk load API -+ public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) { -+ final ChunkProviderServer cps = this.world.getChunkProviderServer(); -+ cps.getChunkAt(x, z, new Runnable() { -+ @Override -+ public void run() { -+ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); -+ } -+ }); -+ } -+ -+ 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); -+ } -+ // Paper end -+ - public Chunk getChunkAt(int x, int z) { - return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk; - } --- -2.18.0 -