From 65a99a06a86636532454a2c1fbb50455e38a5df4 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Wed, 25 Jan 2017 22:27:42 -0600
Subject: [PATCH] Update upstream B/CB/S

---
 ...orldBorder-isInBounds-Location-check.patch | 12 ++++++----
 ...chunks-are-slime-spawn-chunks-toggle.patch |  6 ++---
 .../Cap-Entity-Collisions.patch               |  6 ++---
 ...rldBorder-isInBounds-Location-method.patch | 23 -------------------
 work/Bukkit                                   |  2 +-
 work/CraftBukkit                              |  2 +-
 work/Spigot                                   |  2 +-
 7 files changed, 17 insertions(+), 36 deletions(-)
 delete mode 100644 Spigot-Server-Patches/Expose-WorldBorder-isInBounds-Location-method.patch

diff --git a/Spigot-API-Patches/Expose-WorldBorder-isInBounds-Location-check.patch b/Spigot-API-Patches/Expose-WorldBorder-isInBounds-Location-check.patch
index f33d57485f..2a4c7ad2e9 100644
--- a/Spigot-API-Patches/Expose-WorldBorder-isInBounds-Location-check.patch
+++ b/Spigot-API-Patches/Expose-WorldBorder-isInBounds-Location-check.patch
@@ -5,13 +5,13 @@ Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check
 
 
 diff --git a/src/main/java/org/bukkit/WorldBorder.java b/src/main/java/org/bukkit/WorldBorder.java
-index 55c8983b..1957507c 100644
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/WorldBorder.java
 +++ b/src/main/java/org/bukkit/WorldBorder.java
 @@ -0,0 +0,0 @@ public interface WorldBorder {
-      * @param distance The distance in blocks. (The default is 5 blocks.)
+      * @return if this location is inside the border or not
       */
-     public void setWarningDistance(int distance);
+     public boolean isInside(Location location);
 +
 +    // Paper start
 +    /**
@@ -19,8 +19,12 @@ index 55c8983b..1957507c 100644
 +     * 
 +     * @param location specific location to check
 +     * @return true if the location is within the bounds of this border, false otherwise.
++     * @deprecated use {@link #isInside(Location)} for an upstream compatible replacement
 +     */
-+    public boolean isInBounds(Location location);
++    @Deprecated
++    public default boolean isInBounds(Location location) {
++        return this.isInside(location);
++    }
 +    // Paper end
  }
 --
\ No newline at end of file
diff --git a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch
index d5368494dd..5fe2625bf0 100644
--- a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch
+++ b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch
@@ -26,9 +26,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
                      return super.cM();
                  }
  
--                if (this.random.nextInt(10) == 0 && chunk.a(987234911L).nextInt(10) == 0 && this.locY < 40.0D) {
-+                boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; // Paper
-+                if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) {
+-                if (this.random.nextInt(10) == 0 && chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0 && this.locY < 40.0D) { // Spigot
++                boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
++                if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper
                      return super.cM();
                  }
              }
diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch
index 2ec4e0c325..255bb951d9 100644
--- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch
+++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch
@@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
 You can set this to 0 to disable collisions.
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index e8762c487..dba1c477e 100644
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -27,7 +27,7 @@ index e8762c487..dba1c477e 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
-index a1d2233ba..37dc29f63 100644
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/server/Entity.java
 +++ b/src/main/java/net/minecraft/server/Entity.java
 @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
@@ -39,7 +39,7 @@ index a1d2233ba..37dc29f63 100644
      // Spigot end
  
 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
-index 07688b1ce..6ac6a4062 100644
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/server/EntityLiving.java
 +++ b/src/main/java/net/minecraft/server/EntityLiving.java
 @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
diff --git a/Spigot-Server-Patches/Expose-WorldBorder-isInBounds-Location-method.patch b/Spigot-Server-Patches/Expose-WorldBorder-isInBounds-Location-method.patch
deleted file mode 100644
index 410da61fb1..0000000000
--- a/Spigot-Server-Patches/Expose-WorldBorder-isInBounds-Location-method.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Zach Brown <1254957+zachbr@users.noreply.github.com>
-Date: Sat, 21 Jan 2017 16:58:09 -0600
-Subject: [PATCH] Expose WorldBorder#isInBounds(Location) method
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
-index e5395a1cc..92b738c2b 100644
---- a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
-+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
-@@ -0,0 +0,0 @@ public class CraftWorldBorder implements WorldBorder {
-     public void setWarningDistance(int distance) {
-         this.handle.setWarningDistance(distance); 
-     }
-+    
-+    // Paper start
-+    @Override
-+    public boolean isInBounds(Location location) {
-+        return this.handle.isInBounds(new net.minecraft.server.BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
-+    }
-+    // Paper end
- }
---
\ No newline at end of file
diff --git a/work/Bukkit b/work/Bukkit
index 4bef447a07..50702e72bc 160000
--- a/work/Bukkit
+++ b/work/Bukkit
@@ -1 +1 @@
-Subproject commit 4bef447a073792a0858dc49e33593acb1c1948f5
+Subproject commit 50702e72bc019590101e6c47b14b42db33de46a9
diff --git a/work/CraftBukkit b/work/CraftBukkit
index 4d3bf20155..16b5116c7c 160000
--- a/work/CraftBukkit
+++ b/work/CraftBukkit
@@ -1 +1 @@
-Subproject commit 4d3bf2015504897fc69af2a209d4c8bbe217394d
+Subproject commit 16b5116c7c528a99a4270324fa05133852ff6bf4
diff --git a/work/Spigot b/work/Spigot
index b32c8f871b..6de2fbc337 160000
--- a/work/Spigot
+++ b/work/Spigot
@@ -1 +1 @@
-Subproject commit b32c8f871b2da575c1d9e9fa0532ba3e7e2eaa54
+Subproject commit 6de2fbc3377792b16f704e188aa34e72ce460354