diff --git a/LICENSE.md b/LICENSE.md index 7d4663268a..1bb8996e25 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -34,4 +34,6 @@ Brokkonaut vemacs stonar96 Hugo Manrique +Andrew Steinborn +willies952002 ``` diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index b3a5921d3b..0298688ced 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From 7439e7e3c94eb559415193440a9e1515335819c7 Mon Sep 17 00:00:00 2001 +From 012c183c1c668f4ab31e7b6e0e6ae61005127510 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 00:16:08 +0100 Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 3e6c8707..c2d0651e 100644 +index e946bccf..7374304f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,29 +3,35 @@ @@ -21,7 +21,7 @@ index 3e6c8707..c2d0651e 100644 + + + paper-api - 1.13-pre7-R0.1-SNAPSHOT + 1.13-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-API-Patches/0003-Timings-v2.patch b/Spigot-API-Patches/0003-Timings-v2.patch index 617ac6b110..aed23fe061 100644 --- a/Spigot-API-Patches/0003-Timings-v2.patch +++ b/Spigot-API-Patches/0003-Timings-v2.patch @@ -1,4 +1,4 @@ -From dfdc0fc72aa42183a2d88cec42f0f08bcb1d474c Mon Sep 17 00:00:00 2001 +From f8fa09d5b8cbff7c0ce49d3fab5352ecdecb6172 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 @@ -3004,7 +3004,7 @@ index 00000000..df592d85 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0f42a66a..68b5e1c9 100644 +index ff7f436c..b56c09d3 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -525,7 +525,6 @@ public final class Bukkit { @@ -3016,10 +3016,10 @@ index 0f42a66a..68b5e1c9 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 053a24dc..0d41f7db 100644 +index a766ee96..4ddb8b02 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1011,12 +1011,27 @@ public interface Server extends PluginMessageRecipient { +@@ -1037,12 +1037,27 @@ public interface Server extends PluginMessageRecipient { // Spigot start public class Spigot { diff --git a/Spigot-API-Patches/0005-Add-getTPS-method.patch b/Spigot-API-Patches/0005-Add-getTPS-method.patch index d3292fbade..121e9da22d 100644 --- a/Spigot-API-Patches/0005-Add-getTPS-method.patch +++ b/Spigot-API-Patches/0005-Add-getTPS-method.patch @@ -1,14 +1,14 @@ -From ff3b42f8a992f43e1a65e70f750f489168d633bd Mon Sep 17 00:00:00 2001 +From 5afd01f2ac262d4c1074c7eacb0550eebb115731 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 17:24:57 -0600 Subject: [PATCH] Add getTPS method diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 68b5e1c9..f3252e20 100644 +index b56c09d3..477a5833 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1127,6 +1127,16 @@ public final class Bukkit { +@@ -1153,6 +1153,16 @@ public final class Bukkit { return server.getEntity(uuid); } @@ -26,10 +26,10 @@ index 68b5e1c9..f3252e20 100644 * Get the advancement specified by this key. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 331bb061..eb98c600 100644 +index 4ddb8b02..1fa6f53e 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -921,6 +921,15 @@ public interface Server extends PluginMessageRecipient { +@@ -947,6 +947,15 @@ public interface Server extends PluginMessageRecipient { */ Entity getEntity(UUID uuid); diff --git a/Spigot-API-Patches/0006-Entity-Origin-API.patch b/Spigot-API-Patches/0006-Entity-Origin-API.patch index afc96b456b..ac51c91301 100644 --- a/Spigot-API-Patches/0006-Entity-Origin-API.patch +++ b/Spigot-API-Patches/0006-Entity-Origin-API.patch @@ -1,4 +1,4 @@ -From 4e2445c63fba52523da6ce11e8cf8a241cf593f3 Mon Sep 17 00:00:00 2001 +From ac7a0eff76dedc21f1bc6fc1eb0d6cbb367f6f90 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Mon, 29 Feb 2016 17:50:31 -0600 Subject: [PATCH] Entity Origin API @@ -25,10 +25,10 @@ index 28b169d2..9b0f97f1 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java -index 9d34e691..b0b1defc 100644 +index 0cd830d9..170a9aee 100644 --- a/src/main/java/org/bukkit/entity/FallingBlock.java +++ b/src/main/java/org/bukkit/entity/FallingBlock.java -@@ -52,4 +52,15 @@ public interface FallingBlock extends Entity { +@@ -51,4 +51,15 @@ public interface FallingBlock extends Entity { * @param hurtEntities whether entities will be damaged by this block. */ void setHurtEntities(boolean hurtEntities); diff --git a/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch b/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch index d9c29d8322..7a86be32a9 100644 --- a/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch +++ b/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch @@ -1,4 +1,4 @@ -From 501e01d868ec3f41f8aa3a1bebc83b4305723b42 Mon Sep 17 00:00:00 2001 +From 2ee52b020013ad95861d196908450fa2fc227431 Mon Sep 17 00:00:00 2001 From: Isaac Moore Date: Mon, 29 Feb 2016 18:02:25 -0600 Subject: [PATCH] Add PlayerLocaleChangeEvent @@ -61,5 +61,5 @@ index 00000000..29dd763a + } +} -- -2.18.0 +2.17.0 (Apple Git-106) diff --git a/Spigot-API-Patches/0009-Add-player-view-distance-API.patch b/Spigot-API-Patches/0009-Add-player-view-distance-API.patch index 8f757a13b6..99cea1def9 100644 --- a/Spigot-API-Patches/0009-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0009-Add-player-view-distance-API.patch @@ -1,4 +1,4 @@ -From a046e06ee22190a42f8ec203d7b106a9271c09f2 Mon Sep 17 00:00:00 2001 +From 3308624206985251b7646042a4276f026c169c0b Mon Sep 17 00:00:00 2001 From: Byteflux Date: Mon, 29 Feb 2016 18:05:37 -0600 Subject: [PATCH] Add player view distance API @@ -30,5 +30,5 @@ index 25e44028..7f215f1a 100644 public class Spigot extends Entity.Spigot { -- -2.18.0 +2.17.0 (Apple Git-106) diff --git a/Spigot-API-Patches/0010-Add-BeaconEffectEvent.patch b/Spigot-API-Patches/0010-Add-BeaconEffectEvent.patch index ad3b9b75cd..f214a0e8a7 100644 --- a/Spigot-API-Patches/0010-Add-BeaconEffectEvent.patch +++ b/Spigot-API-Patches/0010-Add-BeaconEffectEvent.patch @@ -1,4 +1,4 @@ -From e9e1ec6471574850b8eb0cd61bb019a05d7adbb2 Mon Sep 17 00:00:00 2001 +From b0d2313841c2f617773d33708aaca8fece34d75c Mon Sep 17 00:00:00 2001 From: Byteflux Date: Mon, 29 Feb 2016 18:09:40 -0600 Subject: [PATCH] Add BeaconEffectEvent @@ -92,5 +92,5 @@ index 00000000..6579ae99 + } +} -- -2.18.0 +2.17.0 (Apple Git-106) diff --git a/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch similarity index 94% rename from Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch rename to Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch index eef236b0a7..bd4ae59d0a 100644 --- a/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch +++ b/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch @@ -1,4 +1,4 @@ -From 283da38a9b2ea8a978ea570e8446f487caaf6f10 Mon Sep 17 00:00:00 2001 +From 9a230e904d502c69610fe0507d3bbaabc19cd059 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 19:45:21 -0600 Subject: [PATCH] Automatically disable plugins that fail to load diff --git a/Spigot-API-Patches/0012-Made-EntityDismountEvent-Cancellable.patch b/Spigot-API-Patches/0012-Made-EntityDismountEvent-Cancellable.patch deleted file mode 100644 index 3b8d8a99cd..0000000000 --- a/Spigot-API-Patches/0012-Made-EntityDismountEvent-Cancellable.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8afe8ac5e2901bf492b1465e4a5ec43117bebdc2 Mon Sep 17 00:00:00 2001 -From: Nik Gil -Date: Mon, 29 Feb 2016 19:42:10 -0600 -Subject: [PATCH] Made EntityDismountEvent Cancellable - - -diff --git a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -index 24d4942a..ce989bb1 100644 ---- a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -+++ b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -@@ -1,6 +1,7 @@ - package org.spigotmc.event.entity; - - import org.bukkit.entity.Entity; -+import org.bukkit.event.Cancellable; - import org.bukkit.event.HandlerList; - import org.bukkit.event.entity.EntityEvent; - -@@ -8,7 +9,7 @@ import org.bukkit.event.entity.EntityEvent; - * Called when an entity stops riding another entity. - * - */ --public class EntityDismountEvent extends EntityEvent -+public class EntityDismountEvent extends EntityEvent implements Cancellable // Paper - implement Cancellable - { - - private static final HandlerList handlers = new HandlerList(); -@@ -36,4 +37,16 @@ public class EntityDismountEvent extends EntityEvent - { - return handlers; - } -+ -+ // Paper start - Implement cancellable methods -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancelled) { -+ this.cancelled = cancelled; -+ } -+ // Paper end - } --- -2.18.0 - diff --git a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch b/Spigot-API-Patches/0013-Expose-server-CommandMap.patch similarity index 89% rename from Spigot-API-Patches/0014-Expose-server-CommandMap.patch rename to Spigot-API-Patches/0013-Expose-server-CommandMap.patch index 1294089752..0fe2708943 100644 --- a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch +++ b/Spigot-API-Patches/0013-Expose-server-CommandMap.patch @@ -1,11 +1,11 @@ -From d7b3294ee2ca409a7de9da69d863974ee1823872 Mon Sep 17 00:00:00 2001 +From a16608e4c4b20cad5477b8be0c935581a1d0895f Mon Sep 17 00:00:00 2001 From: kashike Date: Mon, 29 Feb 2016 19:48:59 -0600 Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f3252e20..a291ebd6 100644 +index 477a5833..73c85063 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -19,10 +19,7 @@ import org.bukkit.boss.BarColor; @@ -20,7 +20,7 @@ index f3252e20..a291ebd6 100644 import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; -@@ -1237,6 +1234,17 @@ public final class Bukkit { +@@ -1263,6 +1260,17 @@ public final class Bukkit { return server.getUnsafe(); } @@ -39,7 +39,7 @@ index f3252e20..a291ebd6 100644 { return server.spigot(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index eb98c600..2b43ac1f 100644 +index 1fa6f53e..70e19580 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -19,10 +19,7 @@ import org.bukkit.boss.BarColor; @@ -54,7 +54,7 @@ index eb98c600..2b43ac1f 100644 import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; -@@ -930,6 +927,14 @@ public interface Server extends PluginMessageRecipient { +@@ -956,6 +953,14 @@ public interface Server extends PluginMessageRecipient { public double[] getTPS(); // Paper end diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0014-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch similarity index 97% rename from Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch rename to Spigot-API-Patches/0014-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 7786d2feda..c7a3edc612 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0014-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -1,4 +1,4 @@ -From 3b0d21ce147ba8825a3e5b64923a11d1a81fdbbf Mon Sep 17 00:00:00 2001 +From 25d86246284e115f6bc1aa65fc26dac0e77de5fa Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 19:54:32 -0600 Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses @@ -37,7 +37,7 @@ index a291ebd6..0844862c 100644 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 2b43ac1f..d8ce8173 100644 +index 901199e3..1ad2cba4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -228,6 +228,26 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/0015-Player-Tab-List-and-Title-APIs.patch similarity index 99% rename from Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch rename to Spigot-API-Patches/0015-Player-Tab-List-and-Title-APIs.patch index ae28c173df..5ae2621d02 100644 --- a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/0015-Player-Tab-List-and-Title-APIs.patch @@ -1,4 +1,4 @@ -From e5ee86a01a83c6c38f2ad58a4e534af73d54847c Mon Sep 17 00:00:00 2001 +From fa4c0456f5dd7abf1913952d44e859ebfdd61069 Mon Sep 17 00:00:00 2001 From: Techcable Date: Mon, 29 Feb 2016 20:02:40 -0600 Subject: [PATCH] Player Tab List and Title APIs @@ -498,5 +498,5 @@ index f4d1ade5..65b7a076 100644 /** -- -2.18.0 +2.17.0 (Apple Git-106) diff --git a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch b/Spigot-API-Patches/0016-Add-exception-reporting-event.patch similarity index 99% rename from Spigot-API-Patches/0017-Add-exception-reporting-event.patch rename to Spigot-API-Patches/0016-Add-exception-reporting-event.patch index 55e970ab15..d299a68aed 100644 --- a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/0016-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From ec5c5dcdcd3e5a6dd7a4d5620c73274f94071b80 Mon Sep 17 00:00:00 2001 +From 487fd736664c77fdc1da6257aadc398d7e9cdac3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:24:35 -0600 Subject: [PATCH] Add exception reporting event diff --git a/Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch b/Spigot-API-Patches/0017-Fix-ServerListPingEvent-flagging-as-Async.patch similarity index 97% rename from Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch rename to Spigot-API-Patches/0017-Fix-ServerListPingEvent-flagging-as-Async.patch index c2d3275ff6..9f65d69461 100644 --- a/Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch +++ b/Spigot-API-Patches/0017-Fix-ServerListPingEvent-flagging-as-Async.patch @@ -1,4 +1,4 @@ -From 8f1e66f25039c51d7e83c9c9ffae25ac434acb2b Mon Sep 17 00:00:00 2001 +From cb1afe86f6ab48949d4e19d3549a4669b1ceae28 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 20:26:39 -0600 Subject: [PATCH] Fix ServerListPingEvent flagging as Async diff --git a/Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch b/Spigot-API-Patches/0018-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch similarity index 97% rename from Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch rename to Spigot-API-Patches/0018-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch index 35f5789451..2d11be49c5 100644 --- a/Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch +++ b/Spigot-API-Patches/0018-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch @@ -1,4 +1,4 @@ -From 4d1f4491596b61d5a58c4446d1a58954e53b1f1d Mon Sep 17 00:00:00 2001 +From 5c6c0d9b5742c5c31017b1951334b325b04faac0 Mon Sep 17 00:00:00 2001 From: kashike Date: Tue, 8 Mar 2016 13:05:59 -0800 Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender diff --git a/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-API-Patches/0019-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 93% rename from Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to Spigot-API-Patches/0019-Add-methods-for-working-with-arrows-stuck-in-living-.patch index a29ca0659d..d63328d35c 100644 --- a/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-API-Patches/0019-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -1,4 +1,4 @@ -From 70a25e1acdf0f9edfdde947fdb97aef644535ee3 Mon Sep 17 00:00:00 2001 +From a2e517e59ee21c1ce489f3917b75bcb8a94d1bea Mon Sep 17 00:00:00 2001 From: mrapple Date: Sun, 25 Nov 2012 13:47:27 -0600 Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch b/Spigot-API-Patches/0020-Complete-resource-pack-API.patch similarity index 98% rename from Spigot-API-Patches/0021-Complete-resource-pack-API.patch rename to Spigot-API-Patches/0020-Complete-resource-pack-API.patch index e01f783736..e58e189801 100644 --- a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/0020-Complete-resource-pack-API.patch @@ -1,4 +1,4 @@ -From 1d993cf07f29d709b5cae8a3e04528675d7e7aea Mon Sep 17 00:00:00 2001 +From b2c4a432b883c52071cb4b538f1f117ea62d7a2e Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 22:59:54 -0400 Subject: [PATCH] Complete resource pack API diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch similarity index 99% rename from Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch rename to Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch index 278d0a07b6..2c77abb150 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch @@ -1,4 +1,4 @@ -From 1469b97863ed5e841689d1347d6183189fef27cb Mon Sep 17 00:00:00 2001 +From cf7ba1c723ee537f7bbc7cc8d339d6357e5f0694 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 13:20:33 -0700 Subject: [PATCH] Use ASM for event executors. @@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index 5e2024ca..bd9146dd 100644 +index a8a87820..a58d4424 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,17 @@ diff --git a/Spigot-API-Patches/0023-Add-a-call-helper-to-Event.patch b/Spigot-API-Patches/0022-Add-a-call-helper-to-Event.patch similarity index 94% rename from Spigot-API-Patches/0023-Add-a-call-helper-to-Event.patch rename to Spigot-API-Patches/0022-Add-a-call-helper-to-Event.patch index 0224e527a2..5c9f4f75c3 100644 --- a/Spigot-API-Patches/0023-Add-a-call-helper-to-Event.patch +++ b/Spigot-API-Patches/0022-Add-a-call-helper-to-Event.patch @@ -1,4 +1,4 @@ -From e9cc1e95622f2b2f51b02a3a0b32911c3c760613 Mon Sep 17 00:00:00 2001 +From b6c1b5a967f036414fecc13493846b18a6c60ffe Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 19 May 2013 20:36:58 -0400 Subject: [PATCH] Add a call helper to Event diff --git a/Spigot-API-Patches/0024-Add-sender-name-to-commands.yml-replacement.patch b/Spigot-API-Patches/0023-Add-sender-name-to-commands.yml-replacement.patch similarity index 96% rename from Spigot-API-Patches/0024-Add-sender-name-to-commands.yml-replacement.patch rename to Spigot-API-Patches/0023-Add-sender-name-to-commands.yml-replacement.patch index 0323eec35a..23e445bc80 100644 --- a/Spigot-API-Patches/0024-Add-sender-name-to-commands.yml-replacement.patch +++ b/Spigot-API-Patches/0023-Add-sender-name-to-commands.yml-replacement.patch @@ -1,4 +1,4 @@ -From b5c4f4748f637c8ddccffbcdef249b4abe7f4401 Mon Sep 17 00:00:00 2001 +From 77a78428fcc16fb82c0a2e0d2173db22a1476266 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 22 Jul 2015 18:50:41 -0400 Subject: [PATCH] Add sender name to commands.yml replacement diff --git a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/0024-Add-command-to-reload-permissions.yml-and-require-co.patch similarity index 94% rename from Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch rename to Spigot-API-Patches/0024-Add-command-to-reload-permissions.yml-and-require-co.patch index 674b989cfb..532d428222 100644 --- a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/0024-Add-command-to-reload-permissions.yml-and-require-co.patch @@ -1,4 +1,4 @@ -From 1a2b3bc3c46affceeb6ae0f93d166778eabba78b Mon Sep 17 00:00:00 2001 +From 4df7359ab8d56f067a1373cd77a35c2ea2ed28d9 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:28:07 -0400 Subject: [PATCH] Add command to reload permissions.yml and require confirm to @@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0844862c..bce4ba1b 100644 +index 471ae811..d6686820 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1263,6 +1263,13 @@ public final class Bukkit { +@@ -1289,6 +1289,13 @@ public final class Bukkit { public static CommandMap getCommandMap() { return server.getCommandMap(); } @@ -24,10 +24,10 @@ index 0844862c..bce4ba1b 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 1ad2cba4..b6a2141c 100644 +index 56b0fdb5..5a4528c4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1094,4 +1094,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1120,4 +1120,6 @@ public interface Server extends PluginMessageRecipient { Spigot spigot(); // Spigot end diff --git a/Spigot-API-Patches/0026-Custom-replacement-for-eaten-items.patch b/Spigot-API-Patches/0025-Custom-replacement-for-eaten-items.patch similarity index 97% rename from Spigot-API-Patches/0026-Custom-replacement-for-eaten-items.patch rename to Spigot-API-Patches/0025-Custom-replacement-for-eaten-items.patch index ad908ee6fc..aa5d96f386 100644 --- a/Spigot-API-Patches/0026-Custom-replacement-for-eaten-items.patch +++ b/Spigot-API-Patches/0025-Custom-replacement-for-eaten-items.patch @@ -1,4 +1,4 @@ -From c92da34fc23a3a8c4bd298cf1e752b43ce81a88a Mon Sep 17 00:00:00 2001 +From 9b4d4b26e75b1e6467c11da7432ba08453689686 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:05:21 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/Spigot-API-Patches/0027-Access-items-by-EquipmentSlot.patch b/Spigot-API-Patches/0026-Access-items-by-EquipmentSlot.patch similarity index 94% rename from Spigot-API-Patches/0027-Access-items-by-EquipmentSlot.patch rename to Spigot-API-Patches/0026-Access-items-by-EquipmentSlot.patch index d2e3318656..1cee62c3ed 100644 --- a/Spigot-API-Patches/0027-Access-items-by-EquipmentSlot.patch +++ b/Spigot-API-Patches/0026-Access-items-by-EquipmentSlot.patch @@ -1,4 +1,4 @@ -From ad5444f104e8943b5cd8fe2110dfa6e74c47ab0c Mon Sep 17 00:00:00 2001 +From a4f2ef92d3cb775e916cbf50f2613f901b0e07e3 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 20 Mar 2016 06:44:49 -0400 Subject: [PATCH] Access items by EquipmentSlot diff --git a/Spigot-API-Patches/0028-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-API-Patches/0027-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 97% rename from Spigot-API-Patches/0028-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-API-Patches/0027-Entity-AddTo-RemoveFrom-World-Events.patch index 5312eab728..3ad2bfe7b3 100644 --- a/Spigot-API-Patches/0028-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-API-Patches/0027-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,4 +1,4 @@ -From d66b6b3d8cf42eee8c7d432bfeeb8618eb1c3125 Mon Sep 17 00:00:00 2001 +From db294a56ff3cbb40493caea0ce0506dc6261de4d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:26:34 -0400 Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/Spigot-API-Patches/0029-EntityPathfindEvent.patch b/Spigot-API-Patches/0028-EntityPathfindEvent.patch similarity index 97% rename from Spigot-API-Patches/0029-EntityPathfindEvent.patch rename to Spigot-API-Patches/0028-EntityPathfindEvent.patch index d2ca317f0a..efa6f26612 100644 --- a/Spigot-API-Patches/0029-EntityPathfindEvent.patch +++ b/Spigot-API-Patches/0028-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From e3f57f03c3b0a7dfb8399bc60c9854d7c5369397 Mon Sep 17 00:00:00 2001 +From 0f4f69d6a81d66c4906f1c05cac664bbdb129cf7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:15:34 -0400 Subject: [PATCH] EntityPathfindEvent diff --git a/Spigot-API-Patches/0030-Reduce-thread-synchronization-in-MetadataStoreBase.patch b/Spigot-API-Patches/0029-Reduce-thread-synchronization-in-MetadataStoreBase.patch similarity index 98% rename from Spigot-API-Patches/0030-Reduce-thread-synchronization-in-MetadataStoreBase.patch rename to Spigot-API-Patches/0029-Reduce-thread-synchronization-in-MetadataStoreBase.patch index 7700b6e156..73c734e753 100644 --- a/Spigot-API-Patches/0030-Reduce-thread-synchronization-in-MetadataStoreBase.patch +++ b/Spigot-API-Patches/0029-Reduce-thread-synchronization-in-MetadataStoreBase.patch @@ -1,4 +1,4 @@ -From c0a5945074128db7e77a353aa9035b7d0f01acb7 Mon Sep 17 00:00:00 2001 +From 9cd7b0f5a8832c7d1b3db973c9f65db555013762 Mon Sep 17 00:00:00 2001 From: crast Date: Sat, 1 Jun 2013 13:52:30 -0600 Subject: [PATCH] Reduce thread synchronization in MetadataStoreBase diff --git a/Spigot-API-Patches/0031-Add-MetadataStoreBase.removeAll-Plugin.patch b/Spigot-API-Patches/0030-Add-MetadataStoreBase.removeAll-Plugin.patch similarity index 95% rename from Spigot-API-Patches/0031-Add-MetadataStoreBase.removeAll-Plugin.patch rename to Spigot-API-Patches/0030-Add-MetadataStoreBase.removeAll-Plugin.patch index 446d41d4a3..10497f7511 100644 --- a/Spigot-API-Patches/0031-Add-MetadataStoreBase.removeAll-Plugin.patch +++ b/Spigot-API-Patches/0030-Add-MetadataStoreBase.removeAll-Plugin.patch @@ -1,4 +1,4 @@ -From ff8d88096d58f9f801a4d6b49ef0eede65667989 Mon Sep 17 00:00:00 2001 +From 9a9ae4bff73c2649084dc753efa60f86ac91c2dd Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 16 Jul 2013 21:26:50 -0400 Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin) diff --git a/Spigot-API-Patches/0032-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-API-Patches/0031-Add-PlayerUseUnknownEntityEvent.patch similarity index 96% rename from Spigot-API-Patches/0032-Add-PlayerUseUnknownEntityEvent.patch rename to Spigot-API-Patches/0031-Add-PlayerUseUnknownEntityEvent.patch index e6eaf9ebaf..f922ed959b 100644 --- a/Spigot-API-Patches/0032-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-API-Patches/0031-Add-PlayerUseUnknownEntityEvent.patch @@ -1,4 +1,4 @@ -From 97a35e82ddb729fd74ce6d252a2c928a24b39d55 Mon Sep 17 00:00:00 2001 +From 57f2ba957f3cf3753fdf4f51697cda7e52daefc7 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 05:08:36 -0400 Subject: [PATCH] Add PlayerUseUnknownEntityEvent diff --git a/Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 99% rename from Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 872f0177d0..d9c2c29f90 100644 --- a/Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -1,4 +1,4 @@ -From 7c3fcd8ee8df766361c426d25955b626eac60d88 Mon Sep 17 00:00:00 2001 +From 4e0abf8c461a8e517fa30a281d90f8c60bd5686a Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 13 Apr 2016 20:20:18 -0700 Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/Spigot-API-Patches/0034-Arrow-pickup-rule-API.patch b/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch similarity index 96% rename from Spigot-API-Patches/0034-Arrow-pickup-rule-API.patch rename to Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch index 55b5f46885..905c0a4777 100644 --- a/Spigot-API-Patches/0034-Arrow-pickup-rule-API.patch +++ b/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch @@ -1,4 +1,4 @@ -From 19fcaea4b23887be2eaa4d5e5bded0fa3ceca3ab Mon Sep 17 00:00:00 2001 +From 57f8f2e8bfc9419a07a28ad20fb52c13ee3e5562 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Fri, 4 Mar 2016 03:13:18 -0500 Subject: [PATCH] Arrow pickup rule API diff --git a/Spigot-API-Patches/0035-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-API-Patches/0034-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 96% rename from Spigot-API-Patches/0035-EntityRegainHealthEvent-isFastRegen-API.patch rename to Spigot-API-Patches/0034-EntityRegainHealthEvent-isFastRegen-API.patch index e1661cae07..4201deae25 100644 --- a/Spigot-API-Patches/0035-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-API-Patches/0034-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From 49a798ea1efd88482f5860292339b3229ebbf877 Mon Sep 17 00:00:00 2001 +From 8121678797e7b682fc53643ab34992d1aeacba8d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API diff --git a/Spigot-API-Patches/0036-LootTable-API.patch b/Spigot-API-Patches/0035-LootTable-API.patch similarity index 99% rename from Spigot-API-Patches/0036-LootTable-API.patch rename to Spigot-API-Patches/0035-LootTable-API.patch index 467e51b016..d2d95fd7f9 100644 --- a/Spigot-API-Patches/0036-LootTable-API.patch +++ b/Spigot-API-Patches/0035-LootTable-API.patch @@ -1,4 +1,4 @@ -From 47d3999f281a9271cec4bdec2cc226b05d3ebf40 Mon Sep 17 00:00:00 2001 +From 4f1dc63c147f7ba3ae36ad4c04f55c852ae84dd7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 1 May 2016 15:19:49 -0400 Subject: [PATCH] LootTable API diff --git a/Spigot-API-Patches/0037-Add-EntityZapEvent.patch b/Spigot-API-Patches/0036-Add-EntityZapEvent.patch similarity index 98% rename from Spigot-API-Patches/0037-Add-EntityZapEvent.patch rename to Spigot-API-Patches/0036-Add-EntityZapEvent.patch index bba41a875d..7e3cf3e72b 100644 --- a/Spigot-API-Patches/0037-Add-EntityZapEvent.patch +++ b/Spigot-API-Patches/0036-Add-EntityZapEvent.patch @@ -1,4 +1,4 @@ -From fa59003d856eb5f54a4a9bf0a26b7e55ae3a0713 Mon Sep 17 00:00:00 2001 +From 8cfb250c7604959047200370c281919b0ae0c420 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:34 -0700 Subject: [PATCH] Add EntityZapEvent diff --git a/Spigot-API-Patches/0038-Misc-Utils.patch b/Spigot-API-Patches/0037-Misc-Utils.patch similarity index 94% rename from Spigot-API-Patches/0038-Misc-Utils.patch rename to Spigot-API-Patches/0037-Misc-Utils.patch index d18b1edcb5..3dd8d2ab46 100644 --- a/Spigot-API-Patches/0038-Misc-Utils.patch +++ b/Spigot-API-Patches/0037-Misc-Utils.patch @@ -1,4 +1,4 @@ -From ae850cec0afe270d11a66245c0d9e46a16339283 Mon Sep 17 00:00:00 2001 +From f3a8ebcad45891f6cb7d243095d3739c1f1980d2 Mon Sep 17 00:00:00 2001 From: vemacs Date: Wed, 23 Nov 2016 12:53:43 -0500 Subject: [PATCH] Misc Utils diff --git a/Spigot-API-Patches/0039-Allow-Reloading-of-Command-Aliases.patch b/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch similarity index 94% rename from Spigot-API-Patches/0039-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch index 5ac111f001..7476d160f7 100644 --- a/Spigot-API-Patches/0039-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch @@ -1,4 +1,4 @@ -From 5573a13dbba10bfedcf8610d255a13293bda79bd Mon Sep 17 00:00:00 2001 +From 2eaf589a9abaea57928f1d5ceecb1e404999a090 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 28 Nov 2016 10:16:39 -0500 Subject: [PATCH] Allow Reloading of Command Aliases @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index bce4ba1b..70495c15 100644 +index d6686820..35e18341 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1270,6 +1270,15 @@ public final class Bukkit { +@@ -1296,6 +1296,15 @@ public final class Bukkit { public static void reloadPermissions() { server.reloadPermissions(); } @@ -26,10 +26,10 @@ index bce4ba1b..70495c15 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b6a2141c..94d709f4 100644 +index 5a4528c4..12efd654 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1096,4 +1096,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1122,4 +1122,6 @@ public interface Server extends PluginMessageRecipient { // Spigot end void reloadPermissions(); // Paper diff --git a/Spigot-API-Patches/0040-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-API-Patches/0039-Add-source-to-PlayerExpChangeEvent.patch similarity index 96% rename from Spigot-API-Patches/0040-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-API-Patches/0039-Add-source-to-PlayerExpChangeEvent.patch index 6263fac243..969451283b 100644 --- a/Spigot-API-Patches/0040-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-API-Patches/0039-Add-source-to-PlayerExpChangeEvent.patch @@ -1,4 +1,4 @@ -From e08937fe0886d2dbce1bdb74980b7cdbc778e628 Mon Sep 17 00:00:00 2001 +From 47a6be4ee58f0b7650ee3f74933311d0e0dbab0e Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Thu, 8 Sep 2016 08:47:08 -0700 Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/Spigot-API-Patches/0041-Add-ProjectileCollideEvent.patch b/Spigot-API-Patches/0040-Add-ProjectileCollideEvent.patch similarity index 97% rename from Spigot-API-Patches/0041-Add-ProjectileCollideEvent.patch rename to Spigot-API-Patches/0040-Add-ProjectileCollideEvent.patch index 83205aeec3..e59beae1c8 100644 --- a/Spigot-API-Patches/0041-Add-ProjectileCollideEvent.patch +++ b/Spigot-API-Patches/0040-Add-ProjectileCollideEvent.patch @@ -1,4 +1,4 @@ -From da74019f26ab71c97991b2cf3474bc40a2c63bce Mon Sep 17 00:00:00 2001 +From 4eac0975455ab0ef81f5dac6bf83d475951f9a81 Mon Sep 17 00:00:00 2001 From: Techcable Date: Fri, 16 Dec 2016 21:25:39 -0600 Subject: [PATCH] Add ProjectileCollideEvent diff --git a/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch similarity index 98% rename from Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch rename to Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch index 0d2d159fce..4f330d38ee 100644 --- a/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch @@ -1,4 +1,4 @@ -From d1c10cb8d00c3b6e9c8612bc30e9e7a715dd1ecf Mon Sep 17 00:00:00 2001 +From 12f234e11bae353a39c478f79e9d4c640b004c0e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:55:55 -0500 Subject: [PATCH] Add String based Action Bar API diff --git a/Spigot-API-Patches/0043-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-API-Patches/0042-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 94% rename from Spigot-API-Patches/0043-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-API-Patches/0042-Add-API-methods-to-control-if-armour-stands-can-move.patch index 061c3f1db3..e2a1751e9c 100644 --- a/Spigot-API-Patches/0043-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-API-Patches/0042-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -1,4 +1,4 @@ -From 3c437859f9ef78609aac37e3afe173588ae67ee9 Mon Sep 17 00:00:00 2001 +From 718a96c9c13faf9b22291e81c70b0170fd4a0501 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 21 Dec 2016 11:47:25 -0600 Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/Spigot-API-Patches/0044-IllegalPacketEvent.patch b/Spigot-API-Patches/0043-IllegalPacketEvent.patch similarity index 97% rename from Spigot-API-Patches/0044-IllegalPacketEvent.patch rename to Spigot-API-Patches/0043-IllegalPacketEvent.patch index 5ebf8914fb..6d4e261d55 100644 --- a/Spigot-API-Patches/0044-IllegalPacketEvent.patch +++ b/Spigot-API-Patches/0043-IllegalPacketEvent.patch @@ -1,4 +1,4 @@ -From dea71c291e5e4139c86b7570e6eed8897bde2e94 Mon Sep 17 00:00:00 2001 +From 0f595a2260083d3940ed487003e0351bb75aa1a5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 4 Dec 2016 01:19:14 -0500 Subject: [PATCH] IllegalPacketEvent diff --git a/Spigot-API-Patches/0045-Fireworks-API-s.patch b/Spigot-API-Patches/0044-Fireworks-API-s.patch similarity index 93% rename from Spigot-API-Patches/0045-Fireworks-API-s.patch rename to Spigot-API-Patches/0044-Fireworks-API-s.patch index 2c02d41dd5..432fb38209 100644 --- a/Spigot-API-Patches/0045-Fireworks-API-s.patch +++ b/Spigot-API-Patches/0044-Fireworks-API-s.patch @@ -1,4 +1,4 @@ -From 6705469275b33dd3cbb08048e0226fbca6c8599d Mon Sep 17 00:00:00 2001 +From 8e86bdb38a51cea9f5b62c820732617366fce895 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 01:18:55 -0500 Subject: [PATCH] Fireworks API's diff --git a/Spigot-API-Patches/0046-PlayerTeleportEndGatewayEvent.patch b/Spigot-API-Patches/0045-PlayerTeleportEndGatewayEvent.patch similarity index 95% rename from Spigot-API-Patches/0046-PlayerTeleportEndGatewayEvent.patch rename to Spigot-API-Patches/0045-PlayerTeleportEndGatewayEvent.patch index c69e7cb9b2..cec5a5f63e 100644 --- a/Spigot-API-Patches/0046-PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-API-Patches/0045-PlayerTeleportEndGatewayEvent.patch @@ -1,4 +1,4 @@ -From f0f71311d0761cfb9c8ba1c5901f3e29223994ad Mon Sep 17 00:00:00 2001 +From 718717b647158518a34c36bb8e5623d838e88e29 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 31 Dec 2016 20:29:33 -0500 Subject: [PATCH] PlayerTeleportEndGatewayEvent diff --git a/Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 95% rename from Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch index 39e8776cd4..78ae86dc02 100644 --- a/Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From 33b64ea35d49023c95c359e7c8664335e202f7c0 Mon Sep 17 00:00:00 2001 +From 9e7f9915a3c7e0c57d407ff884ef4262aea8568b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:23:03 -0500 Subject: [PATCH] Provide E/TE/Chunk count stat methods diff --git a/Spigot-API-Patches/0048-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-API-Patches/0047-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 98% rename from Spigot-API-Patches/0048-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-API-Patches/0047-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 1d8537586c..105a7b0b99 100644 --- a/Spigot-API-Patches/0048-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-API-Patches/0047-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -1,4 +1,4 @@ -From 0e3f92f938875e2030ff8e1b7f559ecddca777f7 Mon Sep 17 00:00:00 2001 +From a5987f0c76258d3d57fe1611b8355438ebbcc058 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:28:32 -0500 Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player diff --git a/Spigot-API-Patches/0049-Expose-WorldBorder-isInBounds-Location-check.patch b/Spigot-API-Patches/0048-Expose-WorldBorder-isInBounds-Location-check.patch similarity index 94% rename from Spigot-API-Patches/0049-Expose-WorldBorder-isInBounds-Location-check.patch rename to Spigot-API-Patches/0048-Expose-WorldBorder-isInBounds-Location-check.patch index 133dc7c0b2..4ff719941c 100644 --- a/Spigot-API-Patches/0049-Expose-WorldBorder-isInBounds-Location-check.patch +++ b/Spigot-API-Patches/0048-Expose-WorldBorder-isInBounds-Location-check.patch @@ -1,4 +1,4 @@ -From 0187592c026f6b460628219f3f2c4e48e9413bfc Mon Sep 17 00:00:00 2001 +From 2938561e612928e665b3e9db9f50e44d5284970e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 21 Jan 2017 17:03:10 -0600 Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check diff --git a/Spigot-API-Patches/0050-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 90% rename from Spigot-API-Patches/0050-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch index 15c4eacaca..7e3432d96a 100644 --- a/Spigot-API-Patches/0050-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch @@ -1,4 +1,4 @@ -From bb52f66da14375368ceff766b8cf92decd2caada Mon Sep 17 00:00:00 2001 +From 2ac7131971cf62c416974a622be676b1e55ff205 Mon Sep 17 00:00:00 2001 From: kashike Date: Fri, 9 Jun 2017 07:24:24 -0700 Subject: [PATCH] Add configuration option to prevent player names from being @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 70495c15..c918d67c 100644 +index 35e18341..9558645f 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1279,6 +1279,16 @@ public final class Bukkit { +@@ -1305,6 +1305,16 @@ public final class Bukkit { public static boolean reloadCommandAliases() { return server.reloadCommandAliases(); } @@ -27,10 +27,10 @@ index 70495c15..c918d67c 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 94d709f4..96044f4b 100644 +index 12efd654..da0d08b3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1098,4 +1098,14 @@ public interface Server extends PluginMessageRecipient { +@@ -1124,4 +1124,14 @@ public interface Server extends PluginMessageRecipient { void reloadPermissions(); // Paper boolean reloadCommandAliases(); // Paper diff --git a/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch similarity index 99% rename from Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch rename to Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch index 438ba4bd5a..7031f0ffb1 100644 --- a/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch @@ -1,4 +1,4 @@ -From 95cc7e013040f4cc243d1d421ec2d8a62dacbfa2 Mon Sep 17 00:00:00 2001 +From 6bd3a5ad8d74d0174b70ec10216020d6f7c1206d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 10 Jun 2017 16:59:40 -0500 Subject: [PATCH] Fix upstream javadoc warnings and errors @@ -6,7 +6,7 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java -index 1ed8f7e4..bd5238ce 100644 +index 43239f84..fe8d3468 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java @@ -38,8 +38,8 @@ public final class NamespacedKey { diff --git a/Spigot-API-Patches/0052-Item-canEntityPickup.patch b/Spigot-API-Patches/0051-Item-canEntityPickup.patch similarity index 93% rename from Spigot-API-Patches/0052-Item-canEntityPickup.patch rename to Spigot-API-Patches/0051-Item-canEntityPickup.patch index 08748d15b3..e6f929fdd1 100644 --- a/Spigot-API-Patches/0052-Item-canEntityPickup.patch +++ b/Spigot-API-Patches/0051-Item-canEntityPickup.patch @@ -1,4 +1,4 @@ -From dc66c4f09cb93dc94893badd5da732ed2178aa45 Mon Sep 17 00:00:00 2001 +From 360118be75c9c955ddc56da1a41976f2238136af Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 5 May 2017 03:57:08 -0500 Subject: [PATCH] Item#canEntityPickup diff --git a/Spigot-API-Patches/0053-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-API-Patches/0052-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 96% rename from Spigot-API-Patches/0053-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-API-Patches/0052-PlayerPickupItemEvent-setFlyAtPlayer.patch index 3bbe8f5d9e..e9ae025b3f 100644 --- a/Spigot-API-Patches/0053-PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/Spigot-API-Patches/0052-PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -1,4 +1,4 @@ -From d9917e835f1e81e0b7d84ffc7ea4b60ca08eb3c4 Mon Sep 17 00:00:00 2001 +From 158701799346c25d8daf92beb3fb9c59922c3aec Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 May 2017 06:26:01 -0500 Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/Spigot-API-Patches/0054-PlayerAttemptPickupItemEvent.patch b/Spigot-API-Patches/0053-PlayerAttemptPickupItemEvent.patch similarity index 97% rename from Spigot-API-Patches/0054-PlayerAttemptPickupItemEvent.patch rename to Spigot-API-Patches/0053-PlayerAttemptPickupItemEvent.patch index 97de3e04a3..0e7d9f3740 100644 --- a/Spigot-API-Patches/0054-PlayerAttemptPickupItemEvent.patch +++ b/Spigot-API-Patches/0053-PlayerAttemptPickupItemEvent.patch @@ -1,4 +1,4 @@ -From 1f46a8b98f035e8a17ccef525526dc0d02b7acbb Mon Sep 17 00:00:00 2001 +From b989dc1168c035e24f94e0ff25514d579e52f6f7 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 11 Jun 2017 16:30:37 -0500 Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch b/Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch similarity index 97% rename from Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch rename to Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch index 67133ccd70..358ff4d94b 100644 --- a/Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch +++ b/Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch @@ -1,4 +1,4 @@ -From d8cb5d408bac83ef3e7e83da92cc90904d4cd379 Mon Sep 17 00:00:00 2001 +From 170f61cabc9f329e6a4159b4a9dc9db4a5d76836 Mon Sep 17 00:00:00 2001 From: Sweepyoface Date: Sat, 17 Jun 2017 18:48:06 -0400 Subject: [PATCH] Add UnknownCommandEvent diff --git a/Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch b/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch similarity index 95% rename from Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch rename to Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch index 94761dcae0..63db9190d8 100644 --- a/Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch +++ b/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 2a6044898ccb64c5c3bd65f556ec5e93834917b2 Mon Sep 17 00:00:00 2001 +From bdcaf28a89037f365f2f9020eae7a11d8fe5080e Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 15 Jan 2018 21:46:46 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -7,14 +7,12 @@ Provides basic elements of a PlayerProfile to be used by future API/events diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java new file mode 100644 -index 00000000..e060c38a +index 00000000..1a69e5f7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -@@ -0,0 +1,149 @@ +@@ -0,0 +1,141 @@ +package com.destroystokyo.paper.profile; + -+import com.mojang.authlib.GameProfile; -+ +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.Collection; @@ -153,12 +151,6 @@ index 00000000..e060c38a + default boolean hasTextures() { + return hasProperty("textures"); + } -+ -+ /** -+ * @deprecated Will be removed in 1.13 -+ */ -+ @Deprecated -+ GameProfile getGameProfile(); +} diff --git a/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java new file mode 100644 @@ -239,7 +231,7 @@ index 00000000..d17061e6 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c918d67c..01a226d9 100644 +index 9558645f..86e72f95 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -46,6 +46,9 @@ import org.bukkit.generator.ChunkGenerator; @@ -252,7 +244,7 @@ index c918d67c..01a226d9 100644 /** * Represents the Bukkit core, for version and Server singleton handling */ -@@ -1289,6 +1292,37 @@ public final class Bukkit { +@@ -1315,6 +1318,37 @@ public final class Bukkit { public static boolean suggestPlayerNamesWhenNullTabCompletions() { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -291,7 +283,7 @@ index c918d67c..01a226d9 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 96044f4b..6c96fc14 100644 +index da0d08b3..878255a4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -47,6 +47,9 @@ import org.bukkit.generator.ChunkGenerator; @@ -304,7 +296,7 @@ index 96044f4b..6c96fc14 100644 /** * Represents a server implementation. */ -@@ -1107,5 +1110,30 @@ public interface Server extends PluginMessageRecipient { +@@ -1133,5 +1136,30 @@ public interface Server extends PluginMessageRecipient { * @return true if player names should be suggested */ boolean suggestPlayerNamesWhenNullTabCompletions(); diff --git a/Spigot-API-Patches/0057-Shoulder-Entities-Release-API.patch b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch similarity index 95% rename from Spigot-API-Patches/0057-Shoulder-Entities-Release-API.patch rename to Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch index 8f92ff7868..a873817a51 100644 --- a/Spigot-API-Patches/0057-Shoulder-Entities-Release-API.patch +++ b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch @@ -1,4 +1,4 @@ -From 495ea88275a4d9b96efb1db20a52c4566f3458e5 Mon Sep 17 00:00:00 2001 +From cde8228c35b12307dc50eb03eb3550aa2f41c485 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 17 Jun 2017 15:04:51 -0400 Subject: [PATCH] Shoulder Entities Release API diff --git a/Spigot-API-Patches/0058-Profile-Lookup-Events.patch b/Spigot-API-Patches/0057-Profile-Lookup-Events.patch similarity index 65% rename from Spigot-API-Patches/0058-Profile-Lookup-Events.patch rename to Spigot-API-Patches/0057-Profile-Lookup-Events.patch index e35ead083f..84ba731ff6 100644 --- a/Spigot-API-Patches/0058-Profile-Lookup-Events.patch +++ b/Spigot-API-Patches/0057-Profile-Lookup-Events.patch @@ -1,4 +1,4 @@ -From c836087cd8822e93732c4f292489a13b77223a89 Mon Sep 17 00:00:00 2001 +From 97ffcb9256d9f121a14c42cfc8142f250bafac71 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 17 Jun 2017 16:30:44 -0400 Subject: [PATCH] Profile Lookup Events @@ -6,34 +6,15 @@ Subject: [PATCH] Profile Lookup Events Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from profiles that had to be looked up. -diff --git a/pom.xml b/pom.xml -index bd9146dd..44a8b2a5 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -61,6 +61,13 @@ - - provided - -+ -+ -+ com.mojang -+ authlib -+ 1.5.25 -+ compile -+ - - co.aikar - fastutil-lite diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java new file mode 100644 -index 00000000..3b6995a7 +index 00000000..160c98fe --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java -@@ -0,0 +1,55 @@ +@@ -0,0 +1,44 @@ +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; -+import com.mojang.authlib.GameProfile; +import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -60,16 +41,6 @@ index 00000000..3b6995a7 + + /** + * @return The profile that was recently looked up. This profile can be mutated -+ * @deprecated will be removed with 1.13, use {@link #getPlayerProfile()} -+ */ -+ @Deprecated -+ @Nonnull -+ public GameProfile getProfile() { -+ return profile.getGameProfile(); -+ } -+ -+ /** -+ * @return The profile that was recently looked up. This profile can be mutated + */ + @Nonnull + public PlayerProfile getPlayerProfile() { @@ -87,17 +58,15 @@ index 00000000..3b6995a7 +} diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java new file mode 100644 -index 00000000..aa0666d5 +index 00000000..e5a5986a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java -@@ -0,0 +1,149 @@ +@@ -0,0 +1,105 @@ +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; +import com.destroystokyo.paper.profile.ProfileProperty; +import com.google.common.collect.ArrayListMultimap; -+import com.google.common.collect.Multimap; -+import com.mojang.authlib.properties.Property; +import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -162,48 +131,6 @@ index 00000000..aa0666d5 + } + + /** -+ * Get the properties for this profile -+ * -+ * @return the property map to attach to the new {@link PlayerProfile} -+ * @deprecated will be removed with 1.13 Use {@link #getProfileProperties()} -+ */ -+ @Deprecated -+ @Nonnull -+ public Multimap getProperties() { -+ Multimap props = ArrayListMultimap.create(); -+ -+ for (ProfileProperty property : properties) { -+ props.put(property.getName(), new Property(property.getName(), property.getValue(), property.getSignature())); -+ } -+ return props; -+ } -+ -+ /** -+ * Completely replaces all Properties with the new provided properties -+ * @param properties the properties to set on the new profile -+ * @deprecated will be removed with 1.13 Use {@link #setProfileProperties(Set)} -+ */ -+ @Deprecated -+ public void setProperties(Multimap properties) { -+ this.properties = new HashSet<>(); -+ properties.values().forEach(property -> { -+ this.properties.add(new ProfileProperty(property.getName(), property.getValue(), property.getSignature())); -+ }); -+ } -+ -+ /** -+ * Adds additional properties, without removing the original properties -+ * @param properties the properties to add to the existing properties -+ * @deprecated will be removed with 1.13 use {@link #addProfileProperties(Set)} -+ */ -+ @Deprecated -+ public void addProperties(Multimap properties) { -+ properties.values().forEach(property -> { -+ this.properties.add(new ProfileProperty(property.getName(), property.getValue(), property.getSignature())); -+ }); -+ } -+ -+ /** + * @return The currently pending prepopulated properties. + * Any property in this Set will be automatically prefilled on this Profile + */ diff --git a/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch b/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch similarity index 92% rename from Spigot-API-Patches/0059-Entity-fromMobSpawner.patch rename to Spigot-API-Patches/0058-Entity-fromMobSpawner.patch index d31fd8b335..616565bd80 100644 --- a/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch +++ b/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch @@ -1,4 +1,4 @@ -From 0a3125353c085b5a16edb538480d5f712a6afde3 Mon Sep 17 00:00:00 2001 +From d12b4647862ab81272f1030da1a9fbeb2e7d30b1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 18 Jun 2017 18:17:05 -0500 Subject: [PATCH] Entity#fromMobSpawner() diff --git a/Spigot-API-Patches/0060-Improve-the-Saddle-API-for-Horses.patch b/Spigot-API-Patches/0059-Improve-the-Saddle-API-for-Horses.patch similarity index 97% rename from Spigot-API-Patches/0060-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-API-Patches/0059-Improve-the-Saddle-API-for-Horses.patch index f8848466ce..e6b76fee94 100644 --- a/Spigot-API-Patches/0060-Improve-the-Saddle-API-for-Horses.patch +++ b/Spigot-API-Patches/0059-Improve-the-Saddle-API-for-Horses.patch @@ -1,4 +1,4 @@ -From 233f6d000f7fa14bd2de6d6c5ba88cd4b9dc4170 Mon Sep 17 00:00:00 2001 +From 93347de85dca36fb232ea77c2c767563e1e40ada Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 10 Dec 2016 16:12:48 -0500 Subject: [PATCH] Improve the Saddle API for Horses diff --git a/Spigot-API-Patches/0061-ensureServerConversions-API.patch b/Spigot-API-Patches/0060-ensureServerConversions-API.patch similarity index 91% rename from Spigot-API-Patches/0061-ensureServerConversions-API.patch rename to Spigot-API-Patches/0060-ensureServerConversions-API.patch index fb4d2dd571..28e1ee5e01 100644 --- a/Spigot-API-Patches/0061-ensureServerConversions-API.patch +++ b/Spigot-API-Patches/0060-ensureServerConversions-API.patch @@ -1,4 +1,4 @@ -From 4f36318d8921ffa44333a86eac125200caad51d5 Mon Sep 17 00:00:00 2001 +From 7a4550bdfee62eaba02e50fe3434310cb0b82f8c Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 23:55:48 -0400 Subject: [PATCH] ensureServerConversions API @@ -28,10 +28,10 @@ index 762c43d6..045c26d9 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 73f79b22..14b6b6b3 100644 +index 3c91cbe6..4940e726 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -487,7 +487,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -495,7 +495,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { } } @@ -45,7 +45,7 @@ index 73f79b22..14b6b6b3 100644 } /** -@@ -545,4 +550,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -553,4 +558,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { return true; } diff --git a/Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch b/Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch similarity index 92% rename from Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch rename to Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch index 773172c197..1d525395ff 100644 --- a/Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch +++ b/Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch @@ -1,4 +1,4 @@ -From c1dbeb3ae74907b1336b1d68f76279b883bb35e3 Mon Sep 17 00:00:00 2001 +From 75065c61ba95680cd9e1db23b402a094d141b616 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 23:55:48 -0400 Subject: [PATCH] Add getI18NDisplayName API @@ -28,10 +28,10 @@ index 045c26d9..47bbc0f9 100644 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 14b6b6b3..ca7a958f 100644 +index 4940e726..e52a39ec 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -563,5 +563,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -571,5 +571,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { public ItemStack ensureServerConversions() { return Bukkit.getServer().getItemFactory().ensureServerConversions(this); } diff --git a/Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch b/Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch similarity index 91% rename from Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch rename to Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch index 082630f5e6..dbd7ed398b 100644 --- a/Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch @@ -1,4 +1,4 @@ -From 285c68e987f4db6db40f653a723754b5793dc6e8 Mon Sep 17 00:00:00 2001 +From a2f75206786a9be627fbdb0c6e1597b6a38db782 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 3 Jul 2017 18:11:34 -0500 Subject: [PATCH] ProfileWhitelistVerifyEvent @@ -9,10 +9,10 @@ Allows you to do dynamic whitelisting and change of kick message diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java new file mode 100644 -index 00000000..662e79e3 +index 00000000..a11f811e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java -@@ -0,0 +1,120 @@ +@@ -0,0 +1,110 @@ +/* + * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License + * @@ -39,7 +39,6 @@ index 00000000..662e79e3 +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; -+import com.mojang.authlib.GameProfile; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + @@ -81,15 +80,6 @@ index 00000000..662e79e3 + } + + /** -+ * The gameprofile of the player trying to connect -+ * @deprecated Will be removed in 1.13, use #{@link #getPlayerProfile()} -+ */ -+ @Deprecated -+ public GameProfile getProfile() { -+ return profile.getGameProfile(); -+ } -+ -+ /** + * @return The profile of the player trying to connect + */ + public PlayerProfile getPlayerProfile() { diff --git a/Spigot-API-Patches/0064-Make-plugins-list-alphabetical.patch b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch similarity index 96% rename from Spigot-API-Patches/0064-Make-plugins-list-alphabetical.patch rename to Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch index f21470f756..e2f99c63fa 100644 --- a/Spigot-API-Patches/0064-Make-plugins-list-alphabetical.patch +++ b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch @@ -1,4 +1,4 @@ -From 03867368971fb3bfad36b8ebe68d5948fd20ce0a Mon Sep 17 00:00:00 2001 +From 37638b5c57bc22517f707779b8c216d3cd24c131 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 02:08:55 -0500 Subject: [PATCH] Make /plugins list alphabetical diff --git a/Spigot-API-Patches/0065-LivingEntity-setKiller.patch b/Spigot-API-Patches/0064-LivingEntity-setKiller.patch similarity index 94% rename from Spigot-API-Patches/0065-LivingEntity-setKiller.patch rename to Spigot-API-Patches/0064-LivingEntity-setKiller.patch index 0302725a89..73d2e4d02a 100644 --- a/Spigot-API-Patches/0065-LivingEntity-setKiller.patch +++ b/Spigot-API-Patches/0064-LivingEntity-setKiller.patch @@ -1,4 +1,4 @@ -From 054913afc1358179ae54b96956bce518334591ae Mon Sep 17 00:00:00 2001 +From bed7ac830a6ec1ab5b4b4e19a6c4abe47a2ba813 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:49:43 -0500 Subject: [PATCH] LivingEntity#setKiller diff --git a/Spigot-API-Patches/0066-Handle-plugin-prefixes-in-implementation-logging-con.patch b/Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch similarity index 96% rename from Spigot-API-Patches/0066-Handle-plugin-prefixes-in-implementation-logging-con.patch rename to Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch index 79ffabc76f..2faa23a84e 100644 --- a/Spigot-API-Patches/0066-Handle-plugin-prefixes-in-implementation-logging-con.patch +++ b/Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch @@ -1,4 +1,4 @@ -From ffdbb97e00e44a8d86086aee473e45fa54e0b281 Mon Sep 17 00:00:00 2001 +From daf70a992ec9bf7b009aeda61cca417d7930e989 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:14:13 +0200 Subject: [PATCH] Handle plugin prefixes in implementation logging diff --git a/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch similarity index 93% rename from Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch rename to Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch index 167db2a6ea..d7dfbd1603 100644 --- a/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -1,4 +1,4 @@ -From f9af8335c02b21624aeee8ac4cb1909d31bbff56 Mon Sep 17 00:00:00 2001 +From 1a487d66a8be68e6b9f90eec7cc97a56c465fb32 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:33:12 +0200 Subject: [PATCH] Allow plugins to use SLF4J for logging @@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index 44a8b2a5..c176dd7b 100644 +index a58d4424..a771e156 100644 --- a/pom.xml +++ b/pom.xml -@@ -121,6 +121,14 @@ +@@ -114,6 +114,14 @@ compile diff --git a/Spigot-API-Patches/0068-Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/Spigot-API-Patches/0067-Add-workaround-for-plugins-modifying-the-parent-of-t.patch similarity index 98% rename from Spigot-API-Patches/0068-Add-workaround-for-plugins-modifying-the-parent-of-t.patch rename to Spigot-API-Patches/0067-Add-workaround-for-plugins-modifying-the-parent-of-t.patch index dd2b7d9194..b418a93c8b 100644 --- a/Spigot-API-Patches/0068-Add-workaround-for-plugins-modifying-the-parent-of-t.patch +++ b/Spigot-API-Patches/0067-Add-workaround-for-plugins-modifying-the-parent-of-t.patch @@ -1,4 +1,4 @@ -From df23e00168bf3e3ff97132c082e03cc7c1728649 Mon Sep 17 00:00:00 2001 +From f0c22fcef9d528f8b773dbef3bb56968db826396 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 19:41:20 +0200 Subject: [PATCH] Add workaround for plugins modifying the parent of the plugin diff --git a/Spigot-API-Patches/0069-Add-PlayerJumpEvent.patch b/Spigot-API-Patches/0068-Add-PlayerJumpEvent.patch similarity index 98% rename from Spigot-API-Patches/0069-Add-PlayerJumpEvent.patch rename to Spigot-API-Patches/0068-Add-PlayerJumpEvent.patch index a8659d45fd..86bba03d78 100644 --- a/Spigot-API-Patches/0069-Add-PlayerJumpEvent.patch +++ b/Spigot-API-Patches/0068-Add-PlayerJumpEvent.patch @@ -1,4 +1,4 @@ -From 9f1f05d5857e0ce2cd806931ce4db9230c379989 Mon Sep 17 00:00:00 2001 +From 8e15888fcc667e68e2cb6f6d2b2febe36a7b3acd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 28 Sep 2017 17:21:32 -0400 Subject: [PATCH] Add PlayerJumpEvent diff --git a/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch similarity index 97% rename from Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch index 602c3789c0..3ab65581b8 100644 --- a/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch @@ -1,4 +1,4 @@ -From 4a4df5cf1adcaa8a25be2876c550c2ff2a517a67 Mon Sep 17 00:00:00 2001 +From 7505bac8503213c06c401a6196dd1c870060ae75 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 10 Oct 2017 18:44:42 +0200 Subject: [PATCH] Expose client protocol version and virtual host diff --git a/Spigot-API-Patches/0071-Add-PlayerArmorChangeEvent.patch b/Spigot-API-Patches/0070-Add-PlayerArmorChangeEvent.patch similarity index 98% rename from Spigot-API-Patches/0071-Add-PlayerArmorChangeEvent.patch rename to Spigot-API-Patches/0070-Add-PlayerArmorChangeEvent.patch index 30fe3ec790..87882fba9b 100644 --- a/Spigot-API-Patches/0071-Add-PlayerArmorChangeEvent.patch +++ b/Spigot-API-Patches/0070-Add-PlayerArmorChangeEvent.patch @@ -1,4 +1,4 @@ -From e7a01ce105a27097d7f08442b7db2aad136bcd7f Mon Sep 17 00:00:00 2001 +From 4ceb745753f3bb90b932daacc58c3fc104e8a795 Mon Sep 17 00:00:00 2001 From: pkt77 Date: Fri, 10 Nov 2017 23:45:59 -0500 Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/Spigot-API-Patches/0072-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 94% rename from Spigot-API-Patches/0072-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch index cefb98c0fa..59cc90d4f2 100644 --- a/Spigot-API-Patches/0072-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch @@ -1,4 +1,4 @@ -From 1cb04b32f151759c17629a384fa8547a255334a6 Mon Sep 17 00:00:00 2001 +From 9833fee48ce1a110ee78003439deafc84f689c55 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 6 Nov 2017 21:10:01 -0500 Subject: [PATCH] API to get a BlockState without a snapshot diff --git a/Spigot-API-Patches/0073-AsyncTabCompleteEvent.patch b/Spigot-API-Patches/0072-AsyncTabCompleteEvent.patch similarity index 99% rename from Spigot-API-Patches/0073-AsyncTabCompleteEvent.patch rename to Spigot-API-Patches/0072-AsyncTabCompleteEvent.patch index 7713ebb31f..2e07b73b37 100644 --- a/Spigot-API-Patches/0073-AsyncTabCompleteEvent.patch +++ b/Spigot-API-Patches/0072-AsyncTabCompleteEvent.patch @@ -1,4 +1,4 @@ -From c98afebdb0e60908d750e33e33c06ad612ac6434 Mon Sep 17 00:00:00 2001 +From edc4698e52433d90bcaaf7007245e7acad4d52f1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Nov 2017 13:17:09 -0500 Subject: [PATCH] AsyncTabCompleteEvent diff --git a/Spigot-API-Patches/0074-Display-warning-on-deprecated-recipe-API.patch b/Spigot-API-Patches/0073-Display-warning-on-deprecated-recipe-API.patch similarity index 97% rename from Spigot-API-Patches/0074-Display-warning-on-deprecated-recipe-API.patch rename to Spigot-API-Patches/0073-Display-warning-on-deprecated-recipe-API.patch index 046b029460..8fcff4c8b8 100644 --- a/Spigot-API-Patches/0074-Display-warning-on-deprecated-recipe-API.patch +++ b/Spigot-API-Patches/0073-Display-warning-on-deprecated-recipe-API.patch @@ -1,4 +1,4 @@ -From 120a11417f9d48ca7ae42393b88e4751583391ef Mon Sep 17 00:00:00 2001 +From 4fc07207023b06376573d258a25b0fde0dae728e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 9 Dec 2017 12:40:25 -0500 Subject: [PATCH] Display warning on deprecated recipe API diff --git a/Spigot-API-Patches/0075-PlayerPickupExperienceEvent.patch b/Spigot-API-Patches/0074-PlayerPickupExperienceEvent.patch similarity index 98% rename from Spigot-API-Patches/0075-PlayerPickupExperienceEvent.patch rename to Spigot-API-Patches/0074-PlayerPickupExperienceEvent.patch index f04a712c73..580f36fcb6 100644 --- a/Spigot-API-Patches/0075-PlayerPickupExperienceEvent.patch +++ b/Spigot-API-Patches/0074-PlayerPickupExperienceEvent.patch @@ -1,4 +1,4 @@ -From 7583b7eef0eb813aa2a79d214dea15eaab1b6dc7 Mon Sep 17 00:00:00 2001 +From 82123411c5381dec16732f3e729b996f3bfd6baa Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:00:41 -0500 Subject: [PATCH] PlayerPickupExperienceEvent diff --git a/Spigot-API-Patches/0076-ExperienceOrbMergeEvent.patch b/Spigot-API-Patches/0075-ExperienceOrbMergeEvent.patch similarity index 98% rename from Spigot-API-Patches/0076-ExperienceOrbMergeEvent.patch rename to Spigot-API-Patches/0075-ExperienceOrbMergeEvent.patch index be8b56e8aa..127f53b8d7 100644 --- a/Spigot-API-Patches/0076-ExperienceOrbMergeEvent.patch +++ b/Spigot-API-Patches/0075-ExperienceOrbMergeEvent.patch @@ -1,4 +1,4 @@ -From ac086d03f6617bcc272e6d9d7547ed7d1e94c808 Mon Sep 17 00:00:00 2001 +From 690ed111958090f2e13c9a53e6f3296820662330 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:56:24 -0500 Subject: [PATCH] ExperienceOrbMergeEvent diff --git a/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch similarity index 96% rename from Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch index 5e006a0631..51128039ee 100644 --- a/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch @@ -1,4 +1,4 @@ -From a4490dff8b9cf87a9efbc8bbe807b629de2df02b Mon Sep 17 00:00:00 2001 +From 1dce855cf72b840b3c8ca68eef03f47850ea3169 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Dec 2017 17:38:07 -0500 Subject: [PATCH] Ability to apply mending to XP API diff --git a/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch b/Spigot-API-Patches/0077-PreCreatureSpawnEvent.patch similarity index 98% rename from Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch rename to Spigot-API-Patches/0077-PreCreatureSpawnEvent.patch index c05dfa30a5..2c1a5b4898 100644 --- a/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch +++ b/Spigot-API-Patches/0077-PreCreatureSpawnEvent.patch @@ -1,4 +1,4 @@ -From d96e899da4fd2b553148ba115ac5b68ee27952ad Mon Sep 17 00:00:00 2001 +From ed685ade98b7c91a16ea129ed517a8739cdb63d5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 16:59:43 -0500 Subject: [PATCH] PreCreatureSpawnEvent diff --git a/Spigot-API-Patches/0079-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-API-Patches/0078-PlayerNaturallySpawnCreaturesEvent.patch similarity index 97% rename from Spigot-API-Patches/0079-PlayerNaturallySpawnCreaturesEvent.patch rename to Spigot-API-Patches/0078-PlayerNaturallySpawnCreaturesEvent.patch index 81743e5478..d624f1f0d9 100644 --- a/Spigot-API-Patches/0079-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-API-Patches/0078-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From c5154039ff463f366dae9a072e0c014f92eabedb Mon Sep 17 00:00:00 2001 +From eda3592be1d17598e7261a86c55c4377289c2721 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:31:37 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent diff --git a/Spigot-API-Patches/0080-Add-SkullMeta.setPlayerProfile-API.patch b/Spigot-API-Patches/0079-Add-SkullMeta.setPlayerProfile-API.patch similarity index 95% rename from Spigot-API-Patches/0080-Add-SkullMeta.setPlayerProfile-API.patch rename to Spigot-API-Patches/0079-Add-SkullMeta.setPlayerProfile-API.patch index c50c7a0b61..8692bf1192 100644 --- a/Spigot-API-Patches/0080-Add-SkullMeta.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0079-Add-SkullMeta.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 956b151ae68497ff34ebf1f4dc540cc88754f276 Mon Sep 17 00:00:00 2001 +From 0a29a32a10268a1478ad045924aa706d7da5685a Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 19 Jan 2018 00:29:28 -0500 Subject: [PATCH] Add SkullMeta.setPlayerProfile API diff --git a/Spigot-API-Patches/0081-Fill-Profile-Property-Events.patch b/Spigot-API-Patches/0080-Fill-Profile-Property-Events.patch similarity index 98% rename from Spigot-API-Patches/0081-Fill-Profile-Property-Events.patch rename to Spigot-API-Patches/0080-Fill-Profile-Property-Events.patch index c5cf7243f1..559cf7d516 100644 --- a/Spigot-API-Patches/0081-Fill-Profile-Property-Events.patch +++ b/Spigot-API-Patches/0080-Fill-Profile-Property-Events.patch @@ -1,4 +1,4 @@ -From c3ae932f11c94cfa5b46fc5b11b04a283260708f Mon Sep 17 00:00:00 2001 +From d6ace9b5fd0e4dc637739347aefb6bcac808120c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 2 Jan 2018 00:31:08 -0500 Subject: [PATCH] Fill Profile Property Events diff --git a/Spigot-API-Patches/0082-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-API-Patches/0081-PlayerAdvancementCriterionGrantEvent.patch similarity index 97% rename from Spigot-API-Patches/0082-PlayerAdvancementCriterionGrantEvent.patch rename to Spigot-API-Patches/0081-PlayerAdvancementCriterionGrantEvent.patch index 5c6f84294f..3fa960b358 100644 --- a/Spigot-API-Patches/0082-PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-API-Patches/0081-PlayerAdvancementCriterionGrantEvent.patch @@ -1,4 +1,4 @@ -From c74290391d661bac5694c965fdd19e56cb6c9e42 Mon Sep 17 00:00:00 2001 +From 37b0fe3449844988fdd20179130e820106c703c7 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 19 Jan 2018 08:15:14 -0600 Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/Spigot-API-Patches/0083-Add-ArmorStand-Item-Meta.patch b/Spigot-API-Patches/0082-Add-ArmorStand-Item-Meta.patch similarity index 97% rename from Spigot-API-Patches/0083-Add-ArmorStand-Item-Meta.patch rename to Spigot-API-Patches/0082-Add-ArmorStand-Item-Meta.patch index dc184d0c03..49d6ce7d99 100644 --- a/Spigot-API-Patches/0083-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-API-Patches/0082-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From d49f8976711a2afe8d57cf0a546332f8c95df6ad Mon Sep 17 00:00:00 2001 +From c8dfb1c1ac5047c3989ed89c48a202c8e565f4d3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Jan 2018 17:06:24 -0500 Subject: [PATCH] Add ArmorStand Item Meta diff --git a/Spigot-API-Patches/0084-Optimize-Hoppers.patch b/Spigot-API-Patches/0083-Optimize-Hoppers.patch similarity index 96% rename from Spigot-API-Patches/0084-Optimize-Hoppers.patch rename to Spigot-API-Patches/0083-Optimize-Hoppers.patch index bbc05ec122..5c84eddf95 100644 --- a/Spigot-API-Patches/0084-Optimize-Hoppers.patch +++ b/Spigot-API-Patches/0083-Optimize-Hoppers.patch @@ -1,4 +1,4 @@ -From ad00ddb857bd631a9ae93eaabe76c044436f51d1 Mon Sep 17 00:00:00 2001 +From 6c67c5ba8e8ce89bfdd90a1d6264d14ba6a9037b Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 18 Jan 2018 01:00:27 -0500 Subject: [PATCH] Optimize Hoppers diff --git a/Spigot-API-Patches/0085-Tameable-getOwnerUniqueId-API.patch b/Spigot-API-Patches/0084-Tameable-getOwnerUniqueId-API.patch similarity index 94% rename from Spigot-API-Patches/0085-Tameable-getOwnerUniqueId-API.patch rename to Spigot-API-Patches/0084-Tameable-getOwnerUniqueId-API.patch index 2b73ed654b..af75200bbd 100644 --- a/Spigot-API-Patches/0085-Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-API-Patches/0084-Tameable-getOwnerUniqueId-API.patch @@ -1,4 +1,4 @@ -From 49e9ab9b0b462f724ac9f77fbf6dd7c0c319225d Mon Sep 17 00:00:00 2001 +From ba8f331145982701fc0e9dc323c75e54fb5130d2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 24 Feb 2018 00:55:52 -0500 Subject: [PATCH] Tameable#getOwnerUniqueId API diff --git a/Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 96% rename from Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 29a6bbac14..43c1e2acf8 100644 --- a/Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -1,4 +1,4 @@ -From 03d67fdc4e326c291edce8d26e66146c8d1dd111 Mon Sep 17 00:00:00 2001 +From 320c3d77f68b7b02d88d293898e91681cac3c90e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 11:43:30 -0400 Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent diff --git a/Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch b/Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch similarity index 99% rename from Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch rename to Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch index 1dbc2dc12d..7649b3a2d4 100644 --- a/Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch +++ b/Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From e983285e16c5833593ce8aaa6f806219cc08a641 Mon Sep 17 00:00:00 2001 +From 49a9d5dd768670e0cf6bb85313727ad57bc8428e Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:55:38 +0200 Subject: [PATCH] Add extended PaperServerListPingEvent diff --git a/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch similarity index 95% rename from Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch rename to Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch index 966aa8d13b..228fb1610a 100644 --- a/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From f2bc9bc75a61d71a627a18f57f66a965ba99f1c3 Mon Sep 17 00:00:00 2001 +From c2dcfe42c36ad71eafe754ab961333e503857c34 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:28:55 -0400 Subject: [PATCH] Player.setPlayerProfile API diff --git a/Spigot-API-Patches/0089-getPlayerUniqueId-API.patch b/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch similarity index 95% rename from Spigot-API-Patches/0089-getPlayerUniqueId-API.patch rename to Spigot-API-Patches/0088-getPlayerUniqueId-API.patch index d6c19d057a..82f837055a 100644 --- a/Spigot-API-Patches/0089-getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch @@ -1,4 +1,4 @@ -From 4f4d3dad507842141ff628337284fdd59deb9ab8 Mon Sep 17 00:00:00 2001 +From c4f01447191d4f50f00aa4e4975f70ddc174cf34 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 01:39:28 -0400 Subject: [PATCH] getPlayerUniqueId API @@ -34,7 +34,7 @@ index 01a226d9..b389677a 100644 * Gets the plugin manager for interfacing with plugins. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index e7aab4bb..17ac4241 100644 +index 6c96fc14..f5aee1c5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -356,6 +356,18 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/0090-Add-legacy-ping-support-to-PaperServerListPingEvent.patch b/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch similarity index 94% rename from Spigot-API-Patches/0090-Add-legacy-ping-support-to-PaperServerListPingEvent.patch rename to Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch index b480566aff..af5d9d3ee2 100644 --- a/Spigot-API-Patches/0090-Add-legacy-ping-support-to-PaperServerListPingEvent.patch +++ b/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From 1a2033967ffb93634c6d4cd0af4e9d27d5d27b6e Mon Sep 17 00:00:00 2001 +From e730e57eded25def56fa85f4d51aa44cbcc5a135 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 19:30:20 +0200 Subject: [PATCH] Add legacy ping support to PaperServerListPingEvent diff --git a/Spigot-API-Patches/0091-Add-method-to-open-already-placed-sign.patch b/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch similarity index 92% rename from Spigot-API-Patches/0091-Add-method-to-open-already-placed-sign.patch rename to Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch index 41e083f71c..a98088897d 100644 --- a/Spigot-API-Patches/0091-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch @@ -1,4 +1,4 @@ -From 82828abda963ddcea2a0df4c15a8f0d3bb2f20c8 Mon Sep 17 00:00:00 2001 +From b8fbba03fc7abd8c77f063e41fc16537c4117102 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 1 Apr 2018 02:28:43 +0300 Subject: [PATCH] Add method to open already placed sign diff --git a/Spigot-API-Patches/0092-Add-version-history-to-version-command.patch b/Spigot-API-Patches/0091-Add-version-history-to-version-command.patch similarity index 99% rename from Spigot-API-Patches/0092-Add-version-history-to-version-command.patch rename to Spigot-API-Patches/0091-Add-version-history-to-version-command.patch index a85be8779b..4077b0b100 100644 --- a/Spigot-API-Patches/0092-Add-version-history-to-version-command.patch +++ b/Spigot-API-Patches/0091-Add-version-history-to-version-command.patch @@ -1,4 +1,4 @@ -From f4043d993253dd4c573166dd6cc91347bf85bbcf Mon Sep 17 00:00:00 2001 +From ec7ab0fda0b8db766c75b88b151228cd8a7f99e6 Mon Sep 17 00:00:00 2001 From: Kyle Wood Date: Thu, 1 Mar 2018 19:37:52 -0600 Subject: [PATCH] Add version history to version command diff --git a/Spigot-API-Patches/0093-Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch similarity index 99% rename from Spigot-API-Patches/0093-Add-Ban-Methods-to-Player-Objects.patch rename to Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch index 4d98eb9bef..2c16c9e32e 100644 --- a/Spigot-API-Patches/0093-Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch @@ -1,4 +1,4 @@ -From 6514d05e7994ca64d84829f5ea5f08881d896143 Mon Sep 17 00:00:00 2001 +From 4b6fe9261d73d066a8b0a10b1205c3a8db3f4e25 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Apr 2018 10:28:50 -0400 Subject: [PATCH] Add Ban Methods to Player Objects diff --git a/Spigot-API-Patches/0094-EndermanEscapeEvent.patch b/Spigot-API-Patches/0093-EndermanEscapeEvent.patch similarity index 97% rename from Spigot-API-Patches/0094-EndermanEscapeEvent.patch rename to Spigot-API-Patches/0093-EndermanEscapeEvent.patch index ed8c92b565..9248bc08d0 100644 --- a/Spigot-API-Patches/0094-EndermanEscapeEvent.patch +++ b/Spigot-API-Patches/0093-EndermanEscapeEvent.patch @@ -1,4 +1,4 @@ -From f6de564e86fa93c0f80a7f13fea4c725fde220a7 Mon Sep 17 00:00:00 2001 +From e6e2f854d47264daa82dac76e0e9b50e1d048112 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:14:30 -0400 Subject: [PATCH] EndermanEscapeEvent diff --git a/Spigot-API-Patches/0095-Enderman.teleportRandomly.patch b/Spigot-API-Patches/0094-Enderman.teleportRandomly.patch similarity index 93% rename from Spigot-API-Patches/0095-Enderman.teleportRandomly.patch rename to Spigot-API-Patches/0094-Enderman.teleportRandomly.patch index 66ffe6baaa..16e901302f 100644 --- a/Spigot-API-Patches/0095-Enderman.teleportRandomly.patch +++ b/Spigot-API-Patches/0094-Enderman.teleportRandomly.patch @@ -1,4 +1,4 @@ -From 1ec75ba436761bb918589563fcd3b71d19846ce0 Mon Sep 17 00:00:00 2001 +From d39ff6984ee7da570e62149453cc739c70608e7d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:29:15 -0400 Subject: [PATCH] Enderman.teleportRandomly() diff --git a/Spigot-API-Patches/0096-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch similarity index 99% rename from Spigot-API-Patches/0096-Additional-world.getNearbyEntities-API-s.patch rename to Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch index 25ba151fa2..b23470b827 100644 --- a/Spigot-API-Patches/0096-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch @@ -1,4 +1,4 @@ -From 684b4b13045cf9a8ed1c8246539feb43afd55cee Mon Sep 17 00:00:00 2001 +From abf7402bc4ecece3ae26cdc95077e1948f349189 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 17:55:28 -0400 Subject: [PATCH] Additional world.getNearbyEntities API's diff --git a/Spigot-API-Patches/0097-Location.isChunkLoaded-API.patch b/Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch similarity index 91% rename from Spigot-API-Patches/0097-Location.isChunkLoaded-API.patch rename to Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch index db72eb50fc..592318344c 100644 --- a/Spigot-API-Patches/0097-Location.isChunkLoaded-API.patch +++ b/Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch @@ -1,4 +1,4 @@ -From 5d998b54fbc373ae8d50dd5c19ddb64cd5db3e2c Mon Sep 17 00:00:00 2001 +From d6390344700e8736df3210e7fe2b54d942dd0b3f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 19:27:31 -0400 Subject: [PATCH] Location.isChunkLoaded() API diff --git a/Spigot-API-Patches/0098-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 99% rename from Spigot-API-Patches/0098-Expand-World.spawnParticle-API-and-add-Builder.patch rename to Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch index 537a9e5072..7b94dd6e1c 100644 --- a/Spigot-API-Patches/0098-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From 16fae4609fea741833ed1b7936b260fc18628cee Mon Sep 17 00:00:00 2001 +From 8c9cae0f00a34d7db7987f0de3e348143fca2559 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 29 Aug 2017 23:58:48 -0400 Subject: [PATCH] Expand World.spawnParticle API and add Builder diff --git a/Spigot-API-Patches/0099-EndermanAttackPlayerEvent.patch b/Spigot-API-Patches/0098-EndermanAttackPlayerEvent.patch similarity index 98% rename from Spigot-API-Patches/0099-EndermanAttackPlayerEvent.patch rename to Spigot-API-Patches/0098-EndermanAttackPlayerEvent.patch index 0846cc6edf..5d94b9a560 100644 --- a/Spigot-API-Patches/0099-EndermanAttackPlayerEvent.patch +++ b/Spigot-API-Patches/0098-EndermanAttackPlayerEvent.patch @@ -1,4 +1,4 @@ -From 6c6a2ce230f36f7b42b89b2ba7be407dc28c3a3c Mon Sep 17 00:00:00 2001 +From 859fbcc49fee34e570ef93b1cedeea6129c923d7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 May 2018 20:17:44 -0400 Subject: [PATCH] EndermanAttackPlayerEvent diff --git a/Spigot-API-Patches/0100-Close-Plugin-Class-Loaders-on-Disable.patch b/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch similarity index 99% rename from Spigot-API-Patches/0100-Close-Plugin-Class-Loaders-on-Disable.patch rename to Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch index 4025c46b3d..858710131e 100644 --- a/Spigot-API-Patches/0100-Close-Plugin-Class-Loaders-on-Disable.patch +++ b/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch @@ -1,4 +1,4 @@ -From 7fde4c2352b99a7f57694bdae89f691ecc656c68 Mon Sep 17 00:00:00 2001 +From 9e6d679a2e1a3956d445cf4a45b317dafd5ab8b0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 May 2018 21:33:35 -0400 Subject: [PATCH] Close Plugin Class Loaders on Disable diff --git a/Spigot-API-Patches/0101-WitchConsumePotionEvent.patch b/Spigot-API-Patches/0100-WitchConsumePotionEvent.patch similarity index 98% rename from Spigot-API-Patches/0101-WitchConsumePotionEvent.patch rename to Spigot-API-Patches/0100-WitchConsumePotionEvent.patch index efe6ff9b09..d921808430 100644 --- a/Spigot-API-Patches/0101-WitchConsumePotionEvent.patch +++ b/Spigot-API-Patches/0100-WitchConsumePotionEvent.patch @@ -1,4 +1,4 @@ -From aad0ca777756d4b341f053bd70ffce06d04b3206 Mon Sep 17 00:00:00 2001 +From 4c4ed4d357e2ee60585351f515c1e2ef82754042 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 May 2018 20:26:16 -0400 Subject: [PATCH] WitchConsumePotionEvent diff --git a/Spigot-API-Patches/0102-WitchThrowPotionEvent.patch b/Spigot-API-Patches/0101-WitchThrowPotionEvent.patch similarity index 97% rename from Spigot-API-Patches/0102-WitchThrowPotionEvent.patch rename to Spigot-API-Patches/0101-WitchThrowPotionEvent.patch index a541c585e2..6c353f8b3a 100644 --- a/Spigot-API-Patches/0102-WitchThrowPotionEvent.patch +++ b/Spigot-API-Patches/0101-WitchThrowPotionEvent.patch @@ -1,4 +1,4 @@ -From 541ae193668500d017ebe33cda73a44121ee3455 Mon Sep 17 00:00:00 2001 +From ec8448715301fcfc22907e25053ce24046112ec7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 May 2018 20:39:09 -0400 Subject: [PATCH] WitchThrowPotionEvent diff --git a/Spigot-API-Patches/0103-Location.toBlockLocation-toCenterLocation.patch b/Spigot-API-Patches/0102-Location.toBlockLocation-toCenterLocation.patch similarity index 95% rename from Spigot-API-Patches/0103-Location.toBlockLocation-toCenterLocation.patch rename to Spigot-API-Patches/0102-Location.toBlockLocation-toCenterLocation.patch index 63fdf01fea..95d0a1f7b7 100644 --- a/Spigot-API-Patches/0103-Location.toBlockLocation-toCenterLocation.patch +++ b/Spigot-API-Patches/0102-Location.toBlockLocation-toCenterLocation.patch @@ -1,4 +1,4 @@ -From a6bcc9478c95e056ec412ed1317f4d597b0a7017 Mon Sep 17 00:00:00 2001 +From 6b5682f52304efe35982bf2d15e3d9a25b840b66 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 24 May 2018 21:01:13 -0400 Subject: [PATCH] Location.toBlockLocation/toCenterLocation() diff --git a/Spigot-API-Patches/0104-PotionEffect-clone-methods.patch b/Spigot-API-Patches/0103-PotionEffect-clone-methods.patch similarity index 96% rename from Spigot-API-Patches/0104-PotionEffect-clone-methods.patch rename to Spigot-API-Patches/0103-PotionEffect-clone-methods.patch index e3c0c81d48..85abfd11bc 100644 --- a/Spigot-API-Patches/0104-PotionEffect-clone-methods.patch +++ b/Spigot-API-Patches/0103-PotionEffect-clone-methods.patch @@ -1,4 +1,4 @@ -From cc7e0cbb65f4290788d5f4864898611eb01d38ca Mon Sep 17 00:00:00 2001 +From 4855d23362468c0d6936adad449d9b43a4a8c80d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Jun 2018 04:10:13 -0400 Subject: [PATCH] PotionEffect clone methods diff --git a/Spigot-API-Patches/0105-WitchReadyPotionEvent.patch b/Spigot-API-Patches/0104-WitchReadyPotionEvent.patch similarity index 97% rename from Spigot-API-Patches/0105-WitchReadyPotionEvent.patch rename to Spigot-API-Patches/0104-WitchReadyPotionEvent.patch index 3665efcdaf..7fa0f72acd 100644 --- a/Spigot-API-Patches/0105-WitchReadyPotionEvent.patch +++ b/Spigot-API-Patches/0104-WitchReadyPotionEvent.patch @@ -1,4 +1,4 @@ -From aa70385f1487c465957bf670526c427fe9a31f57 Mon Sep 17 00:00:00 2001 +From 148d9f989050de122ceed7cbc9ee8f3a74affc28 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 22:47:08 -0400 Subject: [PATCH] WitchReadyPotionEvent diff --git a/Spigot-API-Patches/0106-ItemStack-getMaxItemUseDuration.patch b/Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch similarity index 84% rename from Spigot-API-Patches/0106-ItemStack-getMaxItemUseDuration.patch rename to Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch index c8999a1a6c..2982ab4320 100644 --- a/Spigot-API-Patches/0106-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch @@ -1,4 +1,4 @@ -From e336f7984ef9c18c49bfe743e7f33e9201c4fc24 Mon Sep 17 00:00:00 2001 +From 68e948eef9e90c001f168f58660c61ca3bbee305 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 22:59:50 -0400 Subject: [PATCH] ItemStack#getMaxItemUseDuration @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index ca7a958f..a240311e 100644 +index e52a39ec..84a399e0 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -574,5 +574,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -582,5 +582,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { public String getI18NDisplayName() { return Bukkit.getServer().getItemFactory().getI18NDisplayName(this); } diff --git a/Spigot-API-Patches/0107-Add-EntityTeleportEndGatewayEvent.patch b/Spigot-API-Patches/0106-Add-EntityTeleportEndGatewayEvent.patch similarity index 95% rename from Spigot-API-Patches/0107-Add-EntityTeleportEndGatewayEvent.patch rename to Spigot-API-Patches/0106-Add-EntityTeleportEndGatewayEvent.patch index 09be9b67fe..f36760f400 100644 --- a/Spigot-API-Patches/0107-Add-EntityTeleportEndGatewayEvent.patch +++ b/Spigot-API-Patches/0106-Add-EntityTeleportEndGatewayEvent.patch @@ -1,4 +1,4 @@ -From 7886764d86b2cbb9c33aaa5b57d103adf51482ba Mon Sep 17 00:00:00 2001 +From cf716be25a5b5aeea97c416dcc32c03d4572b7d2 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 9 Jun 2018 13:08:21 +0100 Subject: [PATCH] Add EntityTeleportEndGatewayEvent diff --git a/Spigot-API-Patches/0108-Add-SentientNPC-Interface-to-Entities.patch b/Spigot-API-Patches/0107-Add-SentientNPC-Interface-to-Entities.patch similarity index 99% rename from Spigot-API-Patches/0108-Add-SentientNPC-Interface-to-Entities.patch rename to Spigot-API-Patches/0107-Add-SentientNPC-Interface-to-Entities.patch index 587b69b5f4..91d731a843 100644 --- a/Spigot-API-Patches/0108-Add-SentientNPC-Interface-to-Entities.patch +++ b/Spigot-API-Patches/0107-Add-SentientNPC-Interface-to-Entities.patch @@ -1,4 +1,4 @@ -From ae233d1060a039c57855d6b48ad29ee9f16534e5 Mon Sep 17 00:00:00 2001 +From ea3a8f5ed1c5ca4b73d03342500ca257864570f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Jun 2018 13:41:00 -0400 Subject: [PATCH] Add SentientNPC Interface to Entities diff --git a/Spigot-API-Patches/0109-Make-shield-blocking-delay-configurable.patch b/Spigot-API-Patches/0108-Make-shield-blocking-delay-configurable.patch similarity index 94% rename from Spigot-API-Patches/0109-Make-shield-blocking-delay-configurable.patch rename to Spigot-API-Patches/0108-Make-shield-blocking-delay-configurable.patch index 8b34c8407e..d1e2fac6ee 100644 --- a/Spigot-API-Patches/0109-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-API-Patches/0108-Make-shield-blocking-delay-configurable.patch @@ -1,4 +1,4 @@ -From af11f7559e3f9bf8f9862caecff1e2fa97495ae3 Mon Sep 17 00:00:00 2001 +From 047d17dce86b980dda8c0c0ec7220d90c321cd92 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 16 Jun 2018 01:17:39 -0500 Subject: [PATCH] Make shield blocking delay configurable diff --git a/Spigot-API-Patches/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-API-Patches/0109-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch similarity index 96% rename from Spigot-API-Patches/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch rename to Spigot-API-Patches/0109-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index dc61a1ee4e..e98fe3ce6c 100644 --- a/Spigot-API-Patches/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-API-Patches/0109-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -1,4 +1,4 @@ -From 66bb665b7640a43ad6eeca4479360a07b3be11d3 Mon Sep 17 00:00:00 2001 +From 15994adb8231b553c5bd352326141857af8bfb25 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 15 Jun 2013 19:52:04 -0400 Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API diff --git a/Spigot-API-Patches/0111-Add-getNearbyXXX-methods-to-Location.patch b/Spigot-API-Patches/0110-Add-getNearbyXXX-methods-to-Location.patch similarity index 99% rename from Spigot-API-Patches/0111-Add-getNearbyXXX-methods-to-Location.patch rename to Spigot-API-Patches/0110-Add-getNearbyXXX-methods-to-Location.patch index 75cd402a7d..d66bf5f7c9 100644 --- a/Spigot-API-Patches/0111-Add-getNearbyXXX-methods-to-Location.patch +++ b/Spigot-API-Patches/0110-Add-getNearbyXXX-methods-to-Location.patch @@ -1,4 +1,4 @@ -From 440009ac512a6ce127c556e999cea1e45804eab8 Mon Sep 17 00:00:00 2001 +From 557a8969ea196e6da7dea055516a9b66c30ec492 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 18 Jun 2018 00:41:46 -0500 Subject: [PATCH] Add "getNearbyXXX" methods to Location diff --git a/Spigot-API-Patches/0112-PlayerReadyArrowEvent.patch b/Spigot-API-Patches/0111-PlayerReadyArrowEvent.patch similarity index 98% rename from Spigot-API-Patches/0112-PlayerReadyArrowEvent.patch rename to Spigot-API-Patches/0111-PlayerReadyArrowEvent.patch index d915c073be..06eceec300 100644 --- a/Spigot-API-Patches/0112-PlayerReadyArrowEvent.patch +++ b/Spigot-API-Patches/0111-PlayerReadyArrowEvent.patch @@ -1,4 +1,4 @@ -From 3b93e8bc7dc2bbdd6056c88375614f626c24ac3b Mon Sep 17 00:00:00 2001 +From 3c3e3c01d2d70fd004685f314dc5d222cdf6ae96 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 18 Jun 2018 01:09:27 -0400 Subject: [PATCH] PlayerReadyArrowEvent diff --git a/Spigot-API-Patches/0113-Add-EntityKnockbackByEntityEvent.patch b/Spigot-API-Patches/0112-Add-EntityKnockbackByEntityEvent.patch similarity index 97% rename from Spigot-API-Patches/0113-Add-EntityKnockbackByEntityEvent.patch rename to Spigot-API-Patches/0112-Add-EntityKnockbackByEntityEvent.patch index e89370a22b..8aab51ca81 100644 --- a/Spigot-API-Patches/0113-Add-EntityKnockbackByEntityEvent.patch +++ b/Spigot-API-Patches/0112-Add-EntityKnockbackByEntityEvent.patch @@ -1,4 +1,4 @@ -From 73104eda9ba4087e6bf0460769ae4c6894bb6740 Mon Sep 17 00:00:00 2001 +From eaa1c2e41c62b988a2617ebc76bf905450f2222e Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Mon, 18 Jun 2018 15:40:39 +0200 Subject: [PATCH] Add EntityKnockbackByEntityEvent diff --git a/Spigot-API-Patches/0114-Expand-Explosions-API.patch b/Spigot-API-Patches/0113-Expand-Explosions-API.patch similarity index 99% rename from Spigot-API-Patches/0114-Expand-Explosions-API.patch rename to Spigot-API-Patches/0113-Expand-Explosions-API.patch index eb2c5e7c15..f510261fc0 100644 --- a/Spigot-API-Patches/0114-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0113-Expand-Explosions-API.patch @@ -1,4 +1,4 @@ -From 88204b64c1d28285d937ec1c7a85dd9e4e2d4a83 Mon Sep 17 00:00:00 2001 +From 43407287b576901c8c0706ff95904f8399a80d5f Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:24:42 -0500 Subject: [PATCH] Expand Explosions API diff --git a/Spigot-API-Patches/0115-ItemStack-API-additions-for-quantity-flags-lore.patch b/Spigot-API-Patches/0114-ItemStack-API-additions-for-quantity-flags-lore.patch similarity index 96% rename from Spigot-API-Patches/0115-ItemStack-API-additions-for-quantity-flags-lore.patch rename to Spigot-API-Patches/0114-ItemStack-API-additions-for-quantity-flags-lore.patch index f2cfed82fc..d2c8b93b14 100644 --- a/Spigot-API-Patches/0115-ItemStack-API-additions-for-quantity-flags-lore.patch +++ b/Spigot-API-Patches/0114-ItemStack-API-additions-for-quantity-flags-lore.patch @@ -1,11 +1,11 @@ -From 656a16565559bb80edf1f4cf49f007132c16650e Mon Sep 17 00:00:00 2001 +From 356af878d4effe5adb4fbdc3bfc21128a693a7b0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 22 Jun 2018 22:59:18 -0400 Subject: [PATCH] ItemStack API additions for quantity/flags/lore diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index a240311e..c5befd8c 100644 +index 84a399e0..4a27f4fc 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -2,7 +2,9 @@ package org.bukkit.inventory; @@ -27,7 +27,7 @@ index a240311e..c5befd8c 100644 /** * Represents a stack of items */ -@@ -582,5 +586,133 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -590,5 +594,133 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { // Requires access to NMS return ensureServerConversions().getMaxItemUseDuration(); } diff --git a/Spigot-API-Patches/0116-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-API-Patches/0115-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 96% rename from Spigot-API-Patches/0116-LivingEntity-Hand-Raised-Item-Use-API.patch rename to Spigot-API-Patches/0115-LivingEntity-Hand-Raised-Item-Use-API.patch index a4bc45cfbb..cffdeb9509 100644 --- a/Spigot-API-Patches/0116-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-API-Patches/0115-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -1,4 +1,4 @@ -From cf99646a663b14d01ef54e22020b8faa8fa555f0 Mon Sep 17 00:00:00 2001 +From 04b67e12230f3c0feea220732944b891d5ca71c2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Jun 2018 00:19:19 -0400 Subject: [PATCH] LivingEntity Hand Raised/Item Use API diff --git a/Spigot-API-Patches/0117-RangedEntity-API.patch b/Spigot-API-Patches/0116-RangedEntity-API.patch similarity index 98% rename from Spigot-API-Patches/0117-RangedEntity-API.patch rename to Spigot-API-Patches/0116-RangedEntity-API.patch index 96d82b9ddf..3c6f27e262 100644 --- a/Spigot-API-Patches/0117-RangedEntity-API.patch +++ b/Spigot-API-Patches/0116-RangedEntity-API.patch @@ -1,4 +1,4 @@ -From 3dfec6aa624fc7663fa0d677c115efe822c05171 Mon Sep 17 00:00:00 2001 +From cf0088878648dbcf7c0a341569456b3b20ddba42 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 26 Jun 2018 21:34:40 -0400 Subject: [PATCH] RangedEntity API diff --git a/Spigot-API-Patches/0118-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-API-Patches/0117-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch similarity index 96% rename from Spigot-API-Patches/0118-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch rename to Spigot-API-Patches/0117-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch index d91a09c712..afc86048ed 100644 --- a/Spigot-API-Patches/0118-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ b/Spigot-API-Patches/0117-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch @@ -1,4 +1,4 @@ -From 1026157cdfadb0aa749625df4fa4bd1c7dfd2a2c Mon Sep 17 00:00:00 2001 +From daa7931f24c915c80bcd1783f63ef11db9a0f232 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 30 Jun 2018 05:45:04 +0200 Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the diff --git a/Spigot-API-Patches/0119-Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/0118-Add-World.getEntity-UUID-API.patch similarity index 93% rename from Spigot-API-Patches/0119-Add-World.getEntity-UUID-API.patch rename to Spigot-API-Patches/0118-Add-World.getEntity-UUID-API.patch index b3ef285261..f063008e22 100644 --- a/Spigot-API-Patches/0119-Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/0118-Add-World.getEntity-UUID-API.patch @@ -1,4 +1,4 @@ -From e4b5d675c5e8bb6aab767b25b2cf9ef27476b655 Mon Sep 17 00:00:00 2001 +From afba86e7d21df889c5255fc1fdd9404bed8f9202 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 3 Jul 2018 16:07:16 +0200 Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/Spigot-API-Patches/0120-InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/0119-InventoryCloseEvent-Reason-API.patch similarity index 97% rename from Spigot-API-Patches/0120-InventoryCloseEvent-Reason-API.patch rename to Spigot-API-Patches/0119-InventoryCloseEvent-Reason-API.patch index 206164d44a..0372d7c614 100644 --- a/Spigot-API-Patches/0120-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-API-Patches/0119-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From 4deb6973896972f14c56e83e4ef64ca3beee04e9 Mon Sep 17 00:00:00 2001 +From f9e5dde76a9d7df4e99e9677c7a09a8fbca3711b Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:52:52 -0400 Subject: [PATCH] InventoryCloseEvent Reason API diff --git a/Spigot-API-Patches/0121-Entity-getChunk-API.patch b/Spigot-API-Patches/0120-Entity-getChunk-API.patch similarity index 93% rename from Spigot-API-Patches/0121-Entity-getChunk-API.patch rename to Spigot-API-Patches/0120-Entity-getChunk-API.patch index 071d8d7175..6c79e5691f 100644 --- a/Spigot-API-Patches/0121-Entity-getChunk-API.patch +++ b/Spigot-API-Patches/0120-Entity-getChunk-API.patch @@ -1,4 +1,4 @@ -From 5a3a031ef1c7d8f9023f94a7c514f210afe0c1c4 Mon Sep 17 00:00:00 2001 +From 3d06d7bea98b884dbda0cf95be3494af6c509546 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 02:25:48 -0400 Subject: [PATCH] Entity#getChunk API diff --git a/Spigot-API-Patches/0122-Vex-getOwner-API.patch b/Spigot-API-Patches/0121-Vex-getOwner-API.patch similarity index 92% rename from Spigot-API-Patches/0122-Vex-getOwner-API.patch rename to Spigot-API-Patches/0121-Vex-getOwner-API.patch index b2be59228c..ffb1a88278 100644 --- a/Spigot-API-Patches/0122-Vex-getOwner-API.patch +++ b/Spigot-API-Patches/0121-Vex-getOwner-API.patch @@ -1,4 +1,4 @@ -From 9e4176114616d5b73fa13fcb5736cc5d2ff5bc52 Mon Sep 17 00:00:00 2001 +From 9701c04abd7b6530433049cf90502e7569f70ab0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:29:21 -0400 Subject: [PATCH] Vex#getOwner API diff --git a/Spigot-API-Patches/0123-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0122-Add-an-asterisk-to-legacy-API-plugins.patch similarity index 97% rename from Spigot-API-Patches/0123-Add-an-asterisk-to-legacy-API-plugins.patch rename to Spigot-API-Patches/0122-Add-an-asterisk-to-legacy-API-plugins.patch index 0403a37fbc..58d44933ad 100644 --- a/Spigot-API-Patches/0123-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0122-Add-an-asterisk-to-legacy-API-plugins.patch @@ -1,4 +1,4 @@ -From a91f4cbb8c66889302966caa04d7fbbd3ad265cc Mon Sep 17 00:00:00 2001 +From d7ad6275b2c4d850e971e43d3d3fe0dbeed04cea Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 19 Jul 2018 15:07:02 -0500 Subject: [PATCH] Add an asterisk to legacy API plugins @@ -62,5 +62,5 @@ index 3cff01b6..2b9aad0a 100644 JavaPlugin jPlugin = (JavaPlugin) plugin; -- -2.17.1 +2.18.0 diff --git a/Spigot-API-Patches/0124-Use-specific-1.13-versioning-branch-build-name.patch b/Spigot-API-Patches/0123-Use-specific-1.13-versioning-branch-build-name.patch similarity index 97% rename from Spigot-API-Patches/0124-Use-specific-1.13-versioning-branch-build-name.patch rename to Spigot-API-Patches/0123-Use-specific-1.13-versioning-branch-build-name.patch index 38578e7b00..d2d9fa7379 100644 --- a/Spigot-API-Patches/0124-Use-specific-1.13-versioning-branch-build-name.patch +++ b/Spigot-API-Patches/0123-Use-specific-1.13-versioning-branch-build-name.patch @@ -1,4 +1,4 @@ -From 07605531827fe881188f2dc08385c6a82b23215f Mon Sep 17 00:00:00 2001 +From 104243eb412fa6c00f206d6ea2102ffa5090ee74 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 19 Jul 2018 17:32:47 -0500 Subject: [PATCH] Use specific 1.13 versioning branch/build name @@ -40,5 +40,5 @@ index c45faf4c..7041085c 100644 if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) return -2; // Unknown commit try ( -- -2.17.1 +2.18.0 diff --git a/removed/api/0006-Add-async-chunk-load-API.patch b/Spigot-API-Patches/0124-Add-async-chunk-load-API.patch similarity index 95% rename from removed/api/0006-Add-async-chunk-load-API.patch rename to Spigot-API-Patches/0124-Add-async-chunk-load-API.patch index f9c375098b..02ac5b36aa 100644 --- a/removed/api/0006-Add-async-chunk-load-API.patch +++ b/Spigot-API-Patches/0124-Add-async-chunk-load-API.patch @@ -1,14 +1,14 @@ -From 2ad2461cb05bc1fa8091df72d18dc4c6bc7e363e Mon Sep 17 00:00:00 2001 +From 2b95e12f292000685d4475a372dbcb4e2c275db2 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 +index 550c26be..121033e9 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 { +@@ -137,6 +137,78 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public Chunk getChunkAt(Block block); diff --git a/Spigot-API-Patches/0125-EnderDragon-Events.patch b/Spigot-API-Patches/0125-EnderDragon-Events.patch new file mode 100644 index 0000000000..404e7ecac7 --- /dev/null +++ b/Spigot-API-Patches/0125-EnderDragon-Events.patch @@ -0,0 +1,209 @@ +From f43d349299401f7db1e573918c8d2ca82d4ac422 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:51:05 -0500 +Subject: [PATCH] EnderDragon Events + + +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java +new file mode 100644 +index 00000000..2ac57af3 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java +@@ -0,0 +1,70 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.AreaEffectCloud; ++import org.bukkit.entity.DragonFireball; ++import org.bukkit.entity.LivingEntity; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++import java.util.Collection; ++ ++/** ++ * Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud ++ */ ++public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable { ++ private final Collection targets; ++ private final AreaEffectCloud areaEffectCloud; ++ ++ public EnderDragonFireballHitEvent(DragonFireball fireball, Collection targets, AreaEffectCloud areaEffectCloud) { ++ super(fireball); ++ this.targets = targets; ++ this.areaEffectCloud = areaEffectCloud; ++ } ++ ++ /** ++ * The fireball involved in this event ++ */ ++ @Override ++ public DragonFireball getEntity() { ++ return (DragonFireball) super.getEntity(); ++ } ++ ++ /** ++ * The living entities hit by fireball ++ *

++ * May be null if no entities were hit ++ */ ++ public Collection getTargets() { ++ return targets; ++ } ++ ++ /** ++ * The area effect cloud spawned in this collision ++ */ ++ public AreaEffectCloud getAreaEffectCloud() { ++ return areaEffectCloud; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java +new file mode 100644 +index 00000000..59f87633 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java +@@ -0,0 +1,56 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.AreaEffectCloud; ++import org.bukkit.entity.EnderDragon; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++/** ++ * Fired when an EnderDragon spawns an AreaEffectCloud by shooting flames ++ */ ++public class EnderDragonFlameEvent extends EntityEvent implements Cancellable { ++ private final AreaEffectCloud areaEffectCloud; ++ ++ public EnderDragonFlameEvent(EnderDragon enderDragon, AreaEffectCloud areaEffectCloud) { ++ super(enderDragon); ++ this.areaEffectCloud = areaEffectCloud; ++ } ++ ++ /** ++ * The enderdragon involved in this event ++ */ ++ @Override ++ public EnderDragon getEntity() { ++ return (EnderDragon) super.getEntity(); ++ } ++ ++ /** ++ * The area effect cloud spawned in this collision ++ */ ++ public AreaEffectCloud getAreaEffectCloud() { ++ return areaEffectCloud; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java +new file mode 100644 +index 00000000..296ae244 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java +@@ -0,0 +1,56 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.DragonFireball; ++import org.bukkit.entity.EnderDragon; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++/** ++ * Fired when an EnderDragon shoots a fireball ++ */ ++public class EnderDragonShootFireballEvent extends EntityEvent implements Cancellable { ++ private final DragonFireball fireball; ++ ++ public EnderDragonShootFireballEvent(EnderDragon entity, DragonFireball fireball) { ++ super(entity); ++ this.fireball = fireball; ++ } ++ ++ /** ++ * The enderdragon shooting the fireball ++ */ ++ @Override ++ public EnderDragon getEntity() { ++ return (EnderDragon) super.getEntity(); ++ } ++ ++ /** ++ * The fireball being shot ++ */ ++ public DragonFireball getFireball() { ++ return fireball; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +-- +2.11.0 + diff --git a/Spigot-API-Patches/0125-PlayerElytraBoostEvent.patch b/Spigot-API-Patches/0125-PlayerElytraBoostEvent.patch new file mode 100644 index 0000000000..d2970da16d --- /dev/null +++ b/Spigot-API-Patches/0125-PlayerElytraBoostEvent.patch @@ -0,0 +1,95 @@ +From f0c0d6c6182c1c89de1125c0c2f22559724cfaf5 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:59:53 -0500 +Subject: [PATCH] PlayerElytraBoostEvent + + +diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java +new file mode 100644 +index 00000000..cecb2182 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java +@@ -0,0 +1,80 @@ ++package com.destroystokyo.paper.event.player; ++ ++import org.bukkit.entity.Firework; ++import org.bukkit.entity.Player; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.player.PlayerEvent; ++import org.bukkit.inventory.ItemStack; ++ ++/** ++ * Fired when a player boosts elytra flight with a firework ++ */ ++public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable { ++ private static final HandlerList handlers = new HandlerList(); ++ private boolean cancelled = false; ++ private final ItemStack itemStack; ++ private Firework firework; ++ private boolean consume = true; ++ ++ public PlayerElytraBoostEvent(Player player, ItemStack itemStack, Firework firework) { ++ super(player); ++ this.itemStack = itemStack; ++ this.firework = firework; ++ } ++ ++ /** ++ * Get the firework itemstack used ++ * ++ * @return ItemStack of firework ++ */ ++ public ItemStack getItemStack() { ++ return itemStack; ++ } ++ ++ /** ++ * Get the firework entity that was spawned ++ * ++ * @return Firework entity ++ */ ++ public Firework getFirework() { ++ return firework; ++ } ++ ++ /** ++ * Get whether to consume the firework or not ++ * ++ * @return True to consume ++ */ ++ public boolean shouldConsume() { ++ return consume; ++ } ++ ++ /** ++ * Set whether to consume the firework or not ++ * ++ * @param consume True to consume ++ */ ++ public void setShouldConsume(boolean consume) { ++ this.consume = consume; ++ } ++ ++ @Override ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +-- +2.11.0 + diff --git a/Spigot-API-Patches/0126-Expand-Location-Manipulation-API.patch b/Spigot-API-Patches/0126-Expand-Location-Manipulation-API.patch new file mode 100644 index 0000000000..8d0ca39897 --- /dev/null +++ b/Spigot-API-Patches/0126-Expand-Location-Manipulation-API.patch @@ -0,0 +1,66 @@ +From d3916598abd6d23f6b2e332cd987d20e80ad30f1 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 25 Jul 2018 01:36:07 -0400 +Subject: [PATCH] Expand Location Manipulation API + +Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z); + +diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java +index d0d86e1a..253f0c2d 100644 +--- a/src/main/java/org/bukkit/Location.java ++++ b/src/main/java/org/bukkit/Location.java +@@ -503,6 +503,51 @@ public class Location implements Cloneable, ConfigurationSerializable { + public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper + + // Paper start ++ ++ /** ++ * Sets the position of this Location and returns itself ++ * ++ * This mutates this object, clone first. ++ * @param x X coordinate ++ * @param y Y coordinate ++ * @param z Z coordinate ++ * @return self (not cloned) ++ */ ++ public Location set(double x, double y, double z) { ++ this.x = x; ++ this.y = y; ++ this.z = z; ++ return this; ++ } ++ ++ /** ++ * Takes the x/y/z from base and adds the specified x/y/z to it and returns self ++ * ++ * This mutates this object, clone first. ++ * @param base The base coordinate to modify ++ * @param x X coordinate to add to base ++ * @param y Y coordinate to add to base ++ * @param z Z coordinate to add to base ++ * @return self (not cloned) ++ */ ++ public Location add(Location base, double x, double y, double z) { ++ return this.set(base.x + x, base.y + y, base.z + z); ++ } ++ ++ /** ++ * Takes the x/y/z from base and subtracts the specified x/y/z to it and returns self ++ * ++ * This mutates this object, clone first. ++ * @param base The base coordinate to modify ++ * @param x X coordinate to subtract from base ++ * @param y Y coordinate to subtract from base ++ * @param z Z coordinate to subtract from base ++ * @return self (not cloned) ++ */ ++ public Location subtract(Location base, double x, double y, double z) { ++ return this.set(base.x - x, base.y - y, base.z - z); ++ } ++ + /** + * @return A new location where X/Y/Z are on the Block location (integer value of X/Y/Z) + */ +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 5200e9fa86..559b1f089d 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,23 +1,22 @@ -From 05b70bbd7bf543c94832d486d58987b490016c8d Mon Sep 17 00:00:00 2001 +From 6842476267fe66eaac1bffd41ef47e5e82cf4964 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 958eb763a..17bc80776 100644 +index 5d398f7cb..09b4ddf19 100644 --- a/pom.xml +++ b/pom.xml -@@ -1,12 +1,12 @@ +@@ -1,12 +1,11 @@ 4.0.0 - org.spigotmc - spigot -+ com.destroystokyo.paper + paper jar - 1.13-pre7-R0.1-SNAPSHOT + 1.13-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -25,7 +24,7 @@ index 958eb763a..17bc80776 100644 UTF-8 -@@ -21,16 +21,16 @@ +@@ -21,16 +20,16 @@ @@ -46,7 +45,7 @@ index 958eb763a..17bc80776 100644 ${project.version} compile -@@ -101,34 +101,22 @@ +@@ -101,34 +100,22 @@ @@ -92,7 +91,7 @@ index 958eb763a..17bc80776 100644 -@@ -138,11 +126,12 @@ +@@ -138,11 +125,12 @@ maven-jar-plugin 2.4 @@ -106,7 +105,7 @@ index 958eb763a..17bc80776 100644 ${maven.build.timestamp} Bukkit ${api.version} -@@ -182,19 +171,22 @@ +@@ -182,19 +170,22 @@ shade @@ -137,7 +136,7 @@ index 958eb763a..17bc80776 100644 org.bukkit.craftbukkit org.bukkit.craftbukkit.v${minecraft_version} -@@ -220,18 +212,6 @@ +@@ -220,18 +211,6 @@ org.apache.maven.plugins maven-compiler-plugin 3.7.0 @@ -156,7 +155,7 @@ index 958eb763a..17bc80776 100644 org.apache.maven.plugins -@@ -250,6 +230,11 @@ +@@ -250,6 +229,11 @@ development diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index a6ce669c2b..e783867790 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From a54aaf050878b967a9ee98b9264f67e476ff26ba Mon Sep 17 00:00:00 2001 +From 5d8ba7cb9d240fe918b9097ad5c35603af20b45b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java new file mode 100644 -index 000000000..e8f7b7292 +index 0000000000..e8f7b7292d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +1,237 @@ @@ -249,10 +249,10 @@ index 000000000..e8f7b7292 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 000000000..3d8ee9ed3 +index 0000000000..d5c6c37fab --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -0,0 +1,173 @@ +@@ -0,0 +1,177 @@ +package com.destroystokyo.paper; + +import com.google.common.base.Throwables; @@ -317,6 +317,10 @@ index 000000000..3d8ee9ed3 + readConfig(PaperConfig.class, null); + } + ++ protected static void logError(String s) { ++ Bukkit.getLogger().severe(s); ++ } ++ + protected static void log(String s) { + if (verbose) { + Bukkit.getLogger().info(s); @@ -428,10 +432,10 @@ index 000000000..3d8ee9ed3 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java new file mode 100644 -index 000000000..621bf7051 +index 0000000000..b8a6161d84 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +1,66 @@ +@@ -0,0 +1,67 @@ +package com.destroystokyo.paper; + +import java.util.List; @@ -441,6 +445,7 @@ index 000000000..621bf7051 +import org.spigotmc.SpigotWorldConfig; + +import static com.destroystokyo.paper.PaperConfig.log; ++import static com.destroystokyo.paper.PaperConfig.logError; + +public class PaperWorldConfig { + @@ -499,7 +504,7 @@ index 000000000..621bf7051 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 8563712d9..9155aa727 100644 +index 5ff1e96861..3706e44a34 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -192,6 +192,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -514,7 +519,7 @@ index 8563712d9..9155aa727 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 015959b9f..f3f8b65be 100644 +index 47fd48399f..29c7043c86 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -531,7 +536,7 @@ index 015959b9f..f3f8b65be 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index a0c701f35..557a3f97f 100644 +index ad3f891999..ca2a14d7ac 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -555,7 +560,7 @@ index a0c701f35..557a3f97f 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c7f5cba2d..330ea4e72 100644 +index 13c4043377..b2bb06c796 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -127,6 +127,8 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -576,10 +581,10 @@ index c7f5cba2d..330ea4e72 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ce5ebcc54..88766d30d 100644 +index 1232ea4b2e..feab96c84c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -743,6 +743,7 @@ public final class CraftServer implements Server { +@@ -744,6 +744,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -587,7 +592,7 @@ index ce5ebcc54..88766d30d 100644 for (WorldServer world : console.worlds) { world.worldData.setDifficulty(difficulty); world.setSpawnFlags(monsters, animals); -@@ -758,6 +759,7 @@ public final class CraftServer implements Server { +@@ -759,6 +760,7 @@ public final class CraftServer implements Server { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } world.spigotConfig.init(); // Spigot @@ -595,7 +600,7 @@ index ce5ebcc54..88766d30d 100644 } pluginManager.clearPlugins(); -@@ -765,6 +767,7 @@ public final class CraftServer implements Server { +@@ -766,6 +768,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -603,7 +608,7 @@ index ce5ebcc54..88766d30d 100644 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -1880,4 +1883,26 @@ public final class CraftServer implements Server { +@@ -1864,4 +1867,26 @@ public final class CraftServer implements Server { { return spigot; } @@ -631,10 +636,10 @@ index ce5ebcc54..88766d30d 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c234b8749..5e49bca8a 100644 +index df07dc5946..57da619d80 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -126,6 +126,14 @@ public class Main { +@@ -128,6 +128,14 @@ public class Main { .defaultsTo(new File("spigot.yml")) .describedAs("Yml file"); // Spigot End @@ -650,7 +655,7 @@ index c234b8749..5e49bca8a 100644 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 9128f7754..7b1a9a8a0 100644 +index 9128f77543..7b1a9a8a0e 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,31 +39,31 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 594c48a316..66b344ddcc 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,21 +1,11 @@ -From 1b41bf7f810b3bd6c90db0a7c4ee15776bc6f832 Mon Sep 17 00:00:00 2001 +From 6460da5f11f9c0a62d52da096c1e70e2d8b0fbd4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes -diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e8f7b7292..a0ebc1eaa 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperCommand.java -+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java -@@ -234,4 +234,5 @@ public class PaperCommand extends Command { - - Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Paper config reload complete."); - } -+ - } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a19..121a137f3 100644 +index 002da2a191..9f3aa24590 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition { @@ -56,8 +46,20 @@ index 002da2a19..121a137f3 100644 ++this.j; } +@@ -213,8 +213,11 @@ public class BlockPosition extends BaseBlockPosition { + if (this.g.b < l) { + ++this.g.b; + } else if (this.g.c < i1) { ++ this.g.b = i; // Paper - Readd line removed by the decompiler + ++this.g.c; + } else if (this.g.d < j1) { ++ this.g.b = i; // Paper - Readd line removed by the decompiler ++ this.g.c = j; // Paper - Readd line removed by the decompiler + ++this.g.d; + } + diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 65910508f..15c7cc170 100644 +index a661789c1e..785a1a2184 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -88,7 +88,7 @@ public class DefinedStructure { @@ -111,6 +113,60 @@ index 65910508f..15c7cc170 100644 } public Iterator iterator() { +diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java +index 3b8f6ec167..bde5714dd6 100644 +--- a/src/main/java/net/minecraft/server/RegistryID.java ++++ b/src/main/java/net/minecraft/server/RegistryID.java +@@ -6,7 +6,7 @@ import java.util.Arrays; + import java.util.Iterator; + import javax.annotation.Nullable; + +-public class RegistryID implements Registry { ++public class RegistryID implements Registry { // Paper - decompile fix + + private static final Object a = null; + private K[] b; +@@ -17,9 +17,9 @@ public class RegistryID implements Registry { + + public RegistryID(int i) { + i = (int) ((float) i / 0.8F); +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix + } + + public int getId(@Nullable K k0) { +@@ -51,12 +51,12 @@ public class RegistryID implements Registry { + } + + private void d(int i) { +- Object[] aobject = this.b; ++ K[] aobject = this.b; // Paper - decompile fix + int[] aint = this.c; + +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.e = 0; + this.f = 0; + +diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java +index 4b5463cca2..53c9f21887 100644 +--- a/src/main/java/net/minecraft/server/VoxelShape.java ++++ b/src/main/java/net/minecraft/server/VoxelShape.java +@@ -67,7 +67,7 @@ public abstract class VoxelShape { + ArrayList arraylist = Lists.newArrayList(); + + this.b((d0, d1, d2, d3, d4, d5) -> { +- list.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); ++ arraylist.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); // Paper - decompile fix + }); + return arraylist; + } -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0008-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch similarity index 85% rename from Spigot-Server-Patches/0008-MC-Utils.patch rename to Spigot-Server-Patches/0004-MC-Utils.patch index b27358e130..de20d40d30 100644 --- a/Spigot-Server-Patches/0008-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,11 +1,11 @@ -From 68857c2aac1bd54c01818909cbcd0ca010e2affa Mon Sep 17 00:00:00 2001 +From 92a7df9172f5671afa9c3f2baa8c7652294f6134 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c3e990bdf..e2a7b4be2 100644 +index c3e990bdff..e2a7b4be2c 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable { @@ -18,19 +18,18 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a19..70a7edf57 100644 +index 9f3aa24590..7dbea90902 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger; +@@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger; @Immutable public class BlockPosition extends BaseBlockPosition { - private static final Logger b = LogManager.getLogger(); -+ private static final Logger LOGGER = LogManager.getLogger(); // Paper - b > LOGGER - attempts to avoid /some/ stupidity public static final BlockPosition ZERO = new BlockPosition(0, 0, 0); private static final int c = 1 + MathHelper.e(MathHelper.c(30000000)); private static final int d = BlockPosition.c; -@@ -45,6 +45,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -45,6 +44,7 @@ public class BlockPosition extends BaseBlockPosition { return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2); } @@ -38,7 +37,7 @@ index 002da2a19..70a7edf57 100644 public BlockPosition a(int i, int j, int k) { return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k); } -@@ -382,6 +383,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -385,6 +385,7 @@ public class BlockPosition extends BaseBlockPosition { return this.d; } @@ -46,7 +45,7 @@ index 002da2a19..70a7edf57 100644 public BlockPosition.MutableBlockPosition c(int i, int j, int k) { this.b = i; this.c = j; -@@ -389,6 +391,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -392,6 +393,7 @@ public class BlockPosition extends BaseBlockPosition { return this; } @@ -55,7 +54,7 @@ index 002da2a19..70a7edf57 100644 return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0ae780c8e..3b97981bc 100644 +index 411ab6061b..cd4fbee0ca 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -67,7 +66,7 @@ index 0ae780c8e..3b97981bc 100644 private final ChunkSection[] sections; private final BiomeBase[] g; private final boolean[] h; -@@ -730,6 +730,7 @@ public class Chunk implements IChunkAccess { +@@ -693,6 +693,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -76,7 +75,7 @@ index 0ae780c8e..3b97981bc 100644 public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 00a530c51..2947d9ff6 100644 +index 00a530c51c..2947d9ff6a 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -24,6 +24,8 @@ public class ChunkCoordIntPair { @@ -89,7 +88,7 @@ index 00a530c51..2947d9ff6 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 97cfd6695..81605b10f 100644 +index ca2a14d7ac..9a513b4e3a 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -122,7 +121,7 @@ index 97cfd6695..81605b10f 100644 @Nullable public static MinecraftKey getName(EntityTypes entitytypes) { -@@ -278,7 +290,7 @@ public class EntityTypes { +@@ -277,7 +289,7 @@ public class EntityTypes { public static class a { @@ -132,18 +131,18 @@ index 97cfd6695..81605b10f 100644 private boolean c = true; private boolean d = true; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 3f0c5d7dd..68a59e708 100644 +index 0d26fc56dd..e7b5daf28e 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -25,6 +25,7 @@ import org.bukkit.Location; - import org.bukkit.TreeType; +@@ -26,6 +26,7 @@ import org.bukkit.TreeType; import org.bukkit.block.BlockState; + import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.block.CraftBlockState; +import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.Player; - import org.bukkit.event.world.StructureGrowEvent; -@@ -553,6 +554,17 @@ public final class ItemStack { + import org.bukkit.event.block.BlockFertilizeEvent; +@@ -555,6 +556,17 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -162,7 +161,7 @@ index 3f0c5d7dd..68a59e708 100644 this.tag = nbttagcompound; } diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java -index a540167d6..add618866 100644 +index a540167d6d..add618866b 100644 --- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java @@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry { @@ -181,10 +180,10 @@ index a540167d6..add618866 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 000000000..a4b0901cf +index 0000000000..70cdc3f102 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -0,0 +1,201 @@ +@@ -0,0 +1,292 @@ +package net.minecraft.server; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -193,9 +192,13 @@ index 000000000..a4b0901cf +import org.spigotmc.AsyncCatcher; + +import javax.annotation.Nullable; ++import java.util.Queue; ++import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; ++import java.util.concurrent.TimeUnit; ++import java.util.concurrent.TimeoutException; +import java.util.function.Supplier; +import java.util.regex.Pattern; + @@ -205,6 +208,91 @@ index 000000000..a4b0901cf + private MCUtil() {} + + ++ public static boolean isMainThread() { ++ return MinecraftServer.getServer().isMainThread(); ++ } ++ ++ private static class DelayedRunnable implements Runnable { ++ ++ private final int ticks; ++ private final Runnable run; ++ ++ private DelayedRunnable(int ticks, Runnable run) { ++ this.ticks = ticks; ++ this.run = run; ++ } ++ ++ @Override ++ public void run() { ++ if (ticks <= 0) { ++ run.run(); ++ } else { ++ scheduleTask(ticks-1, run); ++ } ++ } ++ } ++ ++ public static void scheduleTask(int ticks, Runnable runnable) { ++ // We use post to main instead of process queue as we don't want to process these mid tick if ++ // Someone uses processQueueWhileWaiting ++ MinecraftServer.getServer().postToMainThread(new DelayedRunnable(ticks, runnable)); ++ } ++ ++ public static void processQueue() { ++ Runnable runnable; ++ Queue processQueue = getProcessQueue(); ++ while ((runnable = processQueue.poll()) != null) { ++ try { ++ runnable.run(); ++ } catch (Exception e) { ++ MinecraftServer.LOGGER.error("Error executing task", e); ++ } ++ } ++ } ++ public static T processQueueWhileWaiting(CompletableFuture future) { ++ try { ++ if (isMainThread()) { ++ while (!future.isDone()) { ++ try { ++ return future.get(1, TimeUnit.MILLISECONDS); ++ } catch (TimeoutException ignored) { ++ processQueue(); ++ } ++ } ++ } ++ return future.get(); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++ public static void ensureMain(Runnable run) { ++ ensureMain(null, run); ++ } ++ /** ++ * Ensures the target code is running on the main thread ++ * @param reason ++ * @param run ++ * @return ++ */ ++ public static void ensureMain(String reason, Runnable run) { ++ if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) { ++ if (reason != null) { ++ new IllegalStateException("Asynchronous " + reason + "!").printStackTrace(); ++ } ++ getProcessQueue().add(run); ++ return; ++ } ++ run.run(); ++ } ++ ++ private static Queue getProcessQueue() { ++ return MinecraftServer.getServer().processQueue; ++ } ++ ++ public static T ensureMain(Supplier run) { ++ return ensureMain(null, run); ++ } + /** + * Ensures the target code is running on the main thread + * @param reason @@ -214,14 +302,16 @@ index 000000000..a4b0901cf + */ + public static T ensureMain(String reason, Supplier run) { + if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) { -+ new IllegalStateException( "Asynchronous " + reason + "! Blocking thread until it returns ").printStackTrace(); ++ if (reason != null) { ++ new IllegalStateException("Asynchronous " + reason + "! Blocking thread until it returns ").printStackTrace(); ++ } + Waitable wait = new Waitable() { + @Override + protected T evaluate() { + return run.get(); + } + }; -+ MinecraftServer.getServer().processQueue.add(wait); ++ getProcessQueue().add(wait); + try { + return wait.get(); + } catch (InterruptedException | ExecutionException e) { @@ -387,7 +477,7 @@ index 000000000..a4b0901cf + } +} diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 8170a8428..e21e60b00 100644 +index 8170a84280..e21e60b003 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java @@ -20,7 +20,7 @@ public interface NBTBase { @@ -409,7 +499,7 @@ index 8170a8428..e21e60b00 100644 case 0: return "TAG_End"; diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 1a81d8e5f..057c2077a 100644 +index 1a81d8e5f6..057c2077a0 100644 --- a/src/main/java/net/minecraft/server/NBTList.java +++ b/src/main/java/net/minecraft/server/NBTList.java @@ -13,7 +13,7 @@ public abstract class NBTList extends AbstractList impleme @@ -435,7 +525,7 @@ index 1a81d8e5f..057c2077a 100644 + public abstract NBTList clone(); // Paper - decompile fix } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 11ffa6c34..3ff3a2983 100644 +index 11ffa6c342..3ff3a29835 100644 --- a/src/main/java/net/minecraft/server/NBTTagByteArray.java +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java @@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList { @@ -449,7 +539,7 @@ index 11ffa6c34..3ff3a2983 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 7fc9b5ff3..e658816c2 100644 +index 7fc9b5ff32..e658816c24 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase { @@ -485,7 +575,7 @@ index 7fc9b5ff3..e658816c2 100644 - } } diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java -index f5c9b97d5..d121ad4f7 100644 +index f5c9b97d5c..d121ad4f7a 100644 --- a/src/main/java/net/minecraft/server/NBTTagIntArray.java +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java @@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList { @@ -498,7 +588,7 @@ index f5c9b97d5..d121ad4f7 100644 } } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index b3c944d70..a8280acf9 100644 +index b3c944d701..a8280acf94 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger; @@ -536,7 +626,7 @@ index b3c944d70..a8280acf9 100644 - } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2fb86aa19..6f21b01a8 100644 +index 0618962e75..42e0630e60 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -553,7 +643,7 @@ index 2fb86aa19..6f21b01a8 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index ef332d651..7cc7eb773 100644 +index ef332d6517..7cc7eb7735 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -8,7 +8,7 @@ import java.util.Iterator; @@ -575,7 +665,7 @@ index ef332d651..7cc7eb773 100644 this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 2179664a0..d7e1ecc03 100644 +index 2179664a0c..d7e1ecc031 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -102,11 +102,11 @@ public class ServerPing { diff --git a/Spigot-Server-Patches/0004-Paper-Metrics.patch b/Spigot-Server-Patches/0005-Paper-Metrics.patch similarity index 99% rename from Spigot-Server-Patches/0004-Paper-Metrics.patch rename to Spigot-Server-Patches/0005-Paper-Metrics.patch index dfed421da9..71e309d258 100644 --- a/Spigot-Server-Patches/0004-Paper-Metrics.patch +++ b/Spigot-Server-Patches/0005-Paper-Metrics.patch @@ -1,4 +1,4 @@ -From c6779cede78872af84c68078b5c44deff9b32089 Mon Sep 17 00:00:00 2001 +From 240642e5baed8846c03bd8543cab3c711a65965d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 24 Mar 2017 23:56:01 -0500 Subject: [PATCH] Paper Metrics @@ -647,7 +647,7 @@ index 000000000..e257d6b36 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 3d8ee9ed3..5ab2cf6ee 100644 +index d5c6c37fa..b89ec4252 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -39,6 +39,7 @@ public class PaperConfig { @@ -658,7 +658,7 @@ index 3d8ee9ed3..5ab2cf6ee 100644 public static void init(File configFile) { CONFIG_FILE = configFile; -@@ -72,6 +73,11 @@ public class PaperConfig { +@@ -76,6 +77,11 @@ public class PaperConfig { for (Map.Entry entry : commands.entrySet()) { MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue()); } @@ -671,7 +671,7 @@ index 3d8ee9ed3..5ab2cf6ee 100644 static void readConfig(Class clazz, Object instance) { diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index ac36ea08e..09100408e 100644 +index e12511291..ff85d45ab 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -84,6 +84,7 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/0005-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch similarity index 73% rename from Spigot-Server-Patches/0005-Add-MinecraftKey-Information-to-Objects.patch rename to Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index ed6d118426..07ddb6e9dd 100644 --- a/Spigot-Server-Patches/0005-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -1,4 +1,4 @@ -From a0f2f840d13536973078d4e2700e65ceff320081 Mon Sep 17 00:00:00 2001 +From ebfddc6099547fa117ae7b4b508dd64f51d3c1cd Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 01:40:13 -0400 Subject: [PATCH] Add MinecraftKey Information to Objects @@ -6,7 +6,7 @@ Subject: [PATCH] Add MinecraftKey Information to Objects Stores the reference to the objects respective MinecraftKey diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index a0ebc1eaa..e4c771a39 100644 +index e8f7b7292d..7ff8e70b24 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -171,7 +171,7 @@ public class PaperCommand extends Command { @@ -18,15 +18,8 @@ index a0ebc1eaa..e4c771a39 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); -@@ -234,5 +234,5 @@ public class PaperCommand extends Command { - - Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Paper config reload complete."); - } -- -+ - } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 515c9d875..53fc37088 100644 +index 29c7043c86..628fda8e7c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -45,7 +45,7 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -47,32 +40,26 @@ index 515c9d875..53fc37088 100644 private int id; public boolean j; public final List passengers; -@@ -197,6 +197,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { - } else { - this.defaultActivationState = false; - } -+ // Paper start -+ this.entityKey = EntityTypes.getName(entitytypes); -+ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null; -+ // Paper end - // Spigot end - - this.datawatcher = new DataWatcher(this); -@@ -1781,12 +1785,24 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1781,12 +1781,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } + // Paper start -+ public final MinecraftKey entityKey; -+ public final String entityKeyString; ++ private MinecraftKey entityKey; ++ private String entityKeyString; + + @Override + public MinecraftKey getMinecraftKey() { ++ if (entityKey == null) { ++ this.entityKey = EntityTypes.getName(this.getEntityType()); ++ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null; ++ } + return entityKey; + } + + @Override + public String getMinecraftKeyString() { ++ getMinecraftKey(); // Try to load if it doesn't exists. see: https://github.com/PaperMC/Paper/issues/1280 + return entityKeyString; + } @Nullable @@ -82,16 +69,16 @@ index 515c9d875..53fc37088 100644 - - return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null; + EntityTypes type = this.getEntityType(); -+ return type != null && type.isPersistable() ? entityKeyString : null; ++ return type != null && type.isPersistable() ? getMinecraftKeyString() : null; + // Paper end } protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 557a3f97f..97cfd6695 100644 +index 9a513b4e3a..fa268f3543 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -226,6 +226,7 @@ public class EntityTypes { +@@ -238,6 +238,7 @@ public class EntityTypes { } } @@ -101,20 +88,21 @@ index 557a3f97f..97cfd6695 100644 } diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java new file mode 100644 -index 000000000..61c2b993c +index 0000000000..743142d030 --- /dev/null +++ b/src/main/java/net/minecraft/server/KeyedObject.java -@@ -0,0 +1,8 @@ +@@ -0,0 +1,9 @@ +package net.minecraft.server; + +public interface KeyedObject { + MinecraftKey getMinecraftKey(); + default String getMinecraftKeyString() { -+ return getMinecraftKey().toString(); ++ MinecraftKey key = getMinecraftKey(); ++ return key != null ? key.toString() : null; + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 093e7eb7f..b09325097 100644 +index 8a0453245d..5ca7fef518 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger; @@ -122,7 +110,7 @@ index 093e7eb7f..b09325097 100644 import org.bukkit.inventory.InventoryHolder; // CraftBukkit -public abstract class TileEntity { -+public abstract class TileEntity implements KeyedObject { ++public abstract class TileEntity implements KeyedObject { // Paper public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot private static final Logger a = LogManager.getLogger(); @@ -131,25 +119,26 @@ index 093e7eb7f..b09325097 100644 protected World world; protected BlockPosition position; protected boolean d; -@@ -21,8 +21,25 @@ public abstract class TileEntity { - public TileEntity(TileEntityTypes tileentitytypes) { - this.position = BlockPosition.ZERO; +@@ -23,6 +23,26 @@ public abstract class TileEntity { this.e = tileentitytypes; -+ // Paper start -+ this.tileEntityKey = TileEntityTypes.a(tileentitytypes); -+ this.tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null; } -+ public final MinecraftKey tileEntityKey; -+ public final String tileEntityKeyString; ++ // Paper start ++ private String tileEntityKeyString = null; ++ private MinecraftKey tileEntityKey = null; + + @Override + public MinecraftKey getMinecraftKey() { ++ if (tileEntityKey == null) { ++ tileEntityKey = TileEntityTypes.a(this.getTileEntityType()); ++ tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null; ++ } + return tileEntityKey; + } + + @Override + public String getMinecraftKeyString() { ++ getMinecraftKey(); // Try to load if it doesn't exists. + return tileEntityKeyString; + } + // Paper end diff --git a/Spigot-Server-Patches/0006-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch similarity index 92% rename from Spigot-Server-Patches/0006-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch rename to Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 8f60c65ff8..431700727f 100644 --- a/Spigot-Server-Patches/0006-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -1,4 +1,4 @@ -From 9f15dcf160d9412793b5069dfa9d92e692ac1abc Mon Sep 17 00:00:00 2001 +From f4d51258d98a1bb3dbcb677a296fb9d132b6c159 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 02:10:36 -0400 Subject: [PATCH] Store reference to current Chunk for Entity and Block @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9500c456d..120e66c78 100644 +index cd4fbee0ca..7837f1024c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess { @@ -86,14 +86,13 @@ index 9500c456d..120e66c78 100644 public boolean c(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 53fc37088..1ef52cc6d 100644 +index 628fda8e7c..17bcef97e0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1786,6 +1786,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1782,6 +1782,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start -+ + private java.lang.ref.WeakReference currentChunk = null; + + public void setCurrentChunk(Chunk chunk) { @@ -127,21 +126,21 @@ index 53fc37088..1ef52cc6d 100644 + return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4); + } + - public final MinecraftKey entityKey; - public final String entityKeyString; + private MinecraftKey entityKey; + private String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b09325097..b992360ac 100644 +index 5ca7fef518..9361667c3b 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -38,6 +38,15 @@ public abstract class TileEntity implements KeyedObject { - public String getMinecraftKeyString() { +@@ -41,6 +41,15 @@ public abstract class TileEntity implements KeyedObject { // Paper + getMinecraftKey(); // Try to load if it doesn't exists. return tileEntityKeyString; } + + private java.lang.ref.WeakReference currentChunk = null; + public Chunk getCurrentChunk() { -+ final Chunk chunk = currentChunk != null ? currentChunk.get() : world.getChunkIfLoaded(position.getX() >> 4, position.getZ() >> 4); ++ final Chunk chunk = currentChunk != null ? currentChunk.get() : null; + return chunk != null && chunk.isLoaded() ? chunk : null; + } + public void setCurrentChunk(Chunk chunk) { @@ -151,7 +150,7 @@ index b09325097..b992360ac 100644 @Nullable diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 70143c4d3..1e3675e4f 100644 +index 72164e11af..f09251eec8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -9,6 +9,7 @@ import java.util.UUID; diff --git a/Spigot-Server-Patches/0007-Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch similarity index 80% rename from Spigot-Server-Patches/0007-Store-counts-for-each-Entity-Block-Entity-Type.patch rename to Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch index 807ae934d2..c888a54ca5 100644 --- a/Spigot-Server-Patches/0007-Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -1,4 +1,4 @@ -From fd0ed98b73db46e809681e54d3b823d7b710b507 Mon Sep 17 00:00:00 2001 +From cfcc186292e5c96e42aa2588663c3e9ff49c0e34 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 02:13:59 -0400 Subject: [PATCH] Store counts for each Entity/Block Entity Type @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 120e66c78..0ae780c8e 100644 +index 7837f1024c..24a2ec4b4a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -64,15 +64,19 @@ public class Chunk implements IChunkAccess { @@ -21,11 +21,11 @@ index 120e66c78..0ae780c8e 100644 TileEntity replaced = super.put(key, value); if (replaced != null) { replaced.setCurrentChunk(null); -+ tileEntityCounts.decrement(replaced.tileEntityKeyString); ++ tileEntityCounts.decrement(replaced.getMinecraftKeyString()); } if (value != null) { value.setCurrentChunk(Chunk.this); -+ tileEntityCounts.increment(value.tileEntityKeyString); ++ tileEntityCounts.increment(value.getMinecraftKeyString()); } return replaced; } @@ -33,7 +33,7 @@ index 120e66c78..0ae780c8e 100644 TileEntity removed = super.remove(key); if (removed != null) { removed.setCurrentChunk(null); -+ tileEntityCounts.decrement(removed.tileEntityKeyString); ++ tileEntityCounts.decrement(removed.getMinecraftKeyString()); } return removed; } @@ -41,7 +41,7 @@ index 120e66c78..0ae780c8e 100644 this.entitySlices[k].add(entity); // Paper start entity.setCurrentChunk(this); -+ entityCounts.increment(entity.entityKeyString); ++ entityCounts.increment(entity.getMinecraftKeyString()); // Paper end } @@ -49,7 +49,7 @@ index 120e66c78..0ae780c8e 100644 return; } entity.setCurrentChunk(null); -+ entityCounts.decrement(entity.entityKeyString); ++ entityCounts.decrement(entity.getMinecraftKeyString()); // Paper end } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index f82c3bb1bb..ffac51a2bc 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 59a7ce865916d62eafb935fa6317d16938e28df7 Mon Sep 17 00:00:00 2001 +From ddd572cdcea3624d4d5fc369a29deab27c6511b1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -432,7 +432,7 @@ index 0000000000..145cb274b0 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5ab2cf6eec..b5795b6d34 100644 +index b89ec42525..e4ed7d674e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; @@ -450,7 +450,7 @@ index 5ab2cf6eec..b5795b6d34 100644 public class PaperConfig { -@@ -176,4 +179,24 @@ public class PaperConfig { +@@ -180,4 +183,24 @@ public class PaperConfig { config.addDefault(path, def); return config.getString(path, config.getString(path)); } @@ -476,10 +476,10 @@ index 5ab2cf6eec..b5795b6d34 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ffb91b27b0..ff110c8e95 100644 +index 06f10e1e84..43feccef8f 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -29,8 +29,17 @@ public class Block implements IMaterial { +@@ -28,8 +28,16 @@ public class Block implements IMaterial { private IBlockData blockData; protected final boolean o; private final boolean p; @@ -495,8 +495,7 @@ index ffb91b27b0..ff110c8e95 100644 + return timing; + } + // Paper end -+ - private static final ThreadLocal>> r = ThreadLocal.withInitial(() -> { + private static final ThreadLocal> r = ThreadLocal.withInitial(() -> { Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) { protected void rehash(int i) {} diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java @@ -531,10 +530,27 @@ index 5164e5c928..0c2386f5ec 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0296d3ef02..badfe86b22 100644 +index 00cd8d8cea..aabdc9e2f0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -221,7 +221,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -122,14 +122,13 @@ public class ChunkProviderServer implements IChunkProvider { + if (chunk != null) { + return chunk; + } else { +- try { +- world.timings.syncChunkLoadTimer.startTiming(); // Spigot ++ try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { ++ ; // Spigot + chunk = (Chunk) this.generateChunk(i, j).get(); + return chunk; + } catch (ExecutionException | InterruptedException interruptedexception) { + throw this.a(i, j, (Throwable) interruptedexception); + } +- finally { world.timings.syncChunkLoadTimer.stopTiming(); } // Spigot + } + } + +@@ -232,7 +231,7 @@ public class ChunkProviderServer implements IChunkProvider { } public void saveChunk(IChunkAccess ichunkaccess, boolean unloaded) { // Spigot @@ -544,7 +560,7 @@ index 0296d3ef02..badfe86b22 100644 this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 90d8571053..3a0e52d882 100644 +index 88301ee61e..5001fd11dc 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -1,5 +1,6 @@ @@ -554,7 +570,7 @@ index 90d8571053..3a0e52d882 100644 import com.google.common.collect.Maps; import com.mojang.datafixers.DataFixTypes; import com.mojang.datafixers.DataFixer; -@@ -688,7 +689,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -690,7 +691,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { public void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) { NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10); World world = chunk.getWorld(); @@ -563,7 +579,7 @@ index 90d8571053..3a0e52d882 100644 for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); -@@ -697,8 +698,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -699,8 +700,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { chunk.f(true); } @@ -572,7 +588,7 @@ index 90d8571053..3a0e52d882 100644 NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10); for (int j = 0; j < nbttaglist1.size(); ++j) { -@@ -715,8 +714,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -717,8 +716,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } } } @@ -581,7 +597,7 @@ index 90d8571053..3a0e52d882 100644 if (nbttagcompound.hasKeyOfType("TileTicks", 9) && world.I() instanceof TickListServer) { ((TickListServer) world.I()).a(nbttagcompound.getList("TileTicks", 10)); -@@ -725,7 +722,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -727,7 +724,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { if (nbttagcompound.hasKeyOfType("LiquidTicks", 9) && world.H() instanceof TickListServer) { ((TickListServer) world.H()).a(nbttagcompound.getList("LiquidTicks", 10)); } @@ -591,7 +607,7 @@ index 90d8571053..3a0e52d882 100644 } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 9155aa727d..a3d58b5ce5 100644 +index 3706e44a34..bf1fffcfee 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level; @@ -644,7 +660,7 @@ index 9155aa727d..a3d58b5ce5 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7a17a4ff99..2ed362791b 100644 +index 17bcef97e0..5590919dd6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -666,7 +682,7 @@ index 7a17a4ff99..2ed362791b 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -543,7 +544,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -539,7 +540,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, double d0, double d1, double d2) { @@ -674,7 +690,7 @@ index 7a17a4ff99..2ed362791b 100644 if (this.noclip) { this.a(this.getBoundingBox().d(d0, d1, d2)); this.recalcPosition(); -@@ -912,7 +912,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -908,7 +908,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.methodProfiler.e(); } @@ -683,7 +699,7 @@ index 7a17a4ff99..2ed362791b 100644 protected float ab() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3c1adeea65..d7a8a82a6a 100644 +index 514c951516..d6e9915c1f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -695,15 +711,15 @@ index 3c1adeea65..d7a8a82a6a 100644 public abstract class EntityLiving extends Entity { -@@ -1982,7 +1982,6 @@ public abstract class EntityLiving extends Entity { +@@ -1984,7 +1984,6 @@ public abstract class EntityLiving extends Entity { } public void tick() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot super.tick(); - this.cU(); + this.cV(); this.o(); -@@ -2056,9 +2055,7 @@ public abstract class EntityLiving extends Entity { +@@ -2058,9 +2057,7 @@ public abstract class EntityLiving extends Entity { } } @@ -713,7 +729,7 @@ index 3c1adeea65..d7a8a82a6a 100644 double d0 = this.locX - this.lastX; double d1 = this.locZ - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -2134,8 +2131,6 @@ public abstract class EntityLiving extends Entity { +@@ -2136,8 +2133,6 @@ public abstract class EntityLiving extends Entity { } else { this.bv = 0; } @@ -722,7 +738,7 @@ index 3c1adeea65..d7a8a82a6a 100644 } protected float e(float f, float f1) { -@@ -2205,7 +2200,6 @@ public abstract class EntityLiving extends Entity { +@@ -2207,7 +2202,6 @@ public abstract class EntityLiving extends Entity { } this.world.methodProfiler.a("ai"); @@ -730,7 +746,7 @@ index 3c1adeea65..d7a8a82a6a 100644 if (this.isFrozen()) { this.bg = false; this.bh = 0.0F; -@@ -2216,7 +2210,6 @@ public abstract class EntityLiving extends Entity { +@@ -2218,7 +2212,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.methodProfiler.e(); } @@ -738,7 +754,7 @@ index 3c1adeea65..d7a8a82a6a 100644 this.world.methodProfiler.e(); this.world.methodProfiler.a("jump"); -@@ -2241,9 +2234,7 @@ public abstract class EntityLiving extends Entity { +@@ -2243,9 +2236,7 @@ public abstract class EntityLiving extends Entity { this.n(); AxisAlignedBB axisalignedbb = this.getBoundingBox(); @@ -748,12 +764,12 @@ index 3c1adeea65..d7a8a82a6a 100644 this.world.methodProfiler.e(); this.world.methodProfiler.a("push"); if (this.bw > 0) { -@@ -2251,9 +2242,7 @@ public abstract class EntityLiving extends Entity { +@@ -2253,9 +2244,7 @@ public abstract class EntityLiving extends Entity { this.a(axisalignedbb, this.getBoundingBox()); } - SpigotTimings.timerEntityAICollision.startTiming(); // Spigot - this.cM(); + this.cN(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.methodProfiler.e(); } @@ -790,7 +806,7 @@ index ae31935c48..70c9b1f50c 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bcdd9e0fa4..590eb507c0 100644 +index d453d0c421..83a73b86ea 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,5 +1,6 @@ @@ -810,7 +826,7 @@ index bcdd9e0fa4..590eb507c0 100644 public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStatistics, ICommandListener, Runnable { -@@ -560,6 +561,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -599,6 +600,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } // CraftBukkit end MinecraftServer.LOGGER.info("Stopping server"); @@ -818,7 +834,7 @@ index bcdd9e0fa4..590eb507c0 100644 // CraftBukkit start if (this.server != null) { this.server.disablePlugins(); -@@ -766,7 +768,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -805,7 +807,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public void u() {} protected void v() { @@ -827,7 +843,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.slackActivityAccountant.tickStarted(); // Spigot long i = SystemUtils.c(); -@@ -793,7 +795,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -832,7 +834,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -835,7 +851,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.methodProfiler.a("save"); this.s.savePlayers(); // Spigot Start -@@ -808,7 +809,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -847,7 +848,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // this.saveChunks(true); // Spigot End this.methodProfiler.e(); @@ -843,7 +859,7 @@ index bcdd9e0fa4..590eb507c0 100644 } this.methodProfiler.a("snooper"); -@@ -829,14 +829,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -868,14 +868,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.e(); org.spigotmc.WatchdogThread.tick(); // Spigot this.slackActivityAccountant.tickEnded(l); // Spigot @@ -862,7 +878,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.methodProfiler.a("jobs"); FutureTask futuretask; -@@ -844,26 +844,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -883,26 +883,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati while ((futuretask = (FutureTask) this.g.poll()) != null) { SystemUtils.a(futuretask, MinecraftServer.LOGGER); } @@ -871,7 +887,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.methodProfiler.c("commandFunctions"); - SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot + MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot - this.aD().X_(); + this.getFunctionData().Y_(); - SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot + MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot this.methodProfiler.c("levels"); @@ -897,7 +913,7 @@ index bcdd9e0fa4..590eb507c0 100644 // Send time updates to everyone, it will get the right time from the world the player is in. if (this.ticks % 20 == 0) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) { -@@ -871,7 +872,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -910,7 +911,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time } } @@ -906,7 +922,7 @@ index bcdd9e0fa4..590eb507c0 100644 int i; -@@ -930,9 +931,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -969,9 +970,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.e(); this.methodProfiler.a("tracker"); @@ -916,7 +932,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.methodProfiler.e(); this.methodProfiler.e(); } -@@ -941,20 +940,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -980,20 +979,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } this.methodProfiler.c("connection"); @@ -936,7 +952,7 @@ index bcdd9e0fa4..590eb507c0 100644 - SpigotTimings.tickablesTimer.startTiming(); // Spigot + MinecraftTimings.tickablesTimer.startTiming(); // Spigot for (i = 0; i < this.l.size(); ++i) { - ((ITickable) this.l.get(i)).X_(); + ((ITickable) this.l.get(i)).Y_(); } - SpigotTimings.tickablesTimer.stopTiming(); // Spigot + MinecraftTimings.tickablesTimer.stopTiming(); // Spigot @@ -1038,7 +1054,7 @@ index ac6d8cc6e6..d975c2ccf1 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6f21b01a83..359aa3997a 100644 +index 42e0630e60..5d42cfe81c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -57,6 +57,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1100,7 +1116,7 @@ index 889b32287e..69da194f52 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0156175fb8..1e3dd22e5a 100644 +index e476d3433b..9cef6b9af6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1110,7 +1126,7 @@ index 0156175fb8..1e3dd22e5a 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1186,10 +1187,11 @@ public abstract class PlayerList { +@@ -1179,10 +1180,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1178,7 +1194,7 @@ index a07895935e..ee5c2421bb 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b992360ac2..5b7f6ca84c 100644 +index 9361667c3b..0d54513a44 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -4,12 +4,13 @@ import javax.annotation.Nullable; @@ -1190,7 +1206,7 @@ index b992360ac2..5b7f6ca84c 100644 +import co.aikar.timings.Timing; // Paper import org.bukkit.inventory.InventoryHolder; // CraftBukkit - public abstract class TileEntity implements KeyedObject { + public abstract class TileEntity implements KeyedObject { // Paper - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper @@ -1198,7 +1214,7 @@ index b992360ac2..5b7f6ca84c 100644 private final TileEntityTypes e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 330ea4e72e..e6b916a5db 100644 +index b2bb06c796..562a85b726 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,6 @@ @@ -1303,7 +1319,7 @@ index 330ea4e72e..e6b916a5db 100644 if (entity.isPassenger()) { entity.aH(); } else { -@@ -1402,8 +1408,6 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1406,8 +1412,6 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose } } } @@ -1313,7 +1329,7 @@ index 330ea4e72e..e6b916a5db 100644 public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cecc9bc623..271d75c48d 100644 +index 2c6f6de4ce..f032ecab64 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,6 @@ @@ -1429,10 +1445,10 @@ index cecc9bc623..271d75c48d 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 88766d30d8..d33f237b76 100644 +index feab96c84c..737ad3e1c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1853,12 +1853,31 @@ public final class CraftServer implements Server { +@@ -1837,12 +1837,31 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1681,7 +1697,7 @@ index 413dd35f06..52a8c48fa4 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a2199b6a5..fad258f116 100644 +index 75d56ee3bd..47f650e426 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1665,6 +1665,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch index aa6c14bb3a..92fbea46d4 100644 --- a/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -1,14 +1,14 @@ -From 40b2ff991bc8a48ef7f31000cd11b4f705aea329 Mon Sep 17 00:00:00 2001 +From 17b75b1da091d4982e72e3604c4b0380515d34d1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:02:51 -0600 Subject: [PATCH] Configurable cactus and reed natural growth heights diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 621bf7051..4a692ac1b 100644 +index b8a6161d8..32d00e274 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -63,4 +63,13 @@ public class PaperWorldConfig { +@@ -64,4 +64,13 @@ public class PaperWorldConfig { config.addDefault("world-settings.default." + path, def); return config.getString("world-settings." + worldName + "." + path, config.getString("world-settings.default." + path)); } diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch index 7a61fe74f6..4ebc6746e7 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch @@ -1,14 +1,14 @@ -From b9f4abe2c78d9c5499c1249747e038186fb27393 Mon Sep 17 00:00:00 2001 +From 97a67535fcd794c822375c92418cf46eb118ab01 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:09:16 -0600 Subject: [PATCH] Configurable baby zombie movement speed diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4a692ac1b..d44cacc7e 100644 +index 32d00e274..a3c0d9159 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -72,4 +72,10 @@ public class PaperWorldConfig { +@@ -73,4 +73,10 @@ public class PaperWorldConfig { log("Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight); } @@ -20,7 +20,7 @@ index 4a692ac1b..d44cacc7e 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index b24e73f2c..268e4d57b 100644 +index 3f0e636b7..9f8f667c1 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -17,7 +17,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch index 810585bb66..d331590007 100644 --- a/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch @@ -1,14 +1,14 @@ -From 4d52eec46bc302c6dfccc2548eaa454640a703fb Mon Sep 17 00:00:00 2001 +From 12dd50f4836a33df93b0ab65175a5cdf1f842e90 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:14:11 -0600 Subject: [PATCH] Configurable fishing time ranges diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d44cacc7e..45bddf3f4 100644 +index a3c0d9159..cacf58607 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -78,4 +78,12 @@ public class PaperWorldConfig { +@@ -79,4 +79,12 @@ public class PaperWorldConfig { babyZombieMovementSpeed = getDouble("baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference log("Baby zombies will move at the speed of " + babyZombieMovementSpeed); } @@ -22,7 +22,7 @@ index d44cacc7e..45bddf3f4 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 2512ad353..866f41980 100644 +index a9bd59418..7c119282b 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -386,7 +386,7 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch index 7e11177ad4..96f18606ca 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch @@ -1,14 +1,14 @@ -From 505cb60061caae705dbb6fccad730e81f9634672 Mon Sep 17 00:00:00 2001 +From 36849476a5ac4508bd8ff4f0d3e1b46c3e22a695 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:24:16 -0600 Subject: [PATCH] Allow nerfed mobs to jump diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 45bddf3f4..1d9dd0e0b 100644 +index cacf58607..de8680e4d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -86,4 +86,9 @@ public class PaperWorldConfig { +@@ -87,4 +87,9 @@ public class PaperWorldConfig { fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 600); log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks"); } @@ -31,7 +31,7 @@ index 4ed5192c6..489beed26 100644 this.b.o(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 5de20721c..27b01d1ee 100644 +index d24ff109c..3744d01ec 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -56,24 +56,21 @@ index 5de20721c..27b01d1ee 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 4d8876cae..2cb9d1b5a 100644 +index 0d9505138..38a0b2db1 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -@@ -6,6 +6,7 @@ public class PathfinderGoalFloat extends PathfinderGoal { +@@ -6,14 +6,17 @@ public class PathfinderGoalFloat extends PathfinderGoal { public PathfinderGoalFloat(EntityInsentient entityinsentient) { this.a = entityinsentient; + if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper this.a(4); - if (entityinsentient.getNavigation() instanceof Navigation) { - ((Navigation) entityinsentient.getNavigation()).c(true); -@@ -15,10 +16,12 @@ public class PathfinderGoalFloat extends PathfinderGoal { - + entityinsentient.getNavigation().d(true); } + public boolean validConditions() { return this.a(); } // Paper - OBFHELPER public boolean a() { - return this.a.isInWater() || this.a.ax(); + return this.a.isInWater() && this.a.bY() > 0.4D || this.a.ax(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch index f3486f0292..aedf24225a 100644 --- a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch @@ -1,14 +1,14 @@ -From 48f4ebe1a46124663d68afc009c623f0be3b87df Mon Sep 17 00:00:00 2001 +From 483632d2372f106559fde7170741ae63fe441c28 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Tue, 1 Mar 2016 13:51:54 -0600 Subject: [PATCH] Add configurable despawn distances for living entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1d9dd0e0b..22c1113a1 100644 +index de8680e4d..02f7e506e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -91,4 +91,20 @@ public class PaperWorldConfig { +@@ -92,4 +92,20 @@ public class PaperWorldConfig { private void nerfedMobsShouldJump() { nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false); } @@ -30,7 +30,7 @@ index 1d9dd0e0b..22c1113a1 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 27b01d1ee..c8c191667 100644 +index 3744d01ec..27c97530f 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -620,13 +620,13 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch index 94d1658dcc..062238e95d 100644 --- a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch @@ -1,14 +1,14 @@ -From 9a9d8af54bf1def19ceb5c483f07e8dbf8654f52 Mon Sep 17 00:00:00 2001 +From 71c3064807448910dfda790cbc35d23fc2f4dae3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Mar 2016 03:53:43 -0600 Subject: [PATCH] Allow for toggling of spawn chunks diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 22c1113a1..0094d1a87 100644 +index 02f7e506e..cef0c47ac 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -107,4 +107,10 @@ public class PaperWorldConfig { +@@ -108,4 +108,10 @@ public class PaperWorldConfig { softDespawnDistance = softDespawnDistance*softDespawnDistance; hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; } @@ -20,7 +20,7 @@ index 22c1113a1..0094d1a87 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e6b916a5d..05d363171 100644 +index 562a85b72..6ca7a2069 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -199,6 +199,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 43a7b87e3a..c19cd34645 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -1,14 +1,14 @@ -From d5144d6679ef94b9546b0f81bd9dfd3bd747b6e6 Mon Sep 17 00:00:00 2001 +From 7465f3a6749b94c0f59bd6149c59a5fa7e9d7140 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0094d1a87..4da846719 100644 +index cef0c47ac..38a697e1b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -113,4 +113,14 @@ public class PaperWorldConfig { +@@ -114,4 +114,14 @@ public class PaperWorldConfig { keepSpawnInMemory = getBoolean("keep-spawn-loaded", true); log("Keep spawn chunk loaded: " + keepSpawnInMemory); } @@ -24,7 +24,7 @@ index 0094d1a87..4da846719 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2ed362791..20248de7e 100644 +index f1e71de42..d6cf65db6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1885,6 +1885,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -36,7 +36,7 @@ index 2ed362791..20248de7e 100644 public EntityItem a(ItemStack itemstack, float f) { if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 850436d42..8d47b58c9 100644 +index e7e7d57c4..5e01aa0f8 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -86,6 +86,17 @@ public class EntityFallingBlock extends Entity { diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 013c03a550..62078159b1 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 7bcfdec2f367b97a5459b023661911495b573125 Mon Sep 17 00:00:00 2001 +From 7cd9445ab28c3f5c5ce2ca674af31de0a2d1faa1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index 220ca7bca..eb4b08be4 100644 +index 220ca7bca0..eb4b08be46 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -52,13 +52,12 @@ public class EULA { @@ -25,10 +25,10 @@ index 220ca7bca..eb4b08be4 100644 } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 590eb507c..4889a82a2 100644 +index 1839bf7d24..5d5aa72ca2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1151,7 +1151,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1205,7 +1205,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } public String getServerModName() { @@ -38,10 +38,10 @@ index 590eb507c..4889a82a2 100644 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 88ea651ba..28f6cdf96 100644 +index 737ad3e1c0..0dda989453 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -152,7 +152,7 @@ import org.bukkit.event.server.TabCompleteEvent; +@@ -153,7 +153,7 @@ import org.bukkit.event.server.TabCompleteEvent; import net.md_5.bungee.api.chat.BaseComponent; public final class CraftServer implements Server { @@ -51,10 +51,10 @@ index 88ea651ba..28f6cdf96 100644 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 5e49bca8a..d9059129d 100644 +index 57da619d80..38e696aa94 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -198,7 +198,7 @@ public class Main { +@@ -200,7 +200,7 @@ public class Main { deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); @@ -64,7 +64,7 @@ index 5e49bca8a..d9059129d 100644 Thread.sleep(TimeUnit.SECONDS.toMillis(15)); } diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 94a3d4237..91b8aa6a1 100644 +index 94a3d4237d..91b8aa6a16 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -19,7 +19,7 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch index 5bd57f79b2..0072ac5de4 100644 --- a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch @@ -1,11 +1,11 @@ -From fd20af56dbf1982c04406fcd9a0360b54568d965 Mon Sep 17 00:00:00 2001 +From 655295872243600487c4870e833198a8746aecf1 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 14:47:52 -0600 Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 40efd6c60..1aa32bf11 100644 +index fc64ba3c9..a47ef2ca5 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -72,6 +72,9 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index 40efd6c60..1aa32bf11 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c8c191667..d29364b01 100644 +index 27c97530f..3723fd977 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -32,7 +32,7 @@ index c8c191667..d29364b01 100644 double d1 = entityhuman.locY - this.locY; double d2 = entityhuman.locZ - this.locZ; diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 6cb4f889c..a1ebf5c68 100644 +index 75040a0f2..683191c4a 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java @@ -96,7 +96,7 @@ public class EntitySilverfish extends EntityMonster { @@ -45,7 +45,7 @@ index 6cb4f889c..a1ebf5c68 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 44fb75c6f..aec9cdae5 100644 +index e54dcaa99..b12e767db 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -37,7 +37,7 @@ public final class SpawnerCreature { @@ -58,7 +58,7 @@ index 44fb75c6f..aec9cdae5 100644 j = MathHelper.floor(entityhuman.locZ / 16.0D); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 05d363171..fd64b75ed 100644 +index 6ca7a2069..ae11c2e43 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -28,6 +28,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; @@ -69,7 +69,7 @@ index 05d363171..fd64b75ed 100644 import org.bukkit.event.block.BlockCanBuildEvent; import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; -@@ -2407,7 +2408,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -2411,7 +2412,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); @@ -79,7 +79,7 @@ index 05d363171..fd64b75ed 100644 if (d3 < 0.0D || d4 < d3 * d3) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fad258f11..c67137a80 100644 +index 47f650e42..0109d8e97 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1585,7 +1585,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch index 9756b48932..741bf00d81 100644 --- a/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch @@ -1,14 +1,14 @@ -From ab5cb9f6f247e8ddd7219a298e41a4f5fffab5e5 Mon Sep 17 00:00:00 2001 +From ea2724d8433bd98200623fc0b3b9c6e9c9a4f406 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 15:08:03 -0600 Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3b97981bc..4a4cc6c59 100644 +index 0a0d04cf6..adf3dee2e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -777,6 +777,10 @@ public class Chunk implements IChunkAccess { +@@ -774,6 +774,10 @@ public class Chunk implements IChunkAccess { tileentity.z(); this.tileEntities.put(blockposition, tileentity); // CraftBukkit start diff --git a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch index 2d446bbee4..0779f29f92 100644 --- a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch @@ -1,11 +1,11 @@ -From b7e91c371fc4c629af5440e38cd70bfd2a59b293 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Tue, 1 Mar 2016 22:01:19 -0600 +From 13443f9b6f42a4de1fa7b993ef0a6b9bb3be23e2 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 8 Mar 2015 22:55:25 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index de06bd59a..9b54cbfdc 100644 +index a534c441a..591524f1e 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -30,18 +30,19 @@ index de06bd59a..9b54cbfdc 100644 + int i = this.position.getX(); + int j = this.position.getY(); + int k = this.position.getZ(); -+ if (!this.world.isClientSide && this.f != 0 /*&& (this.k + i + j + k) % 200 == 0*/) { // Paper - comment out tick rate limiter ++ if (false && !this.world.isClientSide && this.f != 0 && (this.k + i + j + k) % 200 == 0) { // Paper - disable block + // Paper end this.f = 0; f = 5.0F; List list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - 5.0F), (double) ((float) j - 5.0F), (double) ((float) k - 5.0F), (double) ((float) (i + 1) + 5.0F), (double) ((float) (j + 1) + 5.0F), (double) ((float) (k + 1) + 5.0F))); -@@ -134,11 +140,14 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -134,13 +140,17 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { } } - this.e = this.a; - f = 0.1F; - if (this.f > 0 && this.a == 0.0F) { +- if (this.f > 0 && this.a == 0.0F) { ++ if (this.f == 1 && this.a == 0.0F) { // check == 1 instead of > 0, first open this.a(SoundEffects.BLOCK_CHEST_OPEN); } + // Paper start @@ -50,9 +51,30 @@ index de06bd59a..9b54cbfdc 100644 + this.e = this.a; + // Paper end - if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { +- if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { ++ if (this.f == 0/* && this.a > 0.0F || this.f > 0 && this.a < 1.0F*/) { // Paper disable all but player count check ++ /* // Paper disable animation stuff float f1 = this.a; -@@ -203,6 +212,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { + + if (this.f > 0) { +@@ -155,9 +165,14 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { + + float f2 = 0.5F; + ++ + if (this.a < 0.5F && f1 >= 0.5F) { +- this.a(SoundEffects.BLOCK_CHEST_CLOSE); +- } ++ */ ++ // add some delay ++ MCUtil.scheduleTask(10, () -> { ++ if (this.f == 0) this.a(SoundEffects.BLOCK_CHEST_CLOSE); ++ }); ++ // } // Paper end + + if (this.a < 0.0F) { + this.a = 0.0F; +@@ -203,6 +218,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { ++this.f; if (this.world == null) return; // CraftBukkit @@ -60,7 +82,7 @@ index de06bd59a..9b54cbfdc 100644 // CraftBukkit start - Call redstone event if (this.getBlock() == Blocks.TRAPPED_CHEST) { -@@ -224,6 +234,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -224,6 +240,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { --this.f; // CraftBukkit start - Call redstone event @@ -69,7 +91,7 @@ index de06bd59a..9b54cbfdc 100644 int newPower = Math.max(0, Math.min(15, this.f)); diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -index f275fd1c3..7d7628b04 100644 +index 61edd7cc6..9407a8c97 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -1,6 +1,6 @@ diff --git a/Spigot-Server-Patches/0021-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0021-Further-improve-server-tick-loop.patch index 6742be6118..fc2bc3c6de 100644 --- a/Spigot-Server-Patches/0021-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0021-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From 8310c9fbbc16dd134af47991b8fd2b94ec6972f7 Mon Sep 17 00:00:00 2001 +From 9bf320c306882fff5aaff5e9ede004e6674fe198 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4889a82a2..2e691b9f6 100644 +index 5d5aa72ca2..ae17796ce2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -141,17 +141,13 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -142,7 +142,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public ConsoleReader reader; @@ -24,7 +24,8 @@ index 4889a82a2..2e691b9f6 100644 public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; - public File bukkitDataPackFolder; +@@ -150,10 +150,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + public CommandDispatcher vanillaCommandDispatcher; // CraftBukkit end // Spigot start - public static final int TPS = 20; @@ -34,7 +35,7 @@ index 4889a82a2..2e691b9f6 100644 public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); // Spigot end -@@ -637,12 +633,54 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -676,12 +672,54 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.isRunning = false; } @@ -94,7 +95,7 @@ index 4889a82a2..2e691b9f6 100644 public void run() { try { -@@ -654,24 +692,41 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -693,24 +731,41 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot start Arrays.fill( recentTps, 20 ); @@ -148,10 +149,10 @@ index 4889a82a2..2e691b9f6 100644 } lastTick = curTime; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 34a07a7e7..6e152fe17 100644 +index 0dda989453..6ad91a16f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1850,6 +1850,17 @@ public final class CraftServer implements Server { +@@ -1834,6 +1834,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } @@ -170,7 +171,7 @@ index 34a07a7e7..6e152fe17 100644 { diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index be2e31dea..6d21c3269 100644 +index be2e31deae..6d21c32692 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java @@ -1,8 +1,5 @@ diff --git a/Spigot-Server-Patches/0023-Entity-Origin-API.patch b/Spigot-Server-Patches/0023-Entity-Origin-API.patch index 61f94451ff..ca09e24757 100644 --- a/Spigot-Server-Patches/0023-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0023-Entity-Origin-API.patch @@ -1,11 +1,11 @@ -From e1421e0812ad47128d28ec5b99ebd0c2ae5d65ca Mon Sep 17 00:00:00 2001 +From d8bb3e196523a1649e6051920f32cc397b7653d9 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 20248de7e..6bb4cf48e 100644 +index 04674c39d5..5ba537bab2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -16,7 +16,7 @@ index 20248de7e..6bb4cf48e 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1629,6 +1630,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1625,6 +1626,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } @@ -28,7 +28,7 @@ index 20248de7e..6bb4cf48e 100644 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1771,6 +1777,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1767,6 +1773,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end @@ -51,7 +51,7 @@ index 20248de7e..6bb4cf48e 100644 NBTTagList nbttaglist = new NBTTagList(); double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 8d47b58c9..7e5a2775a 100644 +index 5e01aa0f85..33bc46b054 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -249,6 +249,14 @@ public class EntityFallingBlock extends Entity { @@ -70,7 +70,7 @@ index 8d47b58c9..7e5a2775a 100644 public void a(boolean flag) { diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 5ceb3f206..87f3205f8 100644 +index 5ceb3f2068..87f3205f82 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity { @@ -89,7 +89,7 @@ index 5ceb3f206..87f3205f8 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index a8280acf9..38dd8f17a 100644 +index a8280acf94..38dd8f17a6 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -182,6 +182,7 @@ public class NBTTagList extends NBTList { @@ -101,7 +101,7 @@ index a8280acf9..38dd8f17a 100644 if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index fd64b75ed..3f0b6ac26 100644 +index ae11c2e431..e3c56a7506 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -940,6 +940,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -118,7 +118,7 @@ index fd64b75ed..3f0b6ac26 100644 flag = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f09251eec..34246369c 100644 +index f09251eec8..34246369c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -777,4 +777,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch index a0cbdf41ca..655cb1c5af 100644 --- a/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch @@ -1,14 +1,14 @@ -From 3b55d88bdefa6b3479ff0e0ee21da64912d24f0b Mon Sep 17 00:00:00 2001 +From 3056ae052dbb99ba08b30e2c597b4303aab4d977 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:52:34 -0600 Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 5b7f6ca84..8cab71c0e 100644 +index 0d54513a44..d8d519143e 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -175,7 +175,12 @@ public abstract class TileEntity implements KeyedObject { +@@ -178,7 +178,12 @@ public abstract class TileEntity implements KeyedObject { // Paper return TileEntityTypes.a.b(this.C()) + " // " + this.getClass().getCanonicalName(); }); if (this.world != null) { @@ -23,7 +23,7 @@ index 5b7f6ca84..8cab71c0e 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3f0b6ac26..c605d7e52 100644 +index e3c56a7506..bfe09a2055 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1166,10 +1166,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -44,7 +44,7 @@ index 3f0b6ac26..c605d7e52 100644 } @@ -1232,10 +1234,13 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose - ((ITickable) tileentity).X_(); + ((ITickable) tileentity).Y_(); this.methodProfiler.e(); } catch (Throwable throwable2) { - crashreport1 = CrashReport.a(throwable2, "Ticking block entity"); diff --git a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch index cd28f2150b..bc688557cc 100644 --- a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch @@ -1,14 +1,14 @@ -From 93cc4b95be1d52ac3f84b30a07ad93bd756584b5 Mon Sep 17 00:00:00 2001 +From de8f58f64cbe8823e170a5dfaa5393c4d88e8e6f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:58:50 -0600 Subject: [PATCH] Configurable top of nether void damage diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4da846719..a340866f3 100644 +index 38a697e1b7..68898d624f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -123,4 +123,10 @@ public class PaperWorldConfig { +@@ -124,4 +124,10 @@ public class PaperWorldConfig { if (fallingBlockHeightNerf != 0) log("Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf); } @@ -20,10 +20,10 @@ index 4da846719..a340866f3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6bb4cf48e..d378f1a9d 100644 +index 5ba537bab2..f95024cba5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -464,9 +464,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -460,9 +460,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance *= 0.5F; } @@ -39,7 +39,7 @@ index 6bb4cf48e..d378f1a9d 100644 if (!this.world.isClientSide) { this.setFlag(0, this.fireTicks > 0); -@@ -476,6 +482,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -472,6 +478,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.methodProfiler.e(); } @@ -54,7 +54,7 @@ index 6bb4cf48e..d378f1a9d 100644 protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -532,6 +546,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -528,6 +542,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fireTicks = 0; } @@ -63,7 +63,7 @@ index 6bb4cf48e..d378f1a9d 100644 this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index 2f4e1a280..3598998b5 100644 +index 6e48cf4751..4644d7efe3 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -201,9 +201,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT diff --git a/Spigot-Server-Patches/0028-Lighting-Queue.patch b/Spigot-Server-Patches/0028-Lighting-Queue.patch index 98de27d7d7..fda351e555 100644 --- a/Spigot-Server-Patches/0028-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0028-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From fe837b054c13a5ef4ad79e3111af573ff28c2bca Mon Sep 17 00:00:00 2001 +From 86c2617665e69182c21d9c57a6827cec49848fa8 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -6,7 +6,7 @@ Subject: [PATCH] Lighting Queue This provides option to queue lighting updates to ensure they do not cause the server lag diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 145cb274b..eff9dcf54 100644 +index 145cb274b0..eff9dcf54f 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -50,6 +50,8 @@ public class WorldTimingsHandler { @@ -28,10 +28,10 @@ index 145cb274b..eff9dcf54 100644 public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a340866f3..1e3405cc1 100644 +index 68898d624f..4b36a0f053 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -129,4 +129,10 @@ public class PaperWorldConfig { +@@ -130,4 +130,10 @@ public class PaperWorldConfig { netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); log("Top of the nether void damage: " + netherVoidTopDamage); } @@ -43,7 +43,7 @@ index a340866f3..1e3405cc1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4a4cc6c59..b0060c363 100644 +index adf3dee2ef..eb7a41977f 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -91,6 +91,7 @@ public class Chunk implements IChunkAccess { @@ -84,7 +84,7 @@ index 4a4cc6c59..b0060c363 100644 } TileEntity tileentity; -@@ -1290,6 +1300,16 @@ public class Chunk implements IChunkAccess { +@@ -1287,6 +1297,16 @@ public class Chunk implements IChunkAccess { return this.E == 8; } @@ -102,10 +102,10 @@ index 4a4cc6c59..b0060c363 100644 IMMEDIATE, QUEUED, CHECK; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index badfe86b2..51bc23daf 100644 +index aabdc9e2f0..d025d949e3 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -323,6 +323,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -333,6 +333,7 @@ public class ChunkProviderServer implements IChunkProvider { return false; } save = event.isSaveChunk(); @@ -114,10 +114,10 @@ index badfe86b2..51bc23daf 100644 // Update neighbor counts for (int x = -2; x < 3; x++) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2e691b9f6..4473c3b51 100644 +index ae17796ce2..1ac8d61cd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -825,7 +825,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -864,7 +864,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati protected void v() { co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper this.slackActivityAccountant.tickStarted(); // Spigot @@ -126,7 +126,7 @@ index 2e691b9f6..4473c3b51 100644 ++this.ticks; if (this.S) { -@@ -883,6 +883,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -922,6 +922,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.e(); this.methodProfiler.e(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -136,7 +136,7 @@ index 2e691b9f6..4473c3b51 100644 } diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java new file mode 100644 -index 000000000..345cd5824 +index 0000000000..345cd58240 --- /dev/null +++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java @@ -0,0 +1,92 @@ @@ -233,7 +233,7 @@ index 000000000..345cd5824 + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c605d7e52..f57bd081b 100644 +index bfe09a2055..c40ecbc0c3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -325,7 +325,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0029-Configurable-end-credits.patch b/Spigot-Server-Patches/0029-Configurable-end-credits.patch index e1e8151309..bc59ff5333 100644 --- a/Spigot-Server-Patches/0029-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0029-Configurable-end-credits.patch @@ -1,14 +1,14 @@ -From 57383fb576aa72fde6d72aa34d7c7f60e8984c52 Mon Sep 17 00:00:00 2001 +From f73a01ec2601dd1fc514d363f860195dc920ce36 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1e3405cc1..dccccbf5b 100644 +index 4b36a0f05..53921b381 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -135,4 +135,10 @@ public class PaperWorldConfig { +@@ -136,4 +136,10 @@ public class PaperWorldConfig { queueLightUpdates = getBoolean("queue-light-updates", false); log("Lighting Queue enabled: " + queueLightUpdates); } @@ -20,7 +20,7 @@ index 1e3405cc1..dccccbf5b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d4e9f489d..ace6db1fa 100644 +index 67f14370e..47808e22d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -62,7 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0031-Optimize-explosions.patch b/Spigot-Server-Patches/0031-Optimize-explosions.patch index ec7be6e19e..45e40840dd 100644 --- a/Spigot-Server-Patches/0031-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0031-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From 46d962a94e8bfe83e54319f47e57da34b4e7f741 Mon Sep 17 00:00:00 2001 +From de1dc6533183312e946c2138dc81c82ce73a9def Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dccccbf5b..3626aa717 100644 +index 53921b381..ae4a7cb09 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -141,4 +141,10 @@ public class PaperWorldConfig { +@@ -142,4 +142,10 @@ public class PaperWorldConfig { disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false); log("End credits disabled: " + disableEndCredits); } @@ -25,7 +25,7 @@ index dccccbf5b..3626aa717 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 6b9f6c956..8fdcd52b2 100644 +index e558a3a57..18c55402d 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -136,7 +136,7 @@ public class Explosion { @@ -124,10 +124,10 @@ index 6b9f6c956..8fdcd52b2 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4473c3b51..1027b0588 100644 +index 1ac8d61cd..96d31f874 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -990,6 +990,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1029,6 +1029,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati worldserver.getTracker().updatePlayers(); this.methodProfiler.e(); this.methodProfiler.e(); @@ -136,7 +136,7 @@ index 4473c3b51..1027b0588 100644 // this.f[i][this.ticks % 100] = SystemUtils.c() - j; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f57bd081b..04493a1f9 100644 +index c40ecbc0c..1ca3eef11 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch index d5b90354ec..49ee56d76e 100644 --- a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch @@ -1,14 +1,14 @@ -From 615504d69426ef74c5f9e55af1daaa5e37221abd Mon Sep 17 00:00:00 2001 +From ebdc4a1bf59df98fa5aababccb2d3c935dde070d Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:48:03 -0600 Subject: [PATCH] Disable explosion knockback diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3626aa717d..be92c1af60 100644 +index ae4a7cb09..f2f45ae4a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -147,4 +147,9 @@ public class PaperWorldConfig { +@@ -148,4 +148,9 @@ public class PaperWorldConfig { optimizeExplosions = getBoolean("optimize-explosions", false); log("Optimize explosions: " + optimizeExplosions); } @@ -19,10 +19,10 @@ index 3626aa717d..be92c1af60 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d7a8a82a6a..18dd06980f 100644 +index d6e9915c1..574883462 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1002,6 +1002,7 @@ public abstract class EntityLiving extends Entity { +@@ -1004,6 +1004,7 @@ public abstract class EntityLiving extends Entity { } } @@ -30,7 +30,7 @@ index d7a8a82a6a..18dd06980f 100644 if (flag1) { if (flag) { this.world.broadcastEntityEffect(this, (byte) 29); -@@ -1018,6 +1019,7 @@ public abstract class EntityLiving extends Entity { +@@ -1020,6 +1021,7 @@ public abstract class EntityLiving extends Entity { b0 = 2; } @@ -38,7 +38,7 @@ index d7a8a82a6a..18dd06980f 100644 this.world.broadcastEntityEffect(this, b0); } -@@ -1041,6 +1043,8 @@ public abstract class EntityLiving extends Entity { +@@ -1043,6 +1045,8 @@ public abstract class EntityLiving extends Entity { } } @@ -46,9 +46,9 @@ index d7a8a82a6a..18dd06980f 100644 + if (this.getHealth() <= 0.0F) { if (!this.e(damagesource)) { - SoundEffect soundeffect = this.cr(); + SoundEffect soundeffect = this.cs(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 8fdcd52b2f..75b21010b8 100644 +index 18c55402d..7c676f9f3 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -152,7 +152,7 @@ public class Explosion { diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0034-Disable-thunder.patch index 4de1ad026e..0478925439 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0034-Disable-thunder.patch @@ -1,14 +1,14 @@ -From cd9a4513e386b038109e500412c6c2c6d8a93849 Mon Sep 17 00:00:00 2001 +From 703ce6a2582f6aea1e9134b9468232cdb0481382 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:52:43 -0600 Subject: [PATCH] Disable thunder diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index be92c1af6..efacd5ea0 100644 +index f2f45ae4a..a27e52d03 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -152,4 +152,9 @@ public class PaperWorldConfig { +@@ -153,4 +153,9 @@ public class PaperWorldConfig { private void disableExplosionKnockback(){ disableExplosionKnockback = getBoolean("disable-explosion-knockback", false); } @@ -19,7 +19,7 @@ index be92c1af6..efacd5ea0 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d7f86bf76..a4003896d 100644 +index f032ecab6..5ee771e83 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -491,7 +491,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch index 5d0dc78511..842e6029a5 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch @@ -1,14 +1,14 @@ -From cab788edd773fc1a581a521107226a7696be225d Mon Sep 17 00:00:00 2001 +From 227e944778893d855f8d85e11d8ffd0dad2354ec Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index efacd5ea0..0130e5860 100644 +index a27e52d03..ab119b914 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -157,4 +157,9 @@ public class PaperWorldConfig { +@@ -158,4 +158,9 @@ public class PaperWorldConfig { private void disableThunder() { disableThunder = getBoolean("disable-thunder", false); } @@ -19,7 +19,7 @@ index efacd5ea0..0130e5860 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a4003896d..9bd11a5fd 100644 +index 5ee771e83..dd09ab20e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -513,7 +513,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch b/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch index 1c50fd959e..b4aa3c9e9c 100644 --- a/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch +++ b/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch @@ -1,14 +1,14 @@ -From a38f27e8f25f8c3abdd17a3637544e15c42d87fc Mon Sep 17 00:00:00 2001 +From a2dce69cf0a7c65dc36e93f20528370a4f6f7c7b Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 15:03:53 -0600 Subject: [PATCH] Configurable mob spawner tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0130e5860..47f391243 100644 +index ab119b914..59bd3e28f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -162,4 +162,9 @@ public class PaperWorldConfig { +@@ -163,4 +163,9 @@ public class PaperWorldConfig { private void disableIceAndSnow(){ disableIceAndSnow = getBoolean("disable-ice-and-snow", false); } diff --git a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch index c9bc1c10db..80d20ad6fe 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch @@ -1,14 +1,14 @@ -From 46a15c4b0cd3a9491acf600f25d0cf791c6462c2 Mon Sep 17 00:00:00 2001 +From de00011ef7d2a81cec22bf1ee37a8c00441150d1 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 23:34:44 -0600 Subject: [PATCH] Configurable container update tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 47f391243..26d8dbb60 100644 +index 59bd3e28f..f8d2aae08 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -167,4 +167,9 @@ public class PaperWorldConfig { +@@ -168,4 +168,9 @@ public class PaperWorldConfig { private void mobSpawnerTickRate() { mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); } @@ -19,7 +19,7 @@ index 47f391243..26d8dbb60 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8ca7da336..55eaa89f6 100644 +index 2b13729e4..80371a836 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch index 1cd6556105..0d3cff8eb8 100644 --- a/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch @@ -1,11 +1,11 @@ -From 522f622aa3d885d5b3bd892b89dec52866b0a273 Mon Sep 17 00:00:00 2001 +From b76742efb1e1fbab724579730c3790783c0e0b49 Mon Sep 17 00:00:00 2001 From: Techcable Date: Wed, 2 Mar 2016 23:42:37 -0600 Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 4cfc70aa7..52de1439e 100644 +index e5b9310ea..e9e2c1445 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -6,6 +6,7 @@ import net.minecraft.server.GameProfileSerializer; @@ -16,7 +16,7 @@ index 4cfc70aa7..52de1439e 100644 import org.bukkit.Bukkit; import org.bukkit.Material; -@@ -153,7 +154,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -152,7 +153,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { if (name == null) { profile = null; } else { diff --git a/Spigot-Server-Patches/0042-Configurable-Chunk-IO-Thread-Base-Count.patch b/Spigot-Server-Patches/0042-Configurable-Chunk-IO-Thread-Base-Count.patch index 5edee63477..c06588607b 100644 --- a/Spigot-Server-Patches/0042-Configurable-Chunk-IO-Thread-Base-Count.patch +++ b/Spigot-Server-Patches/0042-Configurable-Chunk-IO-Thread-Base-Count.patch @@ -1,14 +1,14 @@ -From 2f4912d0c8eec5bad1fcda1233ac3457c68fb86c Mon Sep 17 00:00:00 2001 +From 14bab37b82c4924cb1ece931a0a2c57a9a54bfe8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 23:46:57 -0600 Subject: [PATCH] Configurable Chunk IO Thread Base Count diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b5795b6d3..36689db74 100644 +index e4ed7d674..d48ef7e85 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -199,4 +199,9 @@ public class PaperConfig { +@@ -203,4 +203,9 @@ public class PaperConfig { " - Interval: " + timeSummary(Timings.getHistoryInterval() / 20) + " - Length: " + timeSummary(Timings.getHistoryLength() / 20)); } diff --git a/Spigot-Server-Patches/0044-Disable-chest-cat-detection.patch b/Spigot-Server-Patches/0044-Configurable-Disabling-Cat-Chest-Detection.patch similarity index 83% rename from Spigot-Server-Patches/0044-Disable-chest-cat-detection.patch rename to Spigot-Server-Patches/0044-Configurable-Disabling-Cat-Chest-Detection.patch index c4e1113278..dfeb21d8b0 100644 --- a/Spigot-Server-Patches/0044-Disable-chest-cat-detection.patch +++ b/Spigot-Server-Patches/0044-Configurable-Disabling-Cat-Chest-Detection.patch @@ -1,14 +1,15 @@ -From 0a6e431075e7177f15c75f170b214b3957ed37de Mon Sep 17 00:00:00 2001 +From 450ef34e2ad19b38f7904431dc535982919b165d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 -Subject: [PATCH] Disable chest cat detection +Subject: [PATCH] Configurable Disabling Cat Chest Detection +Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 26d8dbb60..43aa73e1d 100644 +index f8d2aae08..d91b48b0a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -172,4 +172,9 @@ public class PaperWorldConfig { +@@ -173,4 +173,9 @@ public class PaperWorldConfig { private void containerUpdateTickRate() { containerUpdateTickRate = getInt("container-update-tick-rate", 1); } @@ -19,7 +20,7 @@ index 26d8dbb60..43aa73e1d 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index d55122c66..f8be07258 100644 +index 0f6902747..1ad39aca3 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java @@ -235,6 +235,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC diff --git a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch index bf309e979c..eaf88d603c 100644 --- a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From d580113b141bff72bf56e052480927f606b34ae2 Mon Sep 17 00:00:00 2001 +From bd9a065c4b1cbe5ff5dc45da9193adc0e9328252 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:17:12 -0600 Subject: [PATCH] Ensure commands are not ran async @@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 359aa3997..88b761d27 100644 +index 5d42cfe81c..dc38e4e043 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1548,6 +1548,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -48,10 +48,10 @@ index 359aa3997..88b761d27 100644 } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6e152fe17..d637199ca 100644 +index 6ad91a16f2..a270d31b22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -689,6 +689,29 @@ public final class CraftServer implements Server { +@@ -690,6 +690,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot @@ -82,7 +82,7 @@ index 6e152fe17..d637199ca 100644 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index a0cdd2317..984df4083 100644 +index a0cdd2317c..984df4083d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -14,6 +14,7 @@ public class ServerShutdownThread extends Thread { @@ -94,7 +94,7 @@ index a0cdd2317..984df4083 100644 } catch (ExceptionWorldConflict ex) { ex.printStackTrace(); diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 4b3aa85c9..e44c23016 100644 +index 4b3aa85c97..e44c230165 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -6,6 +6,7 @@ public class AsyncCatcher @@ -106,7 +106,7 @@ index 4b3aa85c9..e44c23016 100644 public static void catchOp(String reason) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 49768734d..947c43a5d 100644 +index 49768734d0..947c43a5d0 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -43,6 +43,7 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch index 81758b1ebc..34dd25e029 100644 --- a/Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,14 +1,14 @@ -From 5a999ec5367ea0c9db12b34d098b39d8ff86404b Mon Sep 17 00:00:00 2001 +From 8d686401dc81d0556b8c9157171301b1b0661901 Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 43aa73e1d..0743db5ac 100644 +index d91b48b0a..7d1f6cde9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -177,4 +177,9 @@ public class PaperWorldConfig { +@@ -178,4 +178,9 @@ public class PaperWorldConfig { private void disableChestCatDetection() { disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); } @@ -19,7 +19,7 @@ index 43aa73e1d..0743db5ac 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 3167c3f5f..3b13b697a 100644 +index 31e066b54..eeaf98e82 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -252,7 +252,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { diff --git a/Spigot-Server-Patches/0047-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0047-Optimize-Pathfinding.patch index dc3f59b879..ed5f4093cb 100644 --- a/Spigot-Server-Patches/0047-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0047-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 77d4e20f2d1dcbac4798b664c809dbcf3819dbf2 Mon Sep 17 00:00:00 2001 +From a582f2795d2b29ef1c1d52de9dafde6db552ec36 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 9337b9397..1964684ac 100644 +index 62cb81516..8111317e3 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -122,10 +122,26 @@ public abstract class NavigationAbstract { @@ -41,7 +41,7 @@ index 9337b9397..1964684ac 100644 @@ -258,6 +274,7 @@ public abstract class NavigationAbstract { } - public void r() { + public void q() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } diff --git a/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch index 645e874428..4e27f43a5a 100644 --- a/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From ea3bad289da996b408a4296df89f75f24925f97e Mon Sep 17 00:00:00 2001 +From 65217eb509331593bef12e5c2a710df06d993889 Mon Sep 17 00:00:00 2001 From: CullanP Date: Thu, 3 Mar 2016 02:13:38 -0600 Subject: [PATCH] Avoid hopper searches if there are no items @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b0060c363..2d55abd7a 100644 +index 39aeabff74..ea7d82f099 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -92,6 +92,10 @@ public class Chunk implements IChunkAccess { @@ -38,7 +38,7 @@ index b0060c363..2d55abd7a 100644 + inventoryEntityCounts[k]++; + } entity.setCurrentChunk(this); - entityCounts.increment(entity.entityKeyString); + entityCounts.increment(entity.getMinecraftKeyString()); // Paper end @@ -710,6 +719,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { @@ -50,9 +50,9 @@ index b0060c363..2d55abd7a 100644 + inventoryEntityCounts[i]--; + } entity.setCurrentChunk(null); - entityCounts.decrement(entity.entityKeyString); + entityCounts.decrement(entity.getMinecraftKeyString()); // Paper end -@@ -901,6 +915,15 @@ public class Chunk implements IChunkAccess { +@@ -898,6 +912,15 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[k].isEmpty()) { Iterator iterator = this.entitySlices[k].iterator(); @@ -68,7 +68,7 @@ index b0060c363..2d55abd7a 100644 while (iterator.hasNext()) { Entity entity1 = (Entity) iterator.next(); -@@ -937,7 +960,18 @@ public class Chunk implements IChunkAccess { +@@ -934,7 +957,18 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); diff --git a/Spigot-Server-Patches/0049-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0049-Expose-server-CommandMap.patch index 72c0fd7576..20acd17d24 100644 --- a/Spigot-Server-Patches/0049-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0049-Expose-server-CommandMap.patch @@ -1,14 +1,14 @@ -From 7ad52fafe34a337de31950cfcb5714b42936672c Mon Sep 17 00:00:00 2001 +From c66ee93656b5300113b076f9643a454227cf850a Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:15:57 -0600 Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d637199ca..703d38f0c 100644 +index a270d31b22..d7e77a849a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1604,6 +1604,7 @@ public final class CraftServer implements Server { +@@ -1588,6 +1588,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch index 930eece095..dd5a65b455 100644 --- a/Spigot-Server-Patches/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -1,14 +1,14 @@ -From 3b79ccc01c8f6b19bf814b9e52598581701b2539 Mon Sep 17 00:00:00 2001 +From 159d7089d7b7173190d8b6453c0aea61acfc0ae5 Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:18:39 -0600 Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 13100e5d21..1620d9a74e 100644 +index ae402a2bf4..9079f5e903 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -97,7 +97,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -98,7 +98,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setHealth(double health) { health = (float) health; if ((health < 0) || (health > getMaxHealth())) { diff --git a/Spigot-Server-Patches/0052-Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/0052-Ensure-inv-drag-is-in-bounds.patch index 3debd842c1..91de1e75c8 100644 --- a/Spigot-Server-Patches/0052-Ensure-inv-drag-is-in-bounds.patch +++ b/Spigot-Server-Patches/0052-Ensure-inv-drag-is-in-bounds.patch @@ -1,14 +1,14 @@ -From 54b195686cf6fb4e7669f2f823b5da49e7bf7155 Mon Sep 17 00:00:00 2001 +From 383cb078929132e57e648249639e8fc7cd507ea4 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:33:53 -0600 Subject: [PATCH] Ensure inv drag is in bounds diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java -index e86ffb4dc..0bf14b671 100644 +index 0ae0b5ed8..1573c0559 100644 --- a/src/main/java/net/minecraft/server/Container.java +++ b/src/main/java/net/minecraft/server/Container.java -@@ -141,7 +141,7 @@ public abstract class Container { +@@ -139,7 +139,7 @@ public abstract class Container { this.c(); } } else if (this.g == 1) { diff --git a/Spigot-Server-Patches/0054-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0054-Add-configurable-portal-search-radius.patch index 5e2de32209..be54590595 100644 --- a/Spigot-Server-Patches/0054-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0054-Add-configurable-portal-search-radius.patch @@ -1,14 +1,14 @@ -From 74a7ab25d619909662d40a3c39e68fc40f87bc97 Mon Sep 17 00:00:00 2001 +From c75d946dc9c6bf4a6fae51cbe0ef7bf3e4b506ad Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:46:17 -0600 Subject: [PATCH] Add configurable portal search radius diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0743db5ac..1ba09df9c 100644 +index 7d1f6cde9..c98286999 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -182,4 +182,9 @@ public class PaperWorldConfig { +@@ -183,4 +183,9 @@ public class PaperWorldConfig { private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); } diff --git a/Spigot-Server-Patches/0055-Add-velocity-warnings.patch b/Spigot-Server-Patches/0055-Add-velocity-warnings.patch index 3da580a0ff..70ac7175fe 100644 --- a/Spigot-Server-Patches/0055-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0055-Add-velocity-warnings.patch @@ -1,14 +1,14 @@ -From 76cf594d89a46249517f0ba6ce8fbc613fbf0cc8 Mon Sep 17 00:00:00 2001 +From 4409e5d855574376439fcdf9b600891e3bff726d Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 703d38f0c..a9d60b8d2 100644 +index d7e77a849a..e701b37cb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -189,6 +189,7 @@ public final class CraftServer implements Server { +@@ -190,6 +190,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -17,7 +17,7 @@ index 703d38f0c..a9d60b8d2 100644 private final class BooleanWrapper { private boolean value = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 34246369c..03a3328b0 100644 +index 34246369c5..03a3328b06 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -262,12 +262,44 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -66,7 +66,7 @@ index 34246369c..03a3328b0 100644 public double getHeight() { return getHandle().length; diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 91b8aa6a1..0c106ea9c 100644 +index 91b8aa6a16..0c106ea9c5 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -66,7 +66,19 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/0056-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0056-Configurable-inter-world-teleportation-safety.patch index 650e6d785f..5071df45af 100644 --- a/Spigot-Server-Patches/0056-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0056-Configurable-inter-world-teleportation-safety.patch @@ -1,4 +1,4 @@ -From 7d4cc359892f4167574b00e9ae7bb76c528545d6 Mon Sep 17 00:00:00 2001 +From ab452f9cd59aa0e074a0b65d0a91148dd0b4932d Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Thu, 3 Mar 2016 02:50:31 -0600 Subject: [PATCH] Configurable inter-world teleportation safety @@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1ba09df9c..6fc3b7621 100644 +index c98286999..4a2d29674 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -187,4 +187,9 @@ public class PaperWorldConfig { +@@ -188,4 +188,9 @@ public class PaperWorldConfig { private void portalSearchRadius() { portalSearchRadius = getInt("portal-search-radius", 128); } @@ -30,7 +30,7 @@ index 1ba09df9c..6fc3b7621 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 23562388a..23cab725d 100644 +index 90cb2d277..8b3c2d287 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -798,7 +798,7 @@ public abstract class PlayerList { @@ -43,7 +43,7 @@ index 23562388a..23cab725d 100644 entityplayer.getBukkitEntity().setVelocity(velocity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 18f68b925..aacf8ea7f 100644 +index 06e79b4b3..650523614 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -660,7 +660,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch index 152ceab6e7..2e051d3c28 100644 --- a/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 8dbd8eba1f8a7f3c7dc31d92225602ea6438fb91 Mon Sep 17 00:00:00 2001 +From fb4b41fa026be788337abf1f961f30431821c147 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java new file mode 100644 -index 000000000..93397188b +index 0000000000..93397188b7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java @@ -0,0 +1,38 @@ @@ -50,7 +50,7 @@ index 000000000..93397188b +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2d55abd7a..7ea4b9b5c 100644 +index 0d80d811a3..e3f7ec6100 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -77,7 +77,7 @@ index 2d55abd7a..7ea4b9b5c 100644 public IBlockData getType(BlockPosition blockposition) { return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()); } -@@ -806,10 +810,15 @@ public class Chunk implements IChunkAccess { +@@ -803,10 +807,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -98,7 +98,7 @@ index 2d55abd7a..7ea4b9b5c 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 51bc23daf..bb96a7392 100644 +index d025d949e3..0e04d65981 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -17,6 +17,7 @@ import java.util.concurrent.ExecutionException; @@ -109,7 +109,7 @@ index 51bc23daf..bb96a7392 100644 import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -215,7 +216,11 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -225,7 +226,11 @@ public class ChunkProviderServer implements IChunkProvider { try { // this.chunkLoader.a(this.world, chunk); // Spigot } catch (Exception exception) { @@ -122,7 +122,7 @@ index 51bc23daf..bb96a7392 100644 } } -@@ -225,9 +230,14 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -235,9 +240,14 @@ public class ChunkProviderServer implements IChunkProvider { ichunkaccess.setLastSaved(this.world.getTime()); this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { @@ -140,7 +140,7 @@ index 51bc23daf..bb96a7392 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 33e5aaf2c..f13534917 100644 +index 33e5aaf2c0..f135349174 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -167,7 +167,7 @@ index 33e5aaf2c..f13534917 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java -index 0ffca4301..86d8fd0d9 100644 +index 6b5600ba5f..72f3867203 100644 --- a/src/main/java/net/minecraft/server/PersistentCollection.java +++ b/src/main/java/net/minecraft/server/PersistentCollection.java @@ -1,5 +1,6 @@ @@ -194,7 +194,7 @@ index 0ffca4301..86d8fd0d9 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 94364baae..c80d724f0 100644 +index 31899549d5..cc7cad8be4 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -212,7 +212,7 @@ index 94364baae..c80d724f0 100644 } } -@@ -209,6 +211,7 @@ public class RegionFile { +@@ -237,6 +239,7 @@ public class RegionFile { this.b(i, j, (int) (SystemUtils.d() / 1000L)); } catch (IOException ioexception) { ioexception.printStackTrace(); @@ -221,7 +221,7 @@ index 94364baae..c80d724f0 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index d394645a5..384628ccc 100644 +index 0e91aeec38..ff473a263f 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -1,5 +1,6 @@ @@ -240,7 +240,7 @@ index d394645a5..384628ccc 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index aec9cdae5..6d842df62 100644 +index b12e767db9..342a15db5e 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager; @@ -268,7 +268,7 @@ index aec9cdae5..6d842df62 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 4ff243dab..67b2e41c7 100644 +index 4ff243dabe..67b2e41c7c 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -288,7 +288,7 @@ index 4ff243dab..67b2e41c7 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26b2a1fd4..d51ed0f80 100644 +index 30cafca041..fa75ed4963 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,6 +1,8 @@ @@ -325,7 +325,7 @@ index 26b2a1fd4..d51ed0f80 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 93b9134d6..26753fac5 100644 +index 93b9134d6e..26753fac5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference; diff --git a/Spigot-Server-Patches/0059-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0059-Disable-Scoreboards-for-non-players-by-default.patch index 55a54dc449..0954dc7e24 100644 --- a/Spigot-Server-Patches/0059-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0059-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From e3d93eaaa690554b73b4a0a9ad90f214559284ec Mon Sep 17 00:00:00 2001 +From ab2fb84cb4d0a1c63cb6d445067c98e9b7e45877 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 8 Mar 2016 23:25:45 -0500 Subject: [PATCH] Disable Scoreboards for non players by default @@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6fc3b7621d..93486b4b82 100644 +index 4a2d296746..2b25da0465 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -192,4 +192,9 @@ public class PaperWorldConfig { +@@ -193,4 +193,9 @@ public class PaperWorldConfig { private void disableTeleportationSuffocationCheck() { disableTeleportationSuffocationCheck = getBoolean("disable-teleportation-suffocation-check", false); } @@ -25,10 +25,10 @@ index 6fc3b7621d..93486b4b82 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d378f1a9df..e16579116a 100644 +index b2f6bca8aa..22cd9c7d82 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2252,6 +2252,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2259,6 +2259,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase be() { @@ -37,7 +37,7 @@ index d378f1a9df..e16579116a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 18dd06980f..ab64fb7872 100644 +index 574883462d..dd48c6af0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -537,6 +537,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0060-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0060-Add-methods-for-working-with-arrows-stuck-in-living-.patch index cc4427de41..ed3a8e05d5 100644 --- a/Spigot-Server-Patches/0060-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0060-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -1,14 +1,14 @@ -From 6ed7bec1024ce7726a7feed2ca16e3b80ef3df07 Mon Sep 17 00:00:00 2001 +From 268f500c4d2b68c8a7a6e967496e1bf6b9479eee Mon Sep 17 00:00:00 2001 From: mrapple Date: Sun, 25 Nov 2012 13:43:39 -0600 Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1620d9a74e..506d0d4e48 100644 +index 9079f5e903..b25ce0c58f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -509,4 +509,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -507,4 +507,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public boolean isCollidable() { return getHandle().collides; } diff --git a/Spigot-Server-Patches/0062-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0062-Chunk-save-queue-improvements.patch index 7521d504a1..533bfbc04c 100644 --- a/Spigot-Server-Patches/0062-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0062-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From ac2e096b98ab349ce20eb01bb7543fa3aaf4f4ee Mon Sep 17 00:00:00 2001 +From c8b51eeedd60beed4dc70db20bba967b5f60e48e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Mar 2016 18:18:37 -0600 Subject: [PATCH] Chunk save queue improvements @@ -26,10 +26,10 @@ Then finally, Sleeping will by default be removed, but due to known issues with But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 36689db74..3898ad8fa 100644 +index d48ef7e85..280cfd553 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -204,4 +204,10 @@ public class PaperConfig { +@@ -208,4 +208,10 @@ public class PaperConfig { private static void chunkLoadThreads() { minChunkLoadThreads = Math.min(6, getInt("settings.min-chunk-load-threads", 2)); // Keep people from doing stupid things with max of 6 } @@ -41,7 +41,7 @@ index 36689db74..3898ad8fa 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 3a0e52d88..8701777cc 100644 +index 5001fd11d..b247d5f07 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -25,6 +25,7 @@ import java.util.function.Consumer; @@ -75,22 +75,7 @@ index 3a0e52d88..8701777cc 100644 private final File c; private final DataFixer d; private PersistentStructureLegacy e; -@@ -285,7 +299,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { - } - }; - } else { -- if (this.b.containsKey(chunkcoordintpair) && this.a(this.b.get(chunkcoordintpair).get()) == ChunkStatus.Type.LEVELCHUNK || this.a(this.b(world, chunkcoordintpair.x, chunkcoordintpair.z)) == ChunkStatus.Type.LEVELCHUNK) { -+ // Paper start -+ Supplier existingSave; -+ synchronized (this) { -+ existingSave = this.b.get(chunkcoordintpair); -+ } -+ if (existingSave != null && this.a(existingSave.get()) == ChunkStatus.Type.LEVELCHUNK || this.a(this.b(world, chunkcoordintpair.x, chunkcoordintpair.z)) == ChunkStatus.Type.LEVELCHUNK) { // Paper - extract existingSave to synchronized lookup -+ // Paper end - return; - } - -@@ -296,8 +316,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -298,8 +312,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } }; } @@ -101,7 +86,7 @@ index 3a0e52d88..8701777cc 100644 // Spigot end } catch (Exception exception) { ChunkRegionLoader.a.error("Failed to save chunk", exception); -@@ -306,18 +326,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -308,18 +322,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, Supplier nbttagcompound) { // Spigot @@ -128,7 +113,7 @@ index 3a0e52d88..8701777cc 100644 if (logCompletion) { // CraftBukkit end ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.c.getName()); -@@ -325,17 +349,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -327,17 +345,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return false; } else { @@ -148,7 +133,7 @@ index 3a0e52d88..8701777cc 100644 if (nbttagcompound != null) { try { -@@ -347,7 +367,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -349,7 +363,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { flag = true; } finally { diff --git a/Spigot-Server-Patches/0063-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0063-Chunk-Save-Reattempt.patch index bcd919ae19..b115bd7efd 100644 --- a/Spigot-Server-Patches/0063-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0063-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From 2fafede916dc83820145ee9a6663fa1f9725d8da Mon Sep 17 00:00:00 2001 +From cd1396b77d29f151316d181df8ce104bd61c5974 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 8701777cc..ad3bd3808 100644 +index b247d5f07..f007af2e1 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -358,11 +358,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -354,11 +354,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(chunk.compoundSupplier); // Spigot // Paper if (nbttagcompound != null) { @@ -28,10 +28,10 @@ index 8701777cc..ad3bd3808 100644 flag = true; diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index c80d724f0..3f9aa5923 100644 +index cc7cad8be..b8b514c87 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -210,8 +210,7 @@ public class RegionFile { +@@ -238,8 +238,7 @@ public class RegionFile { this.b(i, j, (int) (SystemUtils.d() / 1000L)); } catch (IOException ioexception) { diff --git a/Spigot-Server-Patches/0064-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0064-Default-loading-permissions.yml-before-plugins.patch index 155cff833f..072cb6f5bb 100644 --- a/Spigot-Server-Patches/0064-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0064-Default-loading-permissions.yml-before-plugins.patch @@ -1,4 +1,4 @@ -From 5a623a83533bb34b25140ad0d0e91f8000e7ce0f Mon Sep 17 00:00:00 2001 +From e9ee81ba8c88cb42333db3f2dcd73378dd8222b3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:17:38 -0400 Subject: [PATCH] Default loading permissions.yml before plugins @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 3898ad8fa..2f6e169f5 100644 +index 280cfd5534..40c5ea4745 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -210,4 +210,9 @@ public class PaperConfig { +@@ -214,4 +214,9 @@ public class PaperConfig { enableFileIOThreadSleep = getBoolean("settings.sleep-between-chunk-saves", false); if (enableFileIOThreadSleep) Bukkit.getLogger().info("Enabled sleeping between chunk saves, beware of memory issues"); } @@ -30,10 +30,10 @@ index 3898ad8fa..2f6e169f5 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a9d60b8d2..4db5aacc4 100644 +index e701b37cb4..030d68a704 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -330,6 +330,7 @@ public final class CraftServer implements Server { +@@ -331,6 +331,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index a9d60b8d2..4db5aacc4 100644 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -347,7 +348,7 @@ public final class CraftServer implements Server { +@@ -348,7 +349,7 @@ public final class CraftServer implements Server { setVanillaCommands(false); // Spigot end commandMap.registerServerAliases(); diff --git a/Spigot-Server-Patches/0065-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0065-Allow-Reloading-of-Custom-Permissions.patch index 327c6df06f..c635b78d64 100644 --- a/Spigot-Server-Patches/0065-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0065-Allow-Reloading-of-Custom-Permissions.patch @@ -1,4 +1,4 @@ -From 63781dcbca84f8aa63d89c21777f46521465843f Mon Sep 17 00:00:00 2001 +From 184517875c3d769ae9242daf249ac905affd1a36 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:30:17 -0400 Subject: [PATCH] Allow Reloading of Custom Permissions @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4db5aacc4..1c9637ff7 100644 +index 030d68a704..83364efb50 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1960,5 +1960,20 @@ public final class CraftServer implements Server { +@@ -1944,5 +1944,20 @@ public final class CraftServer implements Server { return false; } } diff --git a/Spigot-Server-Patches/0066-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0066-Remove-Metadata-on-reload.patch index 7be6ed6ba7..9f91340c75 100644 --- a/Spigot-Server-Patches/0066-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0066-Remove-Metadata-on-reload.patch @@ -1,4 +1,4 @@ -From 9143857ff7220c7c81e4ed9aa68f1a077b053001 Mon Sep 17 00:00:00 2001 +From 6a88f48f2414502aeda9ce864b9bf41a86541d13 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:50:14 -0400 Subject: [PATCH] Remove Metadata on reload @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1c9637ff7..f90dc11f2 100644 +index 83364efb50..f3af4ba520 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -787,8 +787,18 @@ public final class CraftServer implements Server { +@@ -788,8 +788,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0067-Undead-horse-leashing.patch b/Spigot-Server-Patches/0067-Undead-horse-leashing.patch index 89c84c87d7..3a6003dece 100644 --- a/Spigot-Server-Patches/0067-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0067-Undead-horse-leashing.patch @@ -1,4 +1,4 @@ -From f69028b687e1bd6a11652475c83091366a7ebf5c Mon Sep 17 00:00:00 2001 +From d42451ddbcec9ccf105db6654eaea64ef60471ae Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:19:19 -0400 Subject: [PATCH] Undead horse leashing @@ -6,10 +6,10 @@ Subject: [PATCH] Undead horse leashing default false to match vanilla, but option to allow undead horse types to be leashed. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 93486b4b8..cd20572eb 100644 +index 2b25da046..6f96627a2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -197,4 +197,9 @@ public class PaperWorldConfig { +@@ -198,4 +198,9 @@ public class PaperWorldConfig { private void nonPlayerEntitiesOnScoreboards() { nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false); } @@ -20,7 +20,7 @@ index 93486b4b8..cd20572eb 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index fbf6aa40d..0fe269bc8 100644 +index 2af12985e..7c8053acd 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -113,7 +113,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven diff --git a/Spigot-Server-Patches/0068-Fix-Furnace-cook-time-bug.patch b/Spigot-Server-Patches/0068-Fix-Furnace-cook-time-bug.patch index 2b39eb7d3d..6da7d4e90e 100644 --- a/Spigot-Server-Patches/0068-Fix-Furnace-cook-time-bug.patch +++ b/Spigot-Server-Patches/0068-Fix-Furnace-cook-time-bug.patch @@ -1,4 +1,4 @@ -From 2223947a61cc98c1e2b2c3e52c5e0bad7399dceb Mon Sep 17 00:00:00 2001 +From db448a33d090f16e94422a122727963472d771a1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:24:53 -0400 Subject: [PATCH] Fix Furnace cook time bug @@ -9,10 +9,10 @@ cook in the expected amount of time as the cook time was not decremented correct This patch ensures that furnaces cook to the correct wall time expectation. diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 8f9a59693..3a587a766 100644 +index b484fc721..bc158b877 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -272,7 +272,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -267,7 +267,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve if (this.isBurning() && this.canBurn(irecipe)) { this.cookTime += elapsedTicks; if (this.cookTime >= this.cookTimeTotal) { diff --git a/Spigot-Server-Patches/0069-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0069-Handle-Item-Meta-Inconsistencies.patch index 9e8d20b63f..f7c7d34cc9 100644 --- a/Spigot-Server-Patches/0069-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0069-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 8025896d1051dc63efd41729fc4433bc18f66e61 Mon Sep 17 00:00:00 2001 +From 8a48c219a19b1af517a7c92351f522421411241a Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 68a59e708..ed714c2cc 100644 +index e7b5daf28e..6e7b2e721d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader; @@ -30,7 +30,7 @@ index 68a59e708..ed714c2cc 100644 import java.util.Locale; import java.util.Objects; import java.util.Random; -@@ -54,6 +56,22 @@ public final class ItemStack { +@@ -56,6 +58,22 @@ public final class ItemStack { decimalformat.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); return decimalformat; } @@ -53,7 +53,7 @@ index 68a59e708..ed714c2cc 100644 public ItemStack(IMaterial imaterial) { this(imaterial, 1); -@@ -96,6 +114,7 @@ public final class ItemStack { +@@ -98,6 +116,7 @@ public final class ItemStack { if (nbttagcompound.hasKeyOfType("tag", 10)) { // CraftBukkit start - make defensive copy as this data may be coming from the save thread this.tag = (NBTTagCompound) nbttagcompound.getCompound("tag").clone(); @@ -61,7 +61,7 @@ index 68a59e708..ed714c2cc 100644 this.getItem().a(this.tag); // CraftBukkit end } -@@ -567,6 +586,7 @@ public final class ItemStack { +@@ -569,6 +588,7 @@ public final class ItemStack { // Paper end public void setTag(@Nullable NBTTagCompound nbttagcompound) { this.tag = nbttagcompound; @@ -69,7 +69,7 @@ index 68a59e708..ed714c2cc 100644 } public IChatBaseComponent getName() { -@@ -643,6 +663,7 @@ public final class ItemStack { +@@ -645,6 +665,7 @@ public final class ItemStack { nbttagcompound.setString("id", String.valueOf(Enchantment.enchantments.b(enchantment))); nbttagcompound.setShort("lvl", (short) ((byte) i)); nbttaglist.add((NBTBase) nbttagcompound); @@ -78,7 +78,7 @@ index 68a59e708..ed714c2cc 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index d41459ef0..cadff64bf 100644 +index f4672b9a48..e2699564af 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -89,7 +89,7 @@ index d41459ef0..cadff64bf 100644 import java.util.Map; import net.minecraft.server.EnchantmentManager; -@@ -185,28 +186,11 @@ public final class CraftItemStack extends ItemStack { +@@ -186,28 +187,11 @@ public final class CraftItemStack extends ItemStack { public void addUnsafeEnchantment(Enchantment ench, int level) { Validate.notNull(ench, "Cannot add null enchantment"); @@ -123,7 +123,7 @@ index d41459ef0..cadff64bf 100644 } static boolean makeTag(net.minecraft.server.ItemStack item) { -@@ -223,66 +207,35 @@ public final class CraftItemStack extends ItemStack { +@@ -224,66 +208,35 @@ public final class CraftItemStack extends ItemStack { @Override public boolean containsEnchantment(Enchantment ench) { @@ -204,7 +204,7 @@ index d41459ef0..cadff64bf 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3b73e52fa..e43a24989 100644 +index f10de8550c..f21c1e846d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -8,12 +8,14 @@ import java.lang.reflect.Constructor; @@ -222,15 +222,15 @@ index 3b73e52fa..e43a24989 100644 import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; -@@ -46,6 +48,7 @@ import java.util.Arrays; +@@ -47,6 +49,7 @@ import java.util.Arrays; import java.util.EnumSet; import java.util.HashSet; import java.util.Set; +import java.util.TreeMap; import java.util.logging.Level; import java.util.logging.Logger; - import net.minecraft.server.NBTCompressedStreamTools; -@@ -233,7 +236,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { + import net.minecraft.server.ChatComponentText; +@@ -235,7 +238,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { private IChatBaseComponent displayName; private IChatBaseComponent locName; private List lore; @@ -239,7 +239,7 @@ index 3b73e52fa..e43a24989 100644 private int repairCost; private int hideFlag; private boolean unbreakable; -@@ -242,7 +245,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -244,7 +247,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { private static final Set HANDLED_TAGS = Sets.newHashSet(); private NBTTagCompound internalTag; @@ -248,7 +248,7 @@ index 3b73e52fa..e43a24989 100644 CraftMetaItem(CraftMetaItem meta) { if (meta == null) { -@@ -257,7 +260,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -259,7 +262,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } if (meta.enchantments != null) { // Spigot @@ -257,7 +257,7 @@ index 3b73e52fa..e43a24989 100644 } this.repairCost = meta.repairCost; -@@ -482,13 +485,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -492,13 +495,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } } @@ -273,8 +273,8 @@ index 3b73e52fa..e43a24989 100644 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -563,13 +566,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { - void deserializeInternal(NBTTagCompound tag) { +@@ -573,13 +576,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { + void deserializeInternal(NBTTagCompound tag, Object context) { } - static Map buildEnchantments(Map map, ItemMetaKey key) { @@ -289,7 +289,7 @@ index 3b73e52fa..e43a24989 100644 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -724,13 +727,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -734,13 +737,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } public Map getEnchants() { @@ -305,7 +305,7 @@ index 3b73e52fa..e43a24989 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -918,7 +921,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -928,7 +931,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -314,7 +314,7 @@ index 3b73e52fa..e43a24989 100644 } clone.hideFlag = this.hideFlag; clone.unbreakable = this.unbreakable; -@@ -1087,6 +1090,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1097,6 +1100,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } } diff --git a/Spigot-Server-Patches/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch index 2e75de092f..d43903a505 100644 --- a/Spigot-Server-Patches/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -1,4 +1,4 @@ -From 15e60f77a6867cd52694f9283af1e6e795315e79 Mon Sep 17 00:00:00 2001 +From e6a1c83e22ebf7b1ccff924966d57c88588796ae Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 15:12:22 -0400 Subject: [PATCH] Configurable Non Player Arrow Despawn Rate @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cd20572eb..b9dc0be2c 100644 +index 6f96627a2..0de300739 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -202,4 +202,13 @@ public class PaperWorldConfig { +@@ -203,4 +203,13 @@ public class PaperWorldConfig { private void allowLeashingUndeadHorse() { allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); } diff --git a/Spigot-Server-Patches/0072-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0072-Optimized-Light-Level-Comparisons.patch index 53cc71b7f5..e4bcd1cc5c 100644 --- a/Spigot-Server-Patches/0072-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0072-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From b13a9f38c46d3600d2b142d3b69bee8e8c6f5cd4 Mon Sep 17 00:00:00 2001 +From a773200d9ab31e884e149a3fd9a108d1e94e618b Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -8,7 +8,7 @@ Use an optimized method to test if a block position meets a desired light level. This method benefits from returning as soon as the desired light level matches. diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java -index e64b6dbda..8acfe9e66 100644 +index b392846aa..c64e6c197 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java @@ -44,7 +44,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @@ -17,9 +17,9 @@ index e64b6dbda..8acfe9e66 100644 super.a(iblockdata, world, blockposition, random); - if (world.getLightLevel(blockposition.up(), 0) >= 9) { + if (world.isLightLevel(blockposition.up(), 9)) { // Paper - int i = this.j(iblockdata); + int i = this.k(iblockdata); - if (i < this.d()) { + if (i < this.e()) { diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java index 723e5c9b4..e24fb1736 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java @@ -34,7 +34,7 @@ index 723e5c9b4..e24fb1736 100644 world.captureTreeGeneration = true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java -index 3959e0700..c4aff522b 100644 +index 0192f9386..334c42d0d 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -27,7 +27,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { @@ -47,7 +47,7 @@ index 3959e0700..c4aff522b 100644 if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index bef146aa9..9c387365b 100644 +index 494ce0bc0..f06c34c6f 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -64,9 +64,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -73,7 +73,7 @@ index bef146aa9..9c387365b 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 268e4d57b..24224efc6 100644 +index 9f8f667c1..90aa8641b 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -262,7 +262,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0074-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0074-Custom-replacement-for-eaten-items.patch index d0e8a4f321..c0cddfc8d6 100644 --- a/Spigot-Server-Patches/0074-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0074-Custom-replacement-for-eaten-items.patch @@ -1,14 +1,14 @@ -From d5dd5cfd1519917997713ba04c795fffefcc22ee Mon Sep 17 00:00:00 2001 +From 7b31831037d962e312445ec6f9e32fa2506bc4f9 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ab64fb7872..8d06249b6c 100644 +index dd48c6af0..acd8034e8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2561,12 +2561,13 @@ public abstract class EntityLiving extends Entity { +@@ -2563,12 +2563,13 @@ public abstract class EntityLiving extends Entity { protected void q() { if (!this.activeItem.isEmpty() && this.isHandRaised()) { @@ -23,7 +23,7 @@ index ab64fb7872..8d06249b6c 100644 world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -2581,9 +2582,19 @@ public abstract class EntityLiving extends Entity { +@@ -2583,9 +2584,20 @@ public abstract class EntityLiving extends Entity { itemstack = this.activeItem.a(this.world, this); } @@ -33,13 +33,14 @@ index ab64fb7872..8d06249b6c 100644 + itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); + } + // Paper end - this.a(this.cT(), itemstack); + this.a(this.cU(), itemstack); // CraftBukkit end - this.cZ(); + this.da(); + // Paper start - if the replacement is anything but the default, update the client inventory + if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { + ((EntityPlayer) this).getBukkitEntity().updateInventory(); + } ++ // Paper end } } diff --git a/Spigot-Server-Patches/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 0ea22445d8..91f30c57dc 100644 --- a/Spigot-Server-Patches/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,11 +1,11 @@ -From f094aeaa1e48c4982f902d3e2cb877c00ae32973 Mon Sep 17 00:00:00 2001 +From a56b31418ce5807fa4cfcf62f3e8b9628533a42b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 8d06249b6c..ed9045f62a 100644 +index bcbc77ad2..746e19165 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -498,7 +498,13 @@ public abstract class EntityLiving extends Entity { @@ -23,7 +23,7 @@ index 8d06249b6c..ed9045f62a 100644 if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); } -@@ -888,6 +894,10 @@ public abstract class EntityLiving extends Entity { +@@ -890,6 +896,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index 8d06249b6c..ed9045f62a 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2426,7 +2436,7 @@ public abstract class EntityLiving extends Entity { +@@ -2428,7 +2438,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,7 +44,7 @@ index 8d06249b6c..ed9045f62a 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f6a7f08f96..e71fc971d7 100644 +index f6a7f08f9..e71fc971d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1510,6 +1510,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0078-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0078-Use-a-Shared-Random-for-Entities.patch index 5d6622ad57..3a401143c6 100644 --- a/Spigot-Server-Patches/0078-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0078-Use-a-Shared-Random-for-Entities.patch @@ -1,4 +1,4 @@ -From 39039bfaab07bf1d1c0eec274aac6a6187a8781b Mon Sep 17 00:00:00 2001 +From ce7ffaa9f437f871b1c1b87d5f22b482e25e9edc Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:33:47 -0400 Subject: [PATCH] Use a Shared Random for Entities @@ -6,18 +6,31 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e16579116..c0367df20 100644 +index e16579116..56aa89b45 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -50,6 +50,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -50,6 +50,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke // CraftBukkit start private static final int CURRENT_LEVEL = 2; -+ public static Random SHARED_RANDOM = new Random(); // Paper ++ // Paper start ++ public static Random SHARED_RANDOM = new Random() { ++ private boolean locked = false; ++ @Override ++ public synchronized void setSeed(long seed) { ++ if (locked) { ++ LogManager.getLogger().error("Ignoring setSeed on Entity.SHARED_RANDOM", new Throwable()); ++ } else { ++ super.setSeed(seed); ++ locked = true; ++ } ++ } ++ }; ++ // Paper end static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -182,7 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -182,7 +196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.length = 1.8F; this.aA = 1.0F; this.aB = 1.0F; diff --git a/Spigot-Server-Patches/0079-Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/0079-Don-t-teleport-dead-entities.patch index 42f0912b06..c01228a442 100644 --- a/Spigot-Server-Patches/0079-Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/0079-Don-t-teleport-dead-entities.patch @@ -1,4 +1,4 @@ -From 22bc88a7734d7cd8f0e59448076b9f781b60cc59 Mon Sep 17 00:00:00 2001 +From 79c5df24897ee9bcc76d84977c071ed6b6107afb Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:55:23 -0400 Subject: [PATCH] Don't teleport dead entities @@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c0367df20..c37c46e71 100644 +index 063750cd5f..f69d544a51 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2556,7 +2556,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2576,7 +2576,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public Entity teleportTo(Location exit, boolean portal) { diff --git a/Spigot-Server-Patches/0081-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0081-Configurable-spawn-chances-for-skeleton-horses.patch index 403edcd421..f9803b9dde 100644 --- a/Spigot-Server-Patches/0081-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0081-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,14 +1,14 @@ -From b03e35486eb18d15d0e8e46d3ac4a6e198931453 Mon Sep 17 00:00:00 2001 +From 67ea6458bbbc22760d99d38cf8f310c0be092846 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Mar 2016 12:04:28 -0500 Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b9dc0be2c..9f586774d 100644 +index 0de300739..c2c33d75b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -211,4 +211,9 @@ public class PaperWorldConfig { +@@ -212,4 +212,9 @@ public class PaperWorldConfig { } log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate); } @@ -19,7 +19,7 @@ index b9dc0be2c..9f586774d 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9bd11a5fd..88868b4c4 100644 +index dd09ab20e..ecee3b406 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -498,7 +498,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0082-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0082-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 8c7364fb4b..ffa41c1da9 100644 --- a/Spigot-Server-Patches/0082-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0082-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -1,4 +1,4 @@ -From 4710b24774a3e974f01b1db6348dcc36a4d2ded7 Mon Sep 17 00:00:00 2001 +From 5372e9c03d78bdb92741561ef1c5d2f63c8621f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:07:55 -0600 Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling @@ -31,10 +31,10 @@ index e2a7b4be2..58f8b4b72 100644 public BaseBlockPosition(int i, int j, int k) { this.a = i; diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 70a7edf57..fff08f09d 100644 +index 7dbea9090..252e00e16 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -339,6 +339,16 @@ public class BlockPosition extends BaseBlockPosition { +@@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition { protected int b; protected int c; protected int d; @@ -52,7 +52,7 @@ index 70a7edf57..fff08f09d 100644 public MutableBlockPosition() { this(0, 0, 0); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index fb27dcac2..1c0580f79 100644 +index 32c1dbd0b..5d1812ab0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -430,12 +430,24 @@ public class Chunk implements IChunkAccess { @@ -96,7 +96,7 @@ index 7c6308dbe..880058a9e 100644 private NibbleArray skyLight; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d3785f73b..f8e4cd14c 100644 +index 11cf087e7..489c152ee 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -262,11 +262,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -172,7 +172,7 @@ index d3785f73b..f8e4cd14c 100644 return FluidTypes.a.i(); } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); -@@ -1764,7 +1764,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1768,7 +1768,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose public Map capturedTileEntities = Maps.newHashMap(); @Nullable public TileEntity getTileEntity(BlockPosition blockposition) { @@ -181,7 +181,7 @@ index d3785f73b..f8e4cd14c 100644 return null; } else { // CraftBukkit start -@@ -1805,7 +1805,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1809,7 +1809,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose } public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { @@ -190,7 +190,7 @@ index d3785f73b..f8e4cd14c 100644 if (tileentity != null && !tileentity.x()) { // CraftBukkit start if (captureBlockStates) { -@@ -1866,7 +1866,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1870,7 +1870,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose } public boolean p(BlockPosition blockposition) { @@ -200,5 +200,5 @@ index d3785f73b..f8e4cd14c 100644 } else { Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); -- -2.18.0 +2.16.1.windows.1 diff --git a/Spigot-Server-Patches/0084-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/0084-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 0a7ac87bf8..3b34f41b5f 100644 --- a/Spigot-Server-Patches/0084-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/0084-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -1,4 +1,4 @@ -From b89267bd8d1f5a2ba7b23efb6064e12b1f38f5b9 Mon Sep 17 00:00:00 2001 +From d93b67db207815adc72e749ec35bc04c27fbd1aa Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone @@ -11,10 +11,10 @@ Defaulting this to false will provide substantial performance improvement by saving millions of event calls on redstone heavy servers. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9f586774d..1c2209270 100644 +index c2c33d75b..b3b3baddc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -216,4 +216,9 @@ public class PaperWorldConfig { +@@ -217,4 +217,9 @@ public class PaperWorldConfig { private void skeleHorseSpawnChance() { skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state } @@ -25,7 +25,7 @@ index 9f586774d..1c2209270 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f8e4cd14c..11012360b 100644 +index 489c152ee..2f1290163 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -582,7 +582,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -38,7 +38,7 @@ index f8e4cd14c..11012360b 100644 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 88868b4c4..e3d62fc9c 100644 +index ecee3b406..96002184b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -36,6 +36,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; diff --git a/Spigot-Server-Patches/0086-Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/0086-Configurable-Chunk-Inhabited-Timer.patch index 43118563eb..a0d11bc30c 100644 --- a/Spigot-Server-Patches/0086-Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/0086-Configurable-Chunk-Inhabited-Timer.patch @@ -1,4 +1,4 @@ -From 1ab4c742c0d8d9b7da4be54e6228aca0471342e9 Mon Sep 17 00:00:00 2001 +From 3886acfd07271f1c99ec15a9751112ea7444500c Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Timer @@ -9,10 +9,10 @@ aspects of vanilla gameplay to this factor. For people who want all chunks to be treated equally, you can disable the timer. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1c2209270..17fb883f6 100644 +index b3b3baddc..613964ce0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -221,4 +221,9 @@ public class PaperWorldConfig { +@@ -222,4 +222,9 @@ public class PaperWorldConfig { private void firePhysicsEventForRedstone() { firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone); } @@ -23,7 +23,7 @@ index 1c2209270..17fb883f6 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1c0580f79..744b5bc6d 100644 +index 5d1812ab0..695c6d3b7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -55,7 +55,7 @@ public class Chunk implements IChunkAccess { @@ -35,7 +35,7 @@ index 1c0580f79..744b5bc6d 100644 private int B; private final ConcurrentLinkedQueue C; public boolean d; -@@ -1231,7 +1231,7 @@ public class Chunk implements IChunkAccess { +@@ -1228,7 +1228,7 @@ public class Chunk implements IChunkAccess { } public long m() { diff --git a/Spigot-Server-Patches/0087-EntityPathfindEvent.patch b/Spigot-Server-Patches/0087-EntityPathfindEvent.patch index 56d56bbf1c..db09293411 100644 --- a/Spigot-Server-Patches/0087-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0087-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From 6455ce561b9117bf7b6752c1553f5159fb3712f3 Mon Sep 17 00:00:00 2001 +From 6f900d976e49e29d9a3cfd377e94d7121ddb6e65 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -6,7 +6,7 @@ Subject: [PATCH] EntityPathfindEvent Fires when an Entity decides to start moving to a location. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 1964684ac..0c5215657 100644 +index 8111317e3..76d1f4bd2 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -4,7 +4,7 @@ import javax.annotation.Nullable; @@ -24,7 +24,7 @@ index 1964684ac..0c5215657 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.k(); + float f = this.j(); @@ -102,6 +103,7 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { @@ -32,7 +32,7 @@ index 1964684ac..0c5215657 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.k(); + float f = this.j(); -- 2.18.0 diff --git a/Spigot-Server-Patches/0089-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0089-Sanitise-RegionFileCache-and-make-configurable.patch index 062b801f63..c934c061f9 100644 --- a/Spigot-Server-Patches/0089-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0089-Sanitise-RegionFileCache-and-make-configurable.patch @@ -1,4 +1,4 @@ -From 2441c587560e34e5b7252b89a3b5234911e5b641 Mon Sep 17 00:00:00 2001 +From fd6ccdfc2049340dd24439852e20e25a9dd7c9bb Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Tue, 29 Mar 2016 08:22:55 +0300 Subject: [PATCH] Sanitise RegionFileCache and make configurable. @@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 2f6e169f5..ec4643384 100644 +index 40c5ea474..7d29ad369 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -215,4 +215,9 @@ public class PaperConfig { +@@ -219,4 +219,9 @@ public class PaperConfig { private static void loadPermsBeforePlugins() { loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true); } @@ -25,7 +25,7 @@ index 2f6e169f5..ec4643384 100644 + } } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 384628ccc..b335016fd 100644 +index ff473a263..3b8d01ea1 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -9,10 +9,12 @@ import java.io.IOException; diff --git a/Spigot-Server-Patches/0094-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0094-Configurable-Grass-Spread-Tick-Rate.patch index dd644078f0..9b93a29c4a 100644 --- a/Spigot-Server-Patches/0094-Configurable-Grass-Spread-Tick-Rate.patch +++ b/Spigot-Server-Patches/0094-Configurable-Grass-Spread-Tick-Rate.patch @@ -1,14 +1,14 @@ -From aa81b601a06d1482b03985113d4bfe799307ce36 Mon Sep 17 00:00:00 2001 +From f5381978161686a8bc5c898c9a74cb4319bd7236 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Apr 2016 16:28:17 -0400 Subject: [PATCH] Configurable Grass Spread Tick Rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 17fb883f6..eb09be512 100644 +index 613964ce0..bb1c1c57c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -226,4 +226,10 @@ public class PaperWorldConfig { +@@ -227,4 +227,10 @@ public class PaperWorldConfig { private void useInhabitedTime() { useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true); } diff --git a/Spigot-Server-Patches/0095-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0095-Configurable-Keep-Spawn-Loaded-range-per-world.patch index d9ec20d082..9172811250 100644 --- a/Spigot-Server-Patches/0095-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0095-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From a064f1ff86cfe2af3e4659d3b4ab7191c1bbdee5 Mon Sep 17 00:00:00 2001 +From 326ebf870067e1631b73dc368ab9794d1e0dd0f0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eb09be512..6ac58e5ec 100644 +index bb1c1c57cc..667a0dde8c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -232,4 +232,10 @@ public class PaperWorldConfig { +@@ -233,4 +233,10 @@ public class PaperWorldConfig { grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); log("Grass Spread Tick Rate: " + grassUpdateRate); } @@ -21,10 +21,10 @@ index eb09be512..6ac58e5ec 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1027b0588..b7aa9e869 100644 +index 96d31f8749..071a1e30f7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -446,8 +446,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -485,13 +485,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati ArrayList arraylist = Lists.newArrayList(); Set set = Sets.newConcurrentHashSet(); @@ -37,12 +37,36 @@ index 1027b0588..b7aa9e869 100644 + // Paper end arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); } ++ } // Paper ++ if (this.isRunning()) { // Paper ++ int expected = arraylist.size(); // Paper ++ + + CompletableFuture completablefuture = worldserver.getChunkProviderServer().a((Iterable) arraylist, (chunk) -> { + set.add(chunk.getPos()); ++ if (set.size() < expected && set.size() % 25 == 0) this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + }); + + while (!completablefuture.isDone()) { +@@ -506,11 +514,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + + throw new RuntimeException(executionexception.getCause()); + } catch (TimeoutException timeoutexception) { +- this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / 625); ++ this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + } + } + +- this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / 625); ++ this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + } + } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cc1492e4d..2c6774082 100644 +index 6ec1ee26dc..a4c8e62e22 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2821,8 +2821,9 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -2825,8 +2825,9 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose int k = i * 16 + 8 - blockposition.getX(); int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; @@ -54,10 +78,10 @@ index cc1492e4d..2c6774082 100644 public void a(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f90dc11f2..06b59657f 100644 +index f3af4ba520..761db58b29 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1008,7 +1008,7 @@ public final class CraftServer implements Server { +@@ -991,7 +991,7 @@ public final class CraftServer implements Server { System.out.println("Preparing start region for level " + (console.worlds.size() - 1) + " (Seed: " + internal.getSeed() + ")"); if (internal.getWorld().getKeepSpawnInMemory()) { @@ -67,10 +91,10 @@ index f90dc11f2..06b59657f 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0b2a9d09d..ff3558363 100644 +index 29a5ac639e..e3e45ed48a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1285,8 +1285,9 @@ public class CraftWorld implements World { +@@ -1281,8 +1281,9 @@ public class CraftWorld implements World { int chunkCoordX = chunkcoordinates.getX() >> 4; int chunkCoordZ = chunkcoordinates.getZ() >> 4; // Cycle through the 25x25 Chunks around it to load/unload the chunks. diff --git a/Spigot-Server-Patches/0097-Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/0097-Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 49cae9e035..b269197e88 100644 --- a/Spigot-Server-Patches/0097-Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/0097-Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -1,14 +1,14 @@ -From 0fcdea66258db413a6b24290ed64dbe31665a343 Mon Sep 17 00:00:00 2001 +From afb30e11f473e9edbeff81f0bad1736ab90b28b9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Apr 2016 19:42:22 -0400 Subject: [PATCH] Don't spam reload spawn chunks in nether/end diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5b2d67260..3aecf7a5d 100644 +index ae953d85d..e747d1e46 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2817,6 +2817,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -2821,6 +2821,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose return this.K; } diff --git a/Spigot-Server-Patches/0099-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0099-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 39e315ae22..e732fef769 100644 --- a/Spigot-Server-Patches/0099-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0099-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -1,14 +1,14 @@ -From 9cfa1f4bdd459c8f829f60b971a5af65fb5ecb0c Mon Sep 17 00:00:00 2001 +From c020ce32ff52a05209704308ac8442396d630d53 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 6 Apr 2016 01:04:23 -0500 Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6ac58e5ec..ff9929a05 100644 +index 667a0dde8c..b6ef1d4378 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -238,4 +238,9 @@ public class PaperWorldConfig { +@@ -239,4 +239,9 @@ public class PaperWorldConfig { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 8)) * 16); log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } @@ -19,10 +19,10 @@ index 6ac58e5ec..ff9929a05 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c37c46e71..88092d823 100644 +index f69d544a51..c11e9a1bf1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2251,6 +2251,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2271,6 +2271,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.getFlag(5); } @@ -31,10 +31,10 @@ index c37c46e71..88092d823 100644 public ScoreboardTeamBase be() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a3486bd46..79fddc866 100644 +index 90ab7f065f..1ca3c87c7a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1622,7 +1622,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1622,7 +1622,15 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { return; } @@ -42,7 +42,8 @@ index a3486bd46..79fddc866 100644 + // Paper Start - (Meh) Support for vanilla world scoreboard name coloring + String displayName = event.getPlayer().getDisplayName(); + if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { -+ displayName = CraftChatMessage.fromComponent(ScoreboardTeam.a(this.player.getTeam(),((CraftPlayer) player).getHandle().getDisplayName())); ++ // Explicitly add a RESET here, vanilla uses components for this now... ++ displayName = CraftChatMessage.fromComponent(ScoreboardTeam.a(this.player.getTeam(),((CraftPlayer) player).getHandle().getDisplayName())) + org.bukkit.ChatColor.RESET; + } + + s = String.format(event.getFormat(), displayName, event.getMessage()); diff --git a/Spigot-Server-Patches/0101-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0101-Remove-unused-World-Tile-Entity-List.patch index 7cd2cd6a6d..04e27d162d 100644 --- a/Spigot-Server-Patches/0101-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0101-Remove-unused-World-Tile-Entity-List.patch @@ -1,4 +1,4 @@ -From e2d1cd0843677e1a8e8dea3ed851c5c8e2e94e69 Mon Sep 17 00:00:00 2001 +From 43bd8c9254a8f40906a62978cf6045d7e1eff64b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 00:25:28 -0400 Subject: [PATCH] Remove unused World Tile Entity List @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3aecf7a5d..e5ecfdbf0 100644 +index e747d1e46..46eab028d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -73,7 +73,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -57,7 +57,7 @@ index 3aecf7a5d..e5ecfdbf0 100644 this.tileEntityListTick.add(tileentity); } -@@ -1852,7 +1852,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1856,7 +1856,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose } else { if (tileentity != null) { this.c.remove(tileentity); diff --git a/Spigot-Server-Patches/0103-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0103-Configurable-Player-Collision.patch index f9dc5f7b25..389d00db22 100644 --- a/Spigot-Server-Patches/0103-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0103-Configurable-Player-Collision.patch @@ -1,14 +1,14 @@ -From 9f2f1b9ab1eed83663f5141642da3ed16f93bdaf Mon Sep 17 00:00:00 2001 +From 5af22f227e6bf0613e322053e4f50c714c19dd28 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ec4643384..430b5d0cd 100644 +index 7d29ad369..bd9f03a76 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -220,4 +220,9 @@ public class PaperConfig { +@@ -224,4 +224,9 @@ public class PaperConfig { private static void regionFileCacheSize() { regionFileCacheSize = getInt("settings.region-file-cache-size", 256); } @@ -19,10 +19,10 @@ index ec4643384..430b5d0cd 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b7aa9e869..c5670fe8d 100644 +index 071a1e30f..f88105382 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -379,6 +379,20 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -418,6 +418,20 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.a(this.getDifficulty()); this.g_(); @@ -44,7 +44,7 @@ index b7aa9e869..c5670fe8d 100644 protected void a(File file, WorldData worlddata) { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java -index 5f54e7b9c..759288b97 100644 +index a6aed2531..575e3762b 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java @@ -94,7 +94,7 @@ public class PacketPlayOutScoreboardTeam implements Packet Date: Sat, 16 Apr 2016 00:39:33 -0400 Subject: [PATCH] Configurable RCON IP address @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable RCON IP address For servers with multiple IP's, ability to bind to a specific interface. diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java -index 6f0176f6f..1e5caa13a 100644 +index 6f0176f6ff..c237f239f3 100644 --- a/src/main/java/net/minecraft/server/RemoteControlListener.java +++ b/src/main/java/net/minecraft/server/RemoteControlListener.java @@ -24,7 +24,7 @@ public class RemoteControlListener extends RemoteConnectionThread { @@ -14,7 +14,7 @@ index 6f0176f6f..1e5caa13a 100644 this.h = iminecraftserver.a("rcon.port", 0); this.l = iminecraftserver.a("rcon.password", ""); - this.j = iminecraftserver.e(); -+ this.j = iminecraftserver.a("rcon.ip", iminecraftserver.d_()); // Paper ++ this.j = iminecraftserver.a("rcon.ip", ((DedicatedServer) iminecraftserver).getServerIp()); // Paper this.i = iminecraftserver.f(); if (0 == this.h) { this.h = this.i + 10; diff --git a/Spigot-Server-Patches/0108-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0108-EntityRegainHealthEvent-isFastRegen-API.patch index 18f12e221f..4ae09c0201 100644 --- a/Spigot-Server-Patches/0108-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0108-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From 1af002cf0a2e3574d4010d2c2f8f860e25163f35 Mon Sep 17 00:00:00 2001 +From 591dcb3f4be1fc57cd0db75c759f1dc05e13dfed Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API @@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ed9045f62a..1bef317758 100644 +index 746e19165..f5c3679b1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -870,10 +870,16 @@ public abstract class EntityLiving extends Entity { +@@ -872,10 +872,16 @@ public abstract class EntityLiving extends Entity { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -28,7 +28,7 @@ index ed9045f62a..1bef317758 100644 if (!event.isCancelled()) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index bbcc488bd7..d886e476bf 100644 +index bbcc488bd..d886e476b 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -65,7 +65,7 @@ public class FoodMetaData { diff --git a/Spigot-Server-Patches/0109-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0109-Add-ability-to-configure-frosted_ice-properties.patch index bddc4a57ad..5a68444778 100644 --- a/Spigot-Server-Patches/0109-Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/0109-Add-ability-to-configure-frosted_ice-properties.patch @@ -1,14 +1,14 @@ -From fd07a26f0eccd02458943d5b15c84a6951a8a3ee Mon Sep 17 00:00:00 2001 +From 90aeab4e9f63ccbfff85966e96b7c95afa07182a Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 21 Apr 2016 23:51:55 -0700 Subject: [PATCH] Add ability to configure frosted_ice properties diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ff9929a05..0c50cb4bd 100644 +index b6ef1d437..8d54af6bb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -243,4 +243,14 @@ public class PaperWorldConfig { +@@ -244,4 +244,14 @@ public class PaperWorldConfig { private void useVanillaScoreboardColoring() { useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false); } diff --git a/Spigot-Server-Patches/0110-Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/0110-Vehicle-Event-Cancellation-Changes.patch deleted file mode 100644 index 8619f48037..0000000000 --- a/Spigot-Server-Patches/0110-Vehicle-Event-Cancellation-Changes.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 3813dcf8105186f2ad6b22b3e3c8e129656c6dbb Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Fri, 22 Apr 2016 18:20:05 -0500 -Subject: [PATCH] Vehicle Event Cancellation Changes - - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 88092d823..9af242380 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -80,7 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public boolean j; - public final List passengers; - protected int k; -- private Entity ax; -+ private Entity ax;public void setVehicle(Entity entity) { this.ax = entity; } // Paper - OBFHELPER - public boolean attachedToPlayer; - public World world; - public double lastX; -@@ -2110,6 +2110,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); - } else { - // CraftBukkit start -+ entity.setVehicle(this); // Paper - Set the vehicle back for the event - CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); - Entity orig = craft == null ? null : craft.getHandle(); - if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { -@@ -2125,7 +2126,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - } - } - // CraftBukkit end -- Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot -+ // Paper start - make EntityDismountEvent cancellable -+ if (!new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity()).callEvent()) { -+ return; -+ } -+ entity.setVehicle(null); -+ // Paper end -+ - this.passengers.remove(entity); - entity.k = 60; - } --- -2.18.0 - diff --git a/Spigot-Server-Patches/0111-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0110-remove-null-possibility-for-getServer-singleton.patch similarity index 83% rename from Spigot-Server-Patches/0111-remove-null-possibility-for-getServer-singleton.patch rename to Spigot-Server-Patches/0110-remove-null-possibility-for-getServer-singleton.patch index 851bfbb263..64f9a4b97c 100644 --- a/Spigot-Server-Patches/0111-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0110-remove-null-possibility-for-getServer-singleton.patch @@ -1,4 +1,4 @@ -From 6b309368c52f9b4108b0a3619f0b7089abad52bd Mon Sep 17 00:00:00 2001 +From bf2bd153e0203883f109de1266912090918f6b5d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c5670fe8d..e11289217 100644 +index c181acd991..6de0b22f72 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -68,6 +68,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -17,15 +17,16 @@ index c5670fe8d..e11289217 100644 public static final Logger LOGGER = LogManager.getLogger(); public static final File a = new File("usercache.json"); public Convertable convertable; -@@ -152,6 +153,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -154,6 +155,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot end public MinecraftServer(OptionSet options, Proxy proxy, DataFixer datafixer, CommandDispatcher commanddispatcher, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { + SERVER = this; // Paper - better singleton - this.commandDispatcher = commanddispatcher; // CraftBukkit ++ this.commandDispatcher = commanddispatcher; // CraftBukkit this.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA); this.resourcePackRepository = new ResourcePackRepository(ResourcePackLoader::new); -@@ -1742,7 +1744,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + this.ag = new CraftingManager(); +@@ -1811,7 +1814,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit start @Deprecated public static MinecraftServer getServer() { diff --git a/Spigot-Server-Patches/0112-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0111-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 96% rename from Spigot-Server-Patches/0112-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to Spigot-Server-Patches/0111-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 61a0032634..7e277002f5 100644 --- a/Spigot-Server-Patches/0112-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0111-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From 1b250f7abc586467c2a08285ab380754c75fc64e Mon Sep 17 00:00:00 2001 +From 7917e09469846bbe6836f8397451bea1a44a2df6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Apr 2016 20:02:00 -0400 Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes @@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1aa32bf11..83bfb6611 100644 +index a47ef2ca50..06b663c4db 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -610,6 +610,12 @@ public abstract class EntityHuman extends EntityLiving { @@ -30,7 +30,7 @@ index 1aa32bf11..83bfb6611 100644 ItemStack itemstack1 = this.a(entityitem); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 6ae576a2e..af1981967 100644 +index 40e0bd7ce2..a04a06f3bf 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -90,7 +90,7 @@ public class EntityTrackerEntry { @@ -43,7 +43,7 @@ index 6ae576a2e..af1981967 100644 ItemStack itemstack = entityitemframe.getItem(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e5ecfdbf0..5102f24ed 100644 +index 46eab028d9..f1c036aa6a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1075,6 +1075,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -55,7 +55,7 @@ index e5ecfdbf0..5102f24ed 100644 } } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index 445a016b7..4c64f90be 100644 +index 445a016b72..4c64f90be3 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java @@ -29,6 +29,7 @@ public class WorldMap extends PersistentBase { @@ -127,7 +127,7 @@ index 445a016b7..4c64f90be 100644 for ( org.bukkit.map.MapCursor cursor : render.cursors) { diff --git a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java -index 256a13178..5768cd512 100644 +index 256a131781..5768cd512e 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java +++ b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java @@ -5,7 +5,7 @@ import org.bukkit.map.MapCursor; diff --git a/Spigot-Server-Patches/0113-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0112-LootTable-API-Replenishable-Lootables-Feature.patch similarity index 98% rename from Spigot-Server-Patches/0113-LootTable-API-Replenishable-Lootables-Feature.patch rename to Spigot-Server-Patches/0112-LootTable-API-Replenishable-Lootables-Feature.patch index 6192979185..f2030bd9c8 100644 --- a/Spigot-Server-Patches/0113-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0112-LootTable-API-Replenishable-Lootables-Feature.patch @@ -1,4 +1,4 @@ -From 9d96b8545503e22d3196831671b54fc1a5e80009 Mon Sep 17 00:00:00 2001 +From 5adbcec5141acf1e524b36ac8667998cff3f10d8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 1 May 2016 21:19:14 -0400 Subject: [PATCH] LootTable API & Replenishable Lootables Feature @@ -11,10 +11,10 @@ This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0c50cb4bd..38de48ebc 100644 +index 8d54af6bb..a3823408c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -253,4 +253,26 @@ public class PaperWorldConfig { +@@ -254,4 +254,26 @@ public class PaperWorldConfig { this.frostedIceDelayMax = this.getInt("frosted-ice.delay.max", this.frostedIceDelayMax); log("Frosted Ice: " + (this.frostedIceEnabled ? "enabled" : "disabled") + " / delay: min=" + this.frostedIceDelayMin + ", max=" + this.frostedIceDelayMax); } @@ -418,7 +418,7 @@ index 000000000..9a65603bc + } +} diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index dc329dcc5..d3bf88585 100644 +index 9ec73ac06..8bd7976f9 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -6,17 +6,21 @@ import javax.annotation.Nullable; @@ -445,7 +445,7 @@ index dc329dcc5..d3bf88585 100644 // CraftBukkit start public List transaction = new java.util.ArrayList(); -@@ -159,12 +163,13 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -168,12 +172,13 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp protected void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); @@ -460,7 +460,7 @@ index dc329dcc5..d3bf88585 100644 ContainerUtil.a(nbttagcompound, this.items); } -@@ -172,11 +177,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -181,11 +186,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp protected void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); @@ -474,7 +474,7 @@ index dc329dcc5..d3bf88585 100644 ContainerUtil.b(nbttagcompound, this.items); } -@@ -225,10 +231,10 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -234,10 +240,10 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp } public void f(@Nullable EntityHuman entityhuman) { @@ -487,7 +487,7 @@ index dc329dcc5..d3bf88585 100644 Random random; if (this.d == 0L) { -@@ -253,12 +259,51 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -262,12 +268,51 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp this.items.clear(); } @@ -540,7 +540,7 @@ index dc329dcc5..d3bf88585 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index ce710d219..9c8bebe4b 100644 +index fbda02b32..e6fc1ae92 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -1,12 +1,16 @@ diff --git a/Spigot-Server-Patches/0114-Do-not-load-chunks-for-pathfinding.patch b/Spigot-Server-Patches/0113-Do-not-load-chunks-for-pathfinding.patch similarity index 87% rename from Spigot-Server-Patches/0114-Do-not-load-chunks-for-pathfinding.patch rename to Spigot-Server-Patches/0113-Do-not-load-chunks-for-pathfinding.patch index 13d0f956d4..66c88d73a6 100644 --- a/Spigot-Server-Patches/0114-Do-not-load-chunks-for-pathfinding.patch +++ b/Spigot-Server-Patches/0113-Do-not-load-chunks-for-pathfinding.patch @@ -1,11 +1,11 @@ -From 8377c919dfb9fe70801510f6e077bbf6a9847d8f Mon Sep 17 00:00:00 2001 +From bc7a01c2d7b9be7bfabb73c3ead9364433e5fee1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Jan 2016 00:13:19 -0500 Subject: [PATCH] Do not load chunks for pathfinding diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java -index 6d153e431..07444a86a 100644 +index 6d153e4311..07444a86ac 100644 --- a/src/main/java/net/minecraft/server/ChunkCache.java +++ b/src/main/java/net/minecraft/server/ChunkCache.java @@ -27,7 +27,7 @@ public class ChunkCache implements IIBlockAccess { diff --git a/Spigot-Server-Patches/0115-Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/0114-Entity-Tracking-Improvements.patch similarity index 95% rename from Spigot-Server-Patches/0115-Entity-Tracking-Improvements.patch rename to Spigot-Server-Patches/0114-Entity-Tracking-Improvements.patch index dd8c333b09..1729de72ae 100644 --- a/Spigot-Server-Patches/0115-Entity-Tracking-Improvements.patch +++ b/Spigot-Server-Patches/0114-Entity-Tracking-Improvements.patch @@ -1,4 +1,4 @@ -From be50c643cdcb8dc000e4a1bc88c37232418fbd0d Mon Sep 17 00:00:00 2001 +From a4ca6f81234296ae1cfb63d2e7a2344d48456e67 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Jun 2013 01:24:00 -0400 Subject: [PATCH] Entity Tracking Improvements @@ -7,10 +7,10 @@ If any part of a Vehicle/Passenger relationship is visible to a player, send all passenger/vehicles to the player in the chain. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9af242380..70694c8e5 100644 +index 76934f81a8..93df154b15 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -57,6 +57,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -70,6 +70,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected CraftEntity bukkitEntity; @@ -19,7 +19,7 @@ index 9af242380..70694c8e5 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index af1981967..e054ae905 100644 +index a04a06f3bf..c405cc74ba 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -49,6 +49,7 @@ public class EntityTrackerEntry { diff --git a/Spigot-Server-Patches/0116-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0115-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 85% rename from Spigot-Server-Patches/0116-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to Spigot-Server-Patches/0115-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index 7a2d842aae..a4dc202e6f 100644 --- a/Spigot-Server-Patches/0116-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/0115-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -1,14 +1,14 @@ -From e1f368e70c67a8656883a4a1025adfce7f085a83 Mon Sep 17 00:00:00 2001 +From 0d46f1966984e67b959aaf94ab2beccf1cf48dcf Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 May 2016 23:33:08 -0400 Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 430b5d0cd..011cbf5e3 100644 +index bd9f03a76..5538dfd9d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -225,4 +225,9 @@ public class PaperConfig { +@@ -229,4 +229,9 @@ public class PaperConfig { private static void enablePlayerCollisions() { enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true); } @@ -19,10 +19,10 @@ index 430b5d0cd..011cbf5e3 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index 81afa3195..ed3d5c889 100644 +index 0260fb7ec..45d8de1b7 100644 --- a/src/main/java/net/minecraft/server/PersistentScoreboard.java +++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java -@@ -175,6 +175,7 @@ public class PersistentScoreboard extends PersistentBase { +@@ -177,6 +177,7 @@ public class PersistentScoreboard extends PersistentBase { while (iterator.hasNext()) { ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next(); diff --git a/Spigot-Server-Patches/0117-Fix-Chunk-Unload-Queue-Issues.patch b/Spigot-Server-Patches/0116-Fix-Chunk-Unload-Queue-Issues.patch similarity index 89% rename from Spigot-Server-Patches/0117-Fix-Chunk-Unload-Queue-Issues.patch rename to Spigot-Server-Patches/0116-Fix-Chunk-Unload-Queue-Issues.patch index 3929c98595..472fa91788 100644 --- a/Spigot-Server-Patches/0117-Fix-Chunk-Unload-Queue-Issues.patch +++ b/Spigot-Server-Patches/0116-Fix-Chunk-Unload-Queue-Issues.patch @@ -1,4 +1,4 @@ -From 5f52336745925855acb58d3b4f55fc404c5a1766 Mon Sep 17 00:00:00 2001 +From 5f487664b0a7c81473babc61ebcb4d2b577b2405 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 12 May 2016 02:03:56 -0400 Subject: [PATCH] Fix Chunk Unload Queue Issues @@ -9,7 +9,7 @@ has not resolved all the bugs with the changes. This patch fixes known issues and really should be applied by Spigot team. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 744b5bc6d..718ebfea0 100644 +index 695c6d3b70..acc21aec02 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -58,7 +58,7 @@ public class Chunk implements IChunkAccess { @@ -22,10 +22,10 @@ index 744b5bc6d..718ebfea0 100644 private int E; private final AtomicInteger F; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bb96a7392..7825dc91b 100644 +index 0e04d65981..2925c345a1 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -302,6 +302,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -312,6 +312,7 @@ public class ChunkProviderServer implements IChunkProvider { if (chunk != null && chunk.d) { // CraftBukkit start - move unload logic to own method diff --git a/Spigot-Server-Patches/0118-System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/0117-System-property-for-disabling-watchdoge.patch similarity index 90% rename from Spigot-Server-Patches/0118-System-property-for-disabling-watchdoge.patch rename to Spigot-Server-Patches/0117-System-property-for-disabling-watchdoge.patch index 47d08c74a8..c5593b5eae 100644 --- a/Spigot-Server-Patches/0118-System-property-for-disabling-watchdoge.patch +++ b/Spigot-Server-Patches/0117-System-property-for-disabling-watchdoge.patch @@ -1,11 +1,11 @@ -From 2c589fea6f44a9eceb5240d226fab7a8aa65879d Mon Sep 17 00:00:00 2001 +From d898f0e91a714338c156db3161c150ec25996761 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 12 May 2016 23:02:58 -0500 Subject: [PATCH] System property for disabling watchdoge diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 0c106ea9c..57a4748a3 100644 +index 0c106ea9c5..57a4748a30 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -52,7 +52,7 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/0119-Optimize-EAR.patch b/Spigot-Server-Patches/0118-Optimize-EAR.patch similarity index 96% rename from Spigot-Server-Patches/0119-Optimize-EAR.patch rename to Spigot-Server-Patches/0118-Optimize-EAR.patch index 92cee707e8..31e1f79031 100644 --- a/Spigot-Server-Patches/0119-Optimize-EAR.patch +++ b/Spigot-Server-Patches/0118-Optimize-EAR.patch @@ -1,11 +1,11 @@ -From 85b6d5e7f7854bd7803c2b5afc06a7250039fed7 Mon Sep 17 00:00:00 2001 +From c8e46d2dfb85a7fb46d51d433b842e9d195139eb Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 13 May 2016 01:38:06 -0400 Subject: [PATCH] Optimize EAR diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 1aade75f3..a9b84fdec 100644 +index 1aade75f34..a9b84fdec4 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -2,6 +2,8 @@ package org.spigotmc; diff --git a/Spigot-Server-Patches/0120-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0119-Optimize-UserCache-Thread-Safe.patch similarity index 94% rename from Spigot-Server-Patches/0120-Optimize-UserCache-Thread-Safe.patch rename to Spigot-Server-Patches/0119-Optimize-UserCache-Thread-Safe.patch index 1c77511768..1cb4f75edc 100644 --- a/Spigot-Server-Patches/0120-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0119-Optimize-UserCache-Thread-Safe.patch @@ -1,4 +1,4 @@ -From 6a9d38a4159ce7e437079963862bfbf5baf9c766 Mon Sep 17 00:00:00 2001 +From b2db33ed633fd55ba4fe042e9f24bc90bf378979 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 16 May 2016 20:47:41 -0400 Subject: [PATCH] Optimize UserCache / Thread Safe @@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e11289217..49b2c27c6 100644 +index 6de0b22f72..5f17ec1e9d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -631,7 +631,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -676,7 +676,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot start if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { LOGGER.info("Saving usercache.json"); @@ -23,7 +23,7 @@ index e11289217..49b2c27c6 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index 0e168ad34..f8b7d695c 100644 +index 0e168ad349..f8b7d695c6 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -109,7 +109,7 @@ public class UserCache { diff --git a/Spigot-Server-Patches/0121-Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/0120-Avoid-blocking-on-Network-Manager-creation.patch similarity index 96% rename from Spigot-Server-Patches/0121-Avoid-blocking-on-Network-Manager-creation.patch rename to Spigot-Server-Patches/0120-Avoid-blocking-on-Network-Manager-creation.patch index 817c70c732..715f6cfce1 100644 --- a/Spigot-Server-Patches/0121-Avoid-blocking-on-Network-Manager-creation.patch +++ b/Spigot-Server-Patches/0120-Avoid-blocking-on-Network-Manager-creation.patch @@ -1,4 +1,4 @@ -From 4b72a52f493d03f141642c45278dd654ef5fdb69 Mon Sep 17 00:00:00 2001 +From a883b4d3d653824a53997fa6971ef99341f807b0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 16 May 2016 23:19:16 -0400 Subject: [PATCH] Avoid blocking on Network Manager creation @@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index be8d07f41..9808561eb 100644 +index be8d07f41e..9808561eb3 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java @@ -40,6 +40,15 @@ public class ServerConnection { diff --git a/Spigot-Server-Patches/0122-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0121-Optional-TNT-doesn-t-move-in-water.patch similarity index 91% rename from Spigot-Server-Patches/0122-Optional-TNT-doesn-t-move-in-water.patch rename to Spigot-Server-Patches/0121-Optional-TNT-doesn-t-move-in-water.patch index f9f4198b54..a60f67eeb6 100644 --- a/Spigot-Server-Patches/0122-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0121-Optional-TNT-doesn-t-move-in-water.patch @@ -1,11 +1,11 @@ -From 4a54757b19677e73932cc2db44dd47a907d8f82b Mon Sep 17 00:00:00 2001 +From 049322e249bcc1b9347e23a99bc781f8fa146b29 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 22 May 2016 20:20:55 -0500 Subject: [PATCH] Optional TNT doesn't move in water diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 38de48ebc..321da3be3 100644 +index a3823408ca..41e73b3409 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -2,7 +2,6 @@ package com.destroystokyo.paper; @@ -16,7 +16,7 @@ index 38de48ebc..321da3be3 100644 import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -275,4 +274,14 @@ public class PaperWorldConfig { +@@ -276,4 +275,14 @@ public class PaperWorldConfig { ); } } @@ -32,10 +32,10 @@ index 38de48ebc..321da3be3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 70694c8e5..51b42933d 100644 +index 7768698ec6..f8eda1c3e0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1182,6 +1182,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1191,6 +1191,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean aq() { @@ -48,7 +48,7 @@ index 70694c8e5..51b42933d 100644 return this.isInWater() || this.q(); } -@@ -2724,6 +2730,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2737,6 +2743,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean bw() { @@ -61,7 +61,7 @@ index 70694c8e5..51b42933d 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 87f3205f8..8c1d25979 100644 +index 87f3205f82..8c1d25979f 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -147,4 +147,49 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/0123-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0122-Faster-redstone-torch-rapid-clock-removal.patch similarity index 94% rename from Spigot-Server-Patches/0123-Faster-redstone-torch-rapid-clock-removal.patch rename to Spigot-Server-Patches/0122-Faster-redstone-torch-rapid-clock-removal.patch index 1b04bbceba..2633e8dc4f 100644 --- a/Spigot-Server-Patches/0123-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0122-Faster-redstone-torch-rapid-clock-removal.patch @@ -1,4 +1,4 @@ -From 0ab83c3fcfa7cba9f3436c814c560124d4013e2a Mon Sep 17 00:00:00 2001 +From bd9abe1adfe269fd95965e845ff7b18f9edc7d2a Mon Sep 17 00:00:00 2001 From: Martin Panzer Date: Mon, 23 May 2016 12:12:37 +0200 Subject: [PATCH] Faster redstone torch rapid clock removal @@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal Only resize the the redstone torch list once, since resizing arrays / lists is costly diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -index 6a54da4d6..ebd47196b 100644 +index c912fb8ae0..d2246cfb10 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java @@ -63,9 +63,17 @@ public class BlockRedstoneTorch extends BlockTorch { diff --git a/Spigot-Server-Patches/0124-Ensure-Chunks-never-ever-load-async.patch b/Spigot-Server-Patches/0123-Ensure-Chunks-never-ever-load-async.patch similarity index 95% rename from Spigot-Server-Patches/0124-Ensure-Chunks-never-ever-load-async.patch rename to Spigot-Server-Patches/0123-Ensure-Chunks-never-ever-load-async.patch index dc00202cc8..b9ecbbcde0 100644 --- a/Spigot-Server-Patches/0124-Ensure-Chunks-never-ever-load-async.patch +++ b/Spigot-Server-Patches/0123-Ensure-Chunks-never-ever-load-async.patch @@ -1,4 +1,4 @@ -From eca617fa0198e46fcf7d2b215ab9c3661546ad39 Mon Sep 17 00:00:00 2001 +From 36c2a934001480dd1365190147d4e70a1f791018 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 27 May 2016 21:41:26 -0400 Subject: [PATCH] Ensure Chunks never ever load async @@ -6,7 +6,7 @@ Subject: [PATCH] Ensure Chunks never ever load async Safely pushes the operation to main thread, then back to the posting thread diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java -index 7b7a3d01b..9aaca21a7 100644 +index 7b7a3d01b9..9aaca21a79 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java @@ -4,6 +4,7 @@ import com.destroystokyo.paper.PaperConfig; @@ -27,7 +27,7 @@ index 7b7a3d01b..9aaca21a7 100644 public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) { diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 52a8c48fa..2bbd5a7e2 100644 +index 52a8c48fa4..2bbd5a7e2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -35,9 +35,9 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider Date: Sat, 28 May 2016 16:54:03 +0200 Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d9059129d..aad208f47 100644 +index 38e696aa94..c552c624e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -134,6 +134,14 @@ public class Main { +@@ -136,6 +136,14 @@ public class Main { .defaultsTo(new File("paper.yml")) .describedAs("Yml file"); // Paper end diff --git a/Spigot-Server-Patches/0126-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/0125-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch similarity index 95% rename from Spigot-Server-Patches/0126-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch rename to Spigot-Server-Patches/0125-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index 23408ddcf4..31b3e96d98 100644 --- a/Spigot-Server-Patches/0126-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/0125-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -1,4 +1,4 @@ -From 75a746991400c961cb2e2e48ffc77195d999a16d Mon Sep 17 00:00:00 2001 +From dd0d1f30603f537e6468a4fa50fbc416e5c49d1b Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 31 May 2016 22:53:50 -0400 Subject: [PATCH] Only send Dragon/Wither Death sounds to same world @@ -6,7 +6,7 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world Also fix view distance lookup diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 24cce6c03..e5f064577 100644 +index bbd807315a..131f8a5156 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -573,8 +573,12 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo @@ -25,7 +25,7 @@ index 24cce6c03..e5f064577 100644 double deltaZ = this.locZ - player.locZ; double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index e9d9ec239..28f524468 100644 +index 4f73b02baf..0d68a9be6c 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -199,8 +199,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/0127-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0126-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 94% rename from Spigot-Server-Patches/0127-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0126-Delay-Chunk-Unloads-based-on-Player-Movement.patch index f841ac3ee6..71d26fcc92 100644 --- a/Spigot-Server-Patches/0127-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0126-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -1,4 +1,4 @@ -From 8b0ebf88191276c87b61235e51405887463861a3 Mon Sep 17 00:00:00 2001 +From 6c65812f358717d4ce1529e6fde27cdabc07c072 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 18 Jun 2016 23:22:12 -0400 Subject: [PATCH] Delay Chunk Unloads based on Player Movement @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 321da3be3..0e6c18b32 100644 +index 41e73b3409..ec6b550ff6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -284,4 +284,18 @@ public class PaperWorldConfig { +@@ -285,4 +285,18 @@ public class PaperWorldConfig { preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); } @@ -40,7 +40,7 @@ index 321da3be3..0e6c18b32 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 718ebfea0..6c6924937 100644 +index acc21aec02..c27073d27c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -39,6 +39,7 @@ public class Chunk implements IChunkAccess { @@ -52,10 +52,10 @@ index 718ebfea0..6c6924937 100644 public final int locZ; private boolean m; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 7825dc91b..2e72a294d 100644 +index 2925c345a1..a5139b0b0d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -318,6 +318,19 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -328,6 +328,19 @@ public class ChunkProviderServer implements IChunkProvider { activityAccountant.endActivity(); // Spigot } @@ -76,7 +76,7 @@ index 7825dc91b..2e72a294d 100644 this.f.a(); this.chunkLoader.b(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index ffff87dc0..344b95233 100644 +index ffff87dc03..344b95233f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -33,14 +33,23 @@ public class PlayerChunk { @@ -112,7 +112,7 @@ index ffff87dc0..344b95233 100644 return this.chunk != null; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4d888d6d4..cf5c76a78 100644 +index 4d888d6d4f..cf5c76a78e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -461,7 +461,13 @@ public class PlayerChunkMap { @@ -131,7 +131,7 @@ index 4d888d6d4..cf5c76a78 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5102f24ed..c9b6b57af 100644 +index f1c036aa6a..95ec4f48f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1294,7 +1294,13 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -150,10 +150,10 @@ index 5102f24ed..c9b6b57af 100644 this.methodProfiler.a(() -> { return String.valueOf(TileEntityTypes.a(tileentity.C())); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ff3558363..90e260f3b 100644 +index e3e45ed48a..d4851dd2a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1581,7 +1581,7 @@ public class CraftWorld implements World { +@@ -1577,7 +1577,7 @@ public class CraftWorld implements World { ChunkProviderServer cps = world.getChunkProviderServer(); for (net.minecraft.server.Chunk chunk : cps.chunks.values()) { // If in use, skip it @@ -163,7 +163,7 @@ index ff3558363..90e260f3b 100644 } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index a9b84fdec..e02647f80 100644 +index a9b84fdec4..e02647f806 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -284,6 +284,10 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/0128-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0127-Fix-Double-World-Add-issues.patch similarity index 90% rename from Spigot-Server-Patches/0128-Fix-Double-World-Add-issues.patch rename to Spigot-Server-Patches/0127-Fix-Double-World-Add-issues.patch index 9ebbe36217..ecfefdab69 100644 --- a/Spigot-Server-Patches/0128-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0127-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From c4546f54875964aa47af70957bae0bc9a8840b28 Mon Sep 17 00:00:00 2001 +From d3ba0114303906b3d911da03acd12d54ef66d382 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 21 Jun 2016 22:54:34 -0400 Subject: [PATCH] Fix Double World Add issues @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ad3bd3808..e70c2184c 100644 +index f007af2e1a..2f1488ee53 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -1058,7 +1058,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -1050,7 +1050,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public static void a(Entity entity, GeneratorAccess generatoraccess, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { @@ -21,7 +21,7 @@ index ad3bd3808..e70c2184c 100644 Iterator iterator = entity.bP().iterator(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c9b6b57af..067b92f3e 100644 +index 95ec4f48f2..45ab70167a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -955,6 +955,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0129-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0128-Fix-Old-Sign-Conversion.patch similarity index 93% rename from Spigot-Server-Patches/0129-Fix-Old-Sign-Conversion.patch rename to Spigot-Server-Patches/0128-Fix-Old-Sign-Conversion.patch index fb27b26e3d..40fc2a9f3f 100644 --- a/Spigot-Server-Patches/0129-Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/0128-Fix-Old-Sign-Conversion.patch @@ -1,4 +1,4 @@ -From 6b3f4ff9f1bbc1a21ec0b323e444cf24e6582eb9 Mon Sep 17 00:00:00 2001 +From 0a7286e77c225d7801d81c1e635f632c6a125693 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 17 Jun 2016 20:50:11 -0400 Subject: [PATCH] Fix Old Sign Conversion @@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 15c7cc170..2109f316d 100644 +index 785a1a2184..528db8704e 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -218,9 +218,11 @@ public class DefinedStructure { @@ -25,11 +25,11 @@ index 15c7cc170..2109f316d 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 8cab71c0e..2cfe2202e 100644 +index d8d519143e..6021a3401f 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -11,6 +11,7 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit - public abstract class TileEntity implements KeyedObject { + public abstract class TileEntity implements KeyedObject { // Paper public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper + boolean isLoadingStructure = false; // Paper @@ -37,7 +37,7 @@ index 8cab71c0e..2cfe2202e 100644 private final TileEntityTypes e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 939d8790f..335a4d27f 100644 +index c5164ca3f4..2591c2f0b2 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -49,13 +49,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -58,5 +58,5 @@ index 939d8790f..335a4d27f 100644 if (this.world instanceof WorldServer) { try { -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0130-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0129-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 90% rename from Spigot-Server-Patches/0130-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to Spigot-Server-Patches/0129-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index 867723c393..e208ea63c5 100644 --- a/Spigot-Server-Patches/0130-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/0129-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -1,11 +1,11 @@ -From 52368f047b0365b4b14565ec92e5770fcf62c463 Mon Sep 17 00:00:00 2001 +From c0b4e3b3ba563f5560520a639f972179352c3418 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 16 Jul 2016 19:11:17 -0500 Subject: [PATCH] Don't lookup game profiles that have no UUID and no name diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index f8b7d695c..a47a51a41 100644 +index f8b7d695c6..a47a51a412 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -87,7 +87,7 @@ public class UserCache { diff --git a/Spigot-Server-Patches/0131-More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/0130-More-informative-vehicle-moved-wrongly-message.patch similarity index 90% rename from Spigot-Server-Patches/0131-More-informative-vehicle-moved-wrongly-message.patch rename to Spigot-Server-Patches/0130-More-informative-vehicle-moved-wrongly-message.patch index 2fed575944..3ecc36059e 100644 --- a/Spigot-Server-Patches/0131-More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/0130-More-informative-vehicle-moved-wrongly-message.patch @@ -1,11 +1,11 @@ -From 62b82aafb470f62c90f6b4af01f863508532a0c1 Mon Sep 17 00:00:00 2001 +From 5fe385d1c9048225ddd1b55d874c0782d527d01f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 28 Jul 2016 17:58:53 -0500 Subject: [PATCH] More informative vehicle moved wrongly message diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 79fddc866..32cef8e30 100644 +index 9d705ed7d1..fc33baf2bf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -354,7 +354,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/0132-Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/0131-Re-track-players-that-dismount-from-other-players.patch similarity index 91% rename from Spigot-Server-Patches/0132-Re-track-players-that-dismount-from-other-players.patch rename to Spigot-Server-Patches/0131-Re-track-players-that-dismount-from-other-players.patch index 89fe9ca76b..1951d5dec2 100644 --- a/Spigot-Server-Patches/0132-Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/0131-Re-track-players-that-dismount-from-other-players.patch @@ -1,11 +1,11 @@ -From 4bea6aa92d099eca90ad5acad6cba3724c67deed Mon Sep 17 00:00:00 2001 +From bcfa3dba803fbc577ffba930dab5c3e7617d6533 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 31 Jul 2016 16:33:03 -0500 Subject: [PATCH] Re-track players that dismount from other players diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8b5cfc78a..5aafa4e23 100644 +index 27ea8984fb..982e18f8af 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -733,6 +733,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0133-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0132-Add-setting-for-proxy-online-mode-status.patch similarity index 89% rename from Spigot-Server-Patches/0133-Add-setting-for-proxy-online-mode-status.patch rename to Spigot-Server-Patches/0132-Add-setting-for-proxy-online-mode-status.patch index b78841f5d7..800469bbd8 100644 --- a/Spigot-Server-Patches/0133-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0132-Add-setting-for-proxy-online-mode-status.patch @@ -1,14 +1,14 @@ -From 3345a0866470144d0accf25736ef329d09bdf279 Mon Sep 17 00:00:00 2001 +From b81234662dc8a123760b733872fc6341c1cdb723 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Fri, 5 Aug 2016 01:03:08 +0200 Subject: [PATCH] Add setting for proxy online mode status diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 011cbf5e3..cf06f8ac3 100644 +index 5538dfd9d8..0e5773bae4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -230,4 +230,9 @@ public class PaperConfig { +@@ -234,4 +234,9 @@ public class PaperConfig { private static void saveEmptyScoreboardTeams() { saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false); } @@ -19,7 +19,7 @@ index 011cbf5e3..cf06f8ac3 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index f13534917..85c7a96c5 100644 +index f135349174..85c7a96c5a 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -60,7 +60,8 @@ public class NameReferencingFileConverter { @@ -33,10 +33,10 @@ index f13534917..85c7a96c5 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 06b59657f..6c7151536 100644 +index 761db58b29..3bbf9b0189 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1375,7 +1375,8 @@ public final class CraftServer implements Server { +@@ -1358,7 +1358,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/Spigot-Server-Patches/0134-Optimise-BlockStateEnum-hashCode-and-equals.patch b/Spigot-Server-Patches/0133-Optimise-BlockStateEnum-hashCode-and-equals.patch similarity index 96% rename from Spigot-Server-Patches/0134-Optimise-BlockStateEnum-hashCode-and-equals.patch rename to Spigot-Server-Patches/0133-Optimise-BlockStateEnum-hashCode-and-equals.patch index dbfc695357..407fd4450e 100644 --- a/Spigot-Server-Patches/0134-Optimise-BlockStateEnum-hashCode-and-equals.patch +++ b/Spigot-Server-Patches/0133-Optimise-BlockStateEnum-hashCode-and-equals.patch @@ -1,11 +1,11 @@ -From 8581e708e437ba0aedfd536cef77fcd7cadf7abe Mon Sep 17 00:00:00 2001 +From 300e97ecdb34c2c837b4610065ce834de7be0afb Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Fri, 19 Aug 2016 01:52:56 +0100 Subject: [PATCH] Optimise BlockStateEnum hashCode and equals diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 725087de5..5e6cb5d7d 100644 +index 725087de59..5e6cb5d7de 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -17,6 +17,11 @@ public class BlockStateEnum & INamable> extends BlockState diff --git a/Spigot-Server-Patches/0135-Disable-ticking-of-snow-blocks.patch b/Spigot-Server-Patches/0134-Disable-ticking-of-snow-blocks.patch similarity index 89% rename from Spigot-Server-Patches/0135-Disable-ticking-of-snow-blocks.patch rename to Spigot-Server-Patches/0134-Disable-ticking-of-snow-blocks.patch index d4756dbaed..6839453fc7 100644 --- a/Spigot-Server-Patches/0135-Disable-ticking-of-snow-blocks.patch +++ b/Spigot-Server-Patches/0134-Disable-ticking-of-snow-blocks.patch @@ -1,11 +1,11 @@ -From 27d2d5a316ab5a3c70afafb1fec9c236c35b02ab Mon Sep 17 00:00:00 2001 +From 5f1f0cd80117d5f1a165875516edbd0a6f44510f Mon Sep 17 00:00:00 2001 From: killme Date: Tue, 30 Aug 2016 16:39:48 +0200 Subject: [PATCH] Disable ticking of snow blocks diff --git a/src/main/java/net/minecraft/server/BlockSnowBlock.java b/src/main/java/net/minecraft/server/BlockSnowBlock.java -index 0c8f9d37f..44ed65626 100644 +index 0c8f9d37fd..44ed656263 100644 --- a/src/main/java/net/minecraft/server/BlockSnowBlock.java +++ b/src/main/java/net/minecraft/server/BlockSnowBlock.java @@ -16,6 +16,8 @@ public class BlockSnowBlock extends Block { diff --git a/Spigot-Server-Patches/0136-Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/0135-Fix-AIOOBE-in-inventory-handling.patch similarity index 85% rename from Spigot-Server-Patches/0136-Fix-AIOOBE-in-inventory-handling.patch rename to Spigot-Server-Patches/0135-Fix-AIOOBE-in-inventory-handling.patch index 84d61a6ec1..0f1ebf9e1c 100644 --- a/Spigot-Server-Patches/0136-Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/0135-Fix-AIOOBE-in-inventory-handling.patch @@ -1,14 +1,14 @@ -From 6fabf2f21ad94320e5e9a0ce4662598185a03b2e Mon Sep 17 00:00:00 2001 +From ee51f2d2b90389e0e916203dcbb96bf63d83d8b0 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sun, 4 Sep 2016 16:35:43 -0500 Subject: [PATCH] Fix AIOOBE in inventory handling diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 32cef8e30..b17540ecb 100644 +index 0fe8d1c3f1..ed02cd7a7a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2085,7 +2085,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2086,7 +2086,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { case CLONE: if (packetplayinwindowclick.d() == 2) { click = ClickType.MIDDLE; diff --git a/Spigot-Server-Patches/0137-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0136-Configurable-packet-in-spam-threshold.patch similarity index 92% rename from Spigot-Server-Patches/0137-Configurable-packet-in-spam-threshold.patch rename to Spigot-Server-Patches/0136-Configurable-packet-in-spam-threshold.patch index c4ff8687da..45cbce3de6 100644 --- a/Spigot-Server-Patches/0137-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0136-Configurable-packet-in-spam-threshold.patch @@ -1,14 +1,14 @@ -From d7bbea2686479f0573da09c114879cc3c4768962 Mon Sep 17 00:00:00 2001 +From 9f53223bbee1f9a9c355d6db7f8526b5bbb300e1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 11 Sep 2016 14:30:57 -0500 Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cf06f8ac3..2001175bf 100644 +index 0e5773bae..ed9ae4df3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -235,4 +235,13 @@ public class PaperConfig { +@@ -239,4 +239,13 @@ public class PaperConfig { private static void bungeeOnlineMode() { bungeeOnlineMode = getBoolean("settings.bungee-online-mode", true); } @@ -23,7 +23,7 @@ index cf06f8ac3..2001175bf 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b17540ecb..a41fa05ee 100644 +index 47554df42..c9613bf2d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1186,13 +1186,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/0138-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0137-Configurable-flying-kick-messages.patch similarity index 93% rename from Spigot-Server-Patches/0138-Configurable-flying-kick-messages.patch rename to Spigot-Server-Patches/0137-Configurable-flying-kick-messages.patch index b307c26aca..59aa95a9cb 100644 --- a/Spigot-Server-Patches/0138-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0137-Configurable-flying-kick-messages.patch @@ -1,14 +1,14 @@ -From 1f456ac80600eb29d13fd5f4eeec395f6a3a98bb Mon Sep 17 00:00:00 2001 +From db73402e6e13134db182d0dde9f1174efe995fbf Mon Sep 17 00:00:00 2001 From: kashike Date: Tue, 20 Sep 2016 00:58:01 +0000 Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 2001175bf..621c585e7 100644 +index ed9ae4df3..4bdb0a5f9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -244,4 +244,11 @@ public class PaperConfig { +@@ -248,4 +248,11 @@ public class PaperConfig { } packetInSpamThreshold = getInt("settings.incoming-packet-spam-threshold", 300); } @@ -21,7 +21,7 @@ index 2001175bf..621c585e7 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a41fa05ee..1f2cfbc92 100644 +index c9613bf2d..4ccebb3f9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -144,6 +144,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/0139-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0138-Auto-Save-Improvements.patch similarity index 84% rename from Spigot-Server-Patches/0139-Auto-Save-Improvements.patch rename to Spigot-Server-Patches/0138-Auto-Save-Improvements.patch index 78c7024f63..081ba067c8 100644 --- a/Spigot-Server-Patches/0139-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0138-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From 221b6fda013cdc465dcf73d3765655e8c1d7522e Mon Sep 17 00:00:00 2001 +From cfaacd1e20ab7cd9ecb5cca91fe53e601d362c28 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:16:39 -0400 Subject: [PATCH] Auto Save Improvements @@ -12,10 +12,10 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and Adds incremental player auto saving too diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 621c585e7..459c86bce 100644 +index 4bdb0a5f9c..315d85090a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -251,4 +251,15 @@ public class PaperConfig { +@@ -255,4 +255,15 @@ public class PaperConfig { flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage); flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage); } @@ -32,7 +32,7 @@ index 621c585e7..459c86bce 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0e6c18b32..c182ceffb 100644 +index ec6b550ff6..499230af60 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -2,6 +2,7 @@ package com.destroystokyo.paper; @@ -43,7 +43,7 @@ index 0e6c18b32..c182ceffb 100644 import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -298,4 +299,19 @@ public class PaperWorldConfig { +@@ -299,4 +300,19 @@ public class PaperWorldConfig { private void skipEntityTickingInChunksScheduledForUnload() { skipEntityTickingInChunksScheduledForUnload = getBoolean("skip-entity-ticking-in-chunks-scheduled-for-unload", skipEntityTickingInChunksScheduledForUnload); } @@ -64,10 +64,22 @@ index 0e6c18b32..c182ceffb 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c6924937..5163bd11b 100644 +index c27073d27c..06d6814b83 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1013,11 +1013,9 @@ public class Chunk implements IChunkAccess { +@@ -52,9 +52,9 @@ public class Chunk implements IChunkAccess { + private final TickList t; + private final TickList u; + private boolean v; +- private boolean w; ++ private boolean w; public boolean hasEntities() { return w; } // Paper - OBFHELPER + private long lastSaved; +- private boolean y; ++ private boolean y; public boolean isModified() { return y; } // Paper - OBFHELPER + private int z; + private long A; public long getInhabitedTime() { return A; } // Paper - OBFHELPER + private int B; +@@ -1010,11 +1010,11 @@ public class Chunk implements IChunkAccess { if (this.w && this.world.getTime() != this.lastSaved || this.y) { return true; } @@ -76,13 +88,15 @@ index 6c6924937..5163bd11b 100644 } - - return this.y; -+ // This !flag section should say if y(isModified) or w(hasEntities), then check auto save -+ return ((this.y || this.w) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod); // Paper - Make world configurable and incremental ++ // Paper start - Make world configurable and incremental ++ // This !flag section should say if isModified or hasEntities, then check auto save ++ return ((isModified() || hasEntities()) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod); ++ // Paper end } public boolean isEmpty() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 2e72a294d..1e6ea3084 100644 +index a5139b0b0d..aa8d25e765 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -1,5 +1,6 @@ @@ -92,7 +106,7 @@ index 2e72a294d..1e6ea3084 100644 import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; -@@ -260,7 +261,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -270,7 +271,7 @@ public class ChunkProviderServer implements IChunkProvider { this.saveChunk(chunk, false); // Spigot chunk.a(false); ++i; @@ -102,7 +116,7 @@ index 2e72a294d..1e6ea3084 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5aafa4e23..f5fae7ba8 100644 +index 982e18f8af..1879c32381 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -38,6 +38,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -114,18 +128,18 @@ index 5aafa4e23..f5fae7ba8 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 49b2c27c6..bf020293d 100644 +index d25e5c508a..3447afcad8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -147,6 +147,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -144,6 +144,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; + public ConsoleReader reader; + public static int currentTick = 0; // Paper - Further improve tick loop ++ public boolean serverAutoSave = false; // Paper + public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; - public File bukkitDataPackFolder; -+ public boolean serverAutoSave = false; // Paper - // CraftBukkit end - // Spigot start - public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); -@@ -868,22 +869,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -913,22 +914,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.n.b().a(agameprofile); } @@ -161,7 +175,7 @@ index 49b2c27c6..bf020293d 100644 this.methodProfiler.a("snooper"); if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6b7d81933..3ee587014 100644 +index d0c547cc99..12f6812d67 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -341,6 +341,7 @@ public abstract class PlayerList { @@ -172,7 +186,7 @@ index 6b7d81933..3ee587014 100644 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -1220,13 +1221,25 @@ public abstract class PlayerList { +@@ -1213,13 +1214,25 @@ public abstract class PlayerList { } @@ -200,7 +214,7 @@ index 6b7d81933..3ee587014 100644 public WhiteList getWhitelist() { return this.whitelist; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e3d62fc9c..72b3a6d40 100644 +index 96002184bb..bf07155bc1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -872,8 +872,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0140-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0139-Chunk-registration-fixes.patch similarity index 84% rename from Spigot-Server-Patches/0140-Chunk-registration-fixes.patch rename to Spigot-Server-Patches/0139-Chunk-registration-fixes.patch index 78a3f71998..c14f5dea3a 100644 --- a/Spigot-Server-Patches/0140-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0139-Chunk-registration-fixes.patch @@ -1,4 +1,4 @@ -From 977d7d2021db60c67df0f9fa5fa7fc5ae5089144 Mon Sep 17 00:00:00 2001 +From 077b1083946830fd30de8b44913abf39100c97a8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 22:54:28 -0400 Subject: [PATCH] Chunk registration fixes @@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 067b92f3e..04b5521cd 100644 +index 45ab70167a..5d3378be0b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1470,7 +1470,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose +@@ -1474,7 +1474,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose } i = MathHelper.floor(entity.locX / 16.0D); diff --git a/Spigot-Server-Patches/0141-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0140-Remove-FishingHook-reference-on-Craft-Entity-removal.patch similarity index 89% rename from Spigot-Server-Patches/0141-Remove-FishingHook-reference-on-Craft-Entity-removal.patch rename to Spigot-Server-Patches/0140-Remove-FishingHook-reference-on-Craft-Entity-removal.patch index 6f49382da0..56a80ece40 100644 --- a/Spigot-Server-Patches/0141-Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/0140-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -1,11 +1,11 @@ -From e05148f8cd85509c3dfa6580961b625e76b5ba9e Mon Sep 17 00:00:00 2001 +From 1a602000612c28f2376c093593250ff851542acb Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 16 Jun 2016 00:17:23 -0400 Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 8392b16b3..752b56435 100644 +index 8392b16b3b..752b56435d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -62,4 +62,15 @@ public class CraftFishHook extends AbstractProjectile implements FishHook { diff --git a/Spigot-Server-Patches/0142-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0141-Auto-fix-bad-Y-levels-on-player-login.patch similarity index 90% rename from Spigot-Server-Patches/0142-Auto-fix-bad-Y-levels-on-player-login.patch rename to Spigot-Server-Patches/0141-Auto-fix-bad-Y-levels-on-player-login.patch index 767b7f982a..b16c02adcf 100644 --- a/Spigot-Server-Patches/0142-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0141-Auto-fix-bad-Y-levels-on-player-login.patch @@ -1,4 +1,4 @@ -From 14bdfe423406bd73328a42edff706d053538a9e9 Mon Sep 17 00:00:00 2001 +From a079a95c1d916ad191338fb5fad68745d9cf1558 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 23:48:39 -0400 Subject: [PATCH] Auto fix bad Y levels on player login @@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f5fae7ba8..dc32dc80d 100644 +index 1879c32381..b76c28147b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -199,6 +199,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0143-Disable-Vanilla-Chunk-GC.patch b/Spigot-Server-Patches/0142-Disable-Vanilla-Chunk-GC.patch similarity index 92% rename from Spigot-Server-Patches/0143-Disable-Vanilla-Chunk-GC.patch rename to Spigot-Server-Patches/0142-Disable-Vanilla-Chunk-GC.patch index ebbf325fc7..559e3669c8 100644 --- a/Spigot-Server-Patches/0143-Disable-Vanilla-Chunk-GC.patch +++ b/Spigot-Server-Patches/0142-Disable-Vanilla-Chunk-GC.patch @@ -1,4 +1,4 @@ -From 42f903c1bbf57ab046c7bb5b730bc04b9ea9f691 Mon Sep 17 00:00:00 2001 +From 0f4827d2c74c4372c38edf9a701a45ed926c67b7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 26 Sep 2016 01:51:30 -0400 Subject: [PATCH] Disable Vanilla Chunk GC @@ -6,7 +6,7 @@ Subject: [PATCH] Disable Vanilla Chunk GC Bukkit has its own system for this. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 72b3a6d40..e766e2536 100644 +index bf07155bc1..8f6ce6bf1a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -889,7 +889,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0144-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0143-Option-to-remove-corrupt-tile-entities.patch similarity index 85% rename from Spigot-Server-Patches/0144-Option-to-remove-corrupt-tile-entities.patch rename to Spigot-Server-Patches/0143-Option-to-remove-corrupt-tile-entities.patch index 445794536d..9094fad9b7 100644 --- a/Spigot-Server-Patches/0144-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0143-Option-to-remove-corrupt-tile-entities.patch @@ -1,14 +1,14 @@ -From 04a43a703bb0f5eef6a82418f681d69837c38f6e Mon Sep 17 00:00:00 2001 +From ebe77e76a5d76ad93b286e6a654d8e4b78c85c93 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 5 Oct 2016 16:27:36 -0500 Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c182ceffb..9a2ec0793 100644 +index 499230af6..189ec79f0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -314,4 +314,9 @@ public class PaperWorldConfig { +@@ -315,4 +315,9 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -19,10 +19,10 @@ index c182ceffb..9a2ec0793 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5163bd11b..f31524eb0 100644 +index 06d6814b8..7a797bef0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -832,6 +832,12 @@ public class Chunk implements IChunkAccess { +@@ -829,6 +829,12 @@ public class Chunk implements IChunkAccess { "Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); @@ -35,7 +35,7 @@ index 5163bd11b..f31524eb0 100644 // Paper end // CraftBukkit end } -@@ -841,6 +847,7 @@ public class Chunk implements IChunkAccess { +@@ -838,6 +844,7 @@ public class Chunk implements IChunkAccess { this.i.put(new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")), nbttagcompound); } diff --git a/Spigot-Server-Patches/0145-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0144-Add-EntityZapEvent.patch similarity index 96% rename from Spigot-Server-Patches/0145-Add-EntityZapEvent.patch rename to Spigot-Server-Patches/0144-Add-EntityZapEvent.patch index 7dfee18bd6..7550375684 100644 --- a/Spigot-Server-Patches/0145-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0144-Add-EntityZapEvent.patch @@ -1,11 +1,11 @@ -From d2f8d17d9f237442ffd96055011475ecaf059e51 Mon Sep 17 00:00:00 2001 +From e858d6c03e2ac879054dceb8daa3ea41be42c4ca Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:30 -0700 Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 286382399f..2c7677b480 100644 +index 34b6b01a30..670f26c827 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -152,6 +152,12 @@ public class EntityPig extends EntityAnimal { @@ -22,7 +22,7 @@ index 286382399f..2c7677b480 100644 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 6c66f7deb5..f14d118427 100644 +index 32893a32c9..45df38bad4 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -610,6 +610,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { diff --git a/Spigot-Server-Patches/0146-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0145-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 93% rename from Spigot-Server-Patches/0146-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0145-Don-t-load-Chunks-from-Hoppers-and-other-things.patch index f6a69ab83d..9eaee7704f 100644 --- a/Spigot-Server-Patches/0146-Don-t-load-Chunks-from-Hoppers-and-other-things.patch +++ b/Spigot-Server-Patches/0145-Don-t-load-Chunks-from-Hoppers-and-other-things.patch @@ -1,4 +1,4 @@ -From 86f5120f1974823a7b6aa8ffd62575bfcdb812fb Mon Sep 17 00:00:00 2001 +From 6f5410680ed1d35082625a9c84be695294046115 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Nov 2016 20:28:12 -0400 Subject: [PATCH] Don't load Chunks from Hoppers and other things @@ -13,13 +13,13 @@ This of course is undesirable, so just return the loaded side as "primary" and treat it as a single chest if the other sides are unloaded diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index f8be07258..633c75ffe 100644 +index 1ad39aca3b..7262c2b19f 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java @@ -196,7 +196,12 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC return (ITileInventory) object; } else { - BlockPosition blockposition1 = blockposition.shift(j(iblockdata)); + BlockPosition blockposition1 = blockposition.shift(k(iblockdata)); - IBlockData iblockdata1 = world.getType(blockposition1); + // Paper start - don't load chunks if the other side of the chest is in unloaded chunk + final IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition1); // Paper diff --git a/Spigot-Server-Patches/0147-Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/0146-Prevent-Auto-Save-if-Save-Queue-is-full.patch similarity index 89% rename from Spigot-Server-Patches/0147-Prevent-Auto-Save-if-Save-Queue-is-full.patch rename to Spigot-Server-Patches/0146-Prevent-Auto-Save-if-Save-Queue-is-full.patch index 043c5072d9..8c9cb69be4 100644 --- a/Spigot-Server-Patches/0147-Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/0146-Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -1,4 +1,4 @@ -From 3efd56fcbb76e3a5ed65644d6040c9e030f641b7 Mon Sep 17 00:00:00 2001 +From a5933b1c3c740f9eb59ce6db6ea847ee2a588a26 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Nov 2016 21:52:22 -0400 Subject: [PATCH] Prevent Auto Save if Save Queue is full @@ -7,10 +7,10 @@ If the save queue already has 50 (configurable) of chunks pending, then avoid processing auto save (which would add more) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9a2ec0793..f88444c7e 100644 +index 189ec79f05..4d0f2051aa 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -315,6 +315,11 @@ public class PaperWorldConfig { +@@ -316,6 +316,11 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -23,10 +23,10 @@ index 9a2ec0793..f88444c7e 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1e6ea3084..9145401bc 100644 +index aa8d25e765..c1a42e61e7 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -250,6 +250,14 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -260,6 +260,14 @@ public class ChunkProviderServer implements IChunkProvider { ArrayList arraylist = Lists.newArrayList(this.chunks.values()); Iterator iterator = arraylist.iterator(); @@ -41,7 +41,7 @@ index 1e6ea3084..9145401bc 100644 while (iterator.hasNext()) { Chunk chunk = (Chunk) iterator.next(); -@@ -261,7 +269,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -271,7 +279,7 @@ public class ChunkProviderServer implements IChunkProvider { this.saveChunk(chunk, false); // Spigot chunk.a(false); ++i; @@ -51,7 +51,7 @@ index 1e6ea3084..9145401bc 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e70c2184c..20aa20a98 100644 +index 2f1488ee53..859148cb86 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -137,6 +137,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/0148-Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/0147-Chunk-Save-Stats-Debug-Option.patch similarity index 92% rename from Spigot-Server-Patches/0148-Chunk-Save-Stats-Debug-Option.patch rename to Spigot-Server-Patches/0147-Chunk-Save-Stats-Debug-Option.patch index e625c95f63..dfb1d2a0eb 100644 --- a/Spigot-Server-Patches/0148-Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/0147-Chunk-Save-Stats-Debug-Option.patch @@ -1,4 +1,4 @@ -From 2180b64ba27758854a3d43a078e959ae159b8a8d Mon Sep 17 00:00:00 2001 +From 8281788d504c1618e1129a3dc19ce80b64d1c22c Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Nov 2016 02:12:10 -0400 Subject: [PATCH] Chunk Save Stats Debug Option @@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing. Stats on current queue, how many was processed and how many were queued. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9145401bc..ef35eb7ec 100644 +index c1a42e61e7..c96f1b2753 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -36,6 +36,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -23,7 +23,7 @@ index 9145401bc..ef35eb7ec 100644 public final WorldServer world; public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator, IAsyncTaskHandler iasynctaskhandler) { -@@ -253,6 +258,30 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -263,6 +268,30 @@ public class ChunkProviderServer implements IChunkProvider { // Paper start final ChunkRegionLoader chunkLoader = (ChunkRegionLoader) world.getChunkProviderServer().chunkLoader; final int queueSize = chunkLoader.getQueueSize(); @@ -55,7 +55,7 @@ index 9145401bc..ef35eb7ec 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 20aa20a98..de2231bb0 100644 +index 859148cb86..ea8684747d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -137,7 +137,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -73,7 +73,7 @@ index 20aa20a98..de2231bb0 100644 // CraftBukkit start - Add async variant, provide compatibility @Nullable -@@ -329,6 +335,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -325,6 +331,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, Supplier nbttagcompound) { // Spigot queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements @@ -81,7 +81,7 @@ index 20aa20a98..de2231bb0 100644 this.b.put(chunkcoordintpair, nbttagcompound); FileIOThread.a().a(this); } -@@ -352,6 +359,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -348,6 +355,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return false; } else { ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements diff --git a/Spigot-Server-Patches/0149-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0148-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch similarity index 92% rename from Spigot-Server-Patches/0149-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch rename to Spigot-Server-Patches/0148-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index ffeb24b9a2..eb7e22f2e2 100644 --- a/Spigot-Server-Patches/0149-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/0148-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -1,11 +1,11 @@ -From ede8e8d3f9e7c61a406433dd867cb320b744d3e1 Mon Sep 17 00:00:00 2001 +From 4134a60719294c89762a82aa1ed2141094d07b7a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 12 Nov 2016 23:25:22 -0600 Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f88444c7e..f64a5ef35 100644 +index 4d0f2051a..872001d04 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -3,6 +3,7 @@ package com.destroystokyo.paper; @@ -16,7 +16,7 @@ index f88444c7e..f64a5ef35 100644 import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -324,4 +325,12 @@ public class PaperWorldConfig { +@@ -325,4 +326,12 @@ public class PaperWorldConfig { private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); } @@ -30,7 +30,7 @@ index f88444c7e..f64a5ef35 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 7e5a2775a..ad5ac66ac 100644 +index 33bc46b05..4e1b74ebe 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -228,6 +228,15 @@ public class EntityFallingBlock extends Entity { diff --git a/Spigot-Server-Patches/0150-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0149-Cache-user-authenticator-threads.patch similarity index 90% rename from Spigot-Server-Patches/0150-Cache-user-authenticator-threads.patch rename to Spigot-Server-Patches/0149-Cache-user-authenticator-threads.patch index c370520266..071e6161d9 100644 --- a/Spigot-Server-Patches/0150-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0149-Cache-user-authenticator-threads.patch @@ -1,11 +1,11 @@ -From 85f2e0489f30bf8ab598150d903f060544c593ea Mon Sep 17 00:00:00 2001 +From 1462c435b911a715894e8eeb1e3974b90d2263c6 Mon Sep 17 00:00:00 2001 From: vemacs Date: Wed, 23 Nov 2016 08:31:45 -0500 Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 2f6d79b03..89a11a496 100644 +index eb936a0445..fae8a13973 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -93,6 +93,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -32,7 +32,7 @@ index 2f6d79b03..89a11a496 100644 @Override public void run() { try { -@@ -182,7 +188,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -181,7 +187,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex); } } @@ -42,7 +42,7 @@ index 2f6d79b03..89a11a496 100644 // Spigot end } -@@ -198,7 +205,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -197,7 +204,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { this.loginKey = packetlogininencryptionbegin.a(privatekey); this.g = LoginListener.EnumProtocolState.AUTHENTICATING; this.networkManager.a(this.loginKey); @@ -52,7 +52,7 @@ index 2f6d79b03..89a11a496 100644 public void run() { GameProfile gameprofile = LoginListener.this.i; -@@ -245,10 +253,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -244,10 +252,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { return LoginListener.this.server.U() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; } diff --git a/Spigot-Server-Patches/0151-Optimize-Network-Queue.patch b/Spigot-Server-Patches/0150-Optimize-Network-Queue.patch similarity index 90% rename from Spigot-Server-Patches/0151-Optimize-Network-Queue.patch rename to Spigot-Server-Patches/0150-Optimize-Network-Queue.patch index 70a98027dd..13bfaab9f9 100644 --- a/Spigot-Server-Patches/0151-Optimize-Network-Queue.patch +++ b/Spigot-Server-Patches/0150-Optimize-Network-Queue.patch @@ -1,11 +1,11 @@ -From 2f10cd1f97fd59757d6e3d452cc8afe6e36fb3ab Mon Sep 17 00:00:00 2001 +From e1b901c4c6129afd133c9364c4996e61b03ab618 Mon Sep 17 00:00:00 2001 From: vemacs Date: Wed, 23 Nov 2016 12:54:56 -0500 Subject: [PATCH] Optimize Network Queue diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bf020293d..f81ff5628 100644 +index 94df23c31f..c97953a2fd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -118,7 +118,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/0152-Optimise-removeQueue.patch b/Spigot-Server-Patches/0151-Optimise-removeQueue.patch similarity index 96% rename from Spigot-Server-Patches/0152-Optimise-removeQueue.patch rename to Spigot-Server-Patches/0151-Optimise-removeQueue.patch index d9556926df..aa0576713c 100644 --- a/Spigot-Server-Patches/0152-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0151-Optimise-removeQueue.patch @@ -1,11 +1,11 @@ -From 79801a202521b7cd79bdb5e0c2389e6993677099 Mon Sep 17 00:00:00 2001 +From 046d278b356f8850334858fdf7c1e4b1048e667b Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Fri, 25 Nov 2016 13:22:40 +0000 Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dc32dc80d..cf2a39384 100644 +index b76c28147b..4bde378afb 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -5,8 +5,10 @@ import com.mojang.authlib.GameProfile; diff --git a/Spigot-Server-Patches/0153-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0152-Allow-Reloading-of-Command-Aliases.patch similarity index 88% rename from Spigot-Server-Patches/0153-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-Server-Patches/0152-Allow-Reloading-of-Command-Aliases.patch index c3205942bd..3cc21c0737 100644 --- a/Spigot-Server-Patches/0153-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0152-Allow-Reloading-of-Command-Aliases.patch @@ -1,4 +1,4 @@ -From 21a06c5a111434636227935f23120b53773e3316 Mon Sep 17 00:00:00 2001 +From 977bbc79a58bf09d5ecd26dc52c2d6bd64d2949d Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 28 Nov 2016 10:21:52 -0500 Subject: [PATCH] Allow Reloading of Command Aliases @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6c7151536..1b6a849e2 100644 +index 3bbf9b0189..35b26d6128 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1986,5 +1986,24 @@ public final class CraftServer implements Server { +@@ -1970,5 +1970,24 @@ public final class CraftServer implements Server { }); } } diff --git a/Spigot-Server-Patches/0154-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0153-Add-source-to-PlayerExpChangeEvent.patch similarity index 97% rename from Spigot-Server-Patches/0154-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-Server-Patches/0153-Add-source-to-PlayerExpChangeEvent.patch index 57da2beb85..1b69b61352 100644 --- a/Spigot-Server-Patches/0154-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0153-Add-source-to-PlayerExpChangeEvent.patch @@ -1,4 +1,4 @@ -From f14b1122c926551e727b08ae7e699917c7fec942 Mon Sep 17 00:00:00 2001 +From fb639b8ca21b61e7043169b518c47f59b200e512 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Thu, 8 Sep 2016 08:48:33 -0700 Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/Spigot-Server-Patches/0155-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0154-Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 90% rename from Spigot-Server-Patches/0155-Optimize-World.isLoaded-BlockPosition-Z.patch rename to Spigot-Server-Patches/0154-Optimize-World.isLoaded-BlockPosition-Z.patch index 256435b374..425a04ac3b 100644 --- a/Spigot-Server-Patches/0155-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0154-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -1,4 +1,4 @@ -From 28b408d7f00001f367ebc48d66e6cc33510fafdc Mon Sep 17 00:00:00 2001 +From 7a5bea01249d8a9da6a2ac09ae808e0baeb1e9fa Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Dec 2016 00:11:43 -0500 Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 04b5521cd..ca7c23f54 100644 +index 5d3378be0b..92070c9325 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -273,6 +273,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0156-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0155-Don-t-let-fishinghooks-use-portals.patch similarity index 87% rename from Spigot-Server-Patches/0156-Don-t-let-fishinghooks-use-portals.patch rename to Spigot-Server-Patches/0155-Don-t-let-fishinghooks-use-portals.patch index f1720f02d1..9bba7a93f5 100644 --- a/Spigot-Server-Patches/0156-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0155-Don-t-let-fishinghooks-use-portals.patch @@ -1,14 +1,14 @@ -From cfd9c680af983aa5d1f25a5dc51d505beaa229be Mon Sep 17 00:00:00 2001 +From 458307a35436678f93443b917ff19d94e341a212 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 16 Dec 2016 16:03:19 -0600 Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 51b42933d..eb2a693af 100644 +index e56f458ca9..167cbb2820 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -143,7 +143,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -156,7 +156,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean ak; public boolean impulse; public int portalCooldown; @@ -18,7 +18,7 @@ index 51b42933d..eb2a693af 100644 public int dimension; protected BlockPosition aq; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 866f41980..8630184d4 100644 +index 7c119282b9..4f801e8fec 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -190,6 +190,12 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/0157-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0156-Add-ProjectileCollideEvent.patch similarity index 98% rename from Spigot-Server-Patches/0157-Add-ProjectileCollideEvent.patch rename to Spigot-Server-Patches/0156-Add-ProjectileCollideEvent.patch index 4f78170faf..f1bb4181d4 100644 --- a/Spigot-Server-Patches/0157-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0156-Add-ProjectileCollideEvent.patch @@ -1,4 +1,4 @@ -From 180ca0b7f1381aea69c6be70f5022c8821be8534 Mon Sep 17 00:00:00 2001 +From 7b0507da629c3fcacfddd3c1da01a7bbf86fd8d8 Mon Sep 17 00:00:00 2001 From: Techcable Date: Fri, 16 Dec 2016 21:25:39 -0600 Subject: [PATCH] Add ProjectileCollideEvent @@ -46,7 +46,7 @@ index 3e3619d79f..58cc4824cf 100644 this.a(movingobjectposition); diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 8630184d4b..7440e4a2a9 100644 +index 4f801e8fec..1804a49de9 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -245,6 +245,16 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/0158-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0157-Prevent-Pathfinding-out-of-World-Border.patch similarity index 93% rename from Spigot-Server-Patches/0158-Prevent-Pathfinding-out-of-World-Border.patch rename to Spigot-Server-Patches/0157-Prevent-Pathfinding-out-of-World-Border.patch index 2c7d94bbb1..46042786a5 100644 --- a/Spigot-Server-Patches/0158-Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/0157-Prevent-Pathfinding-out-of-World-Border.patch @@ -1,4 +1,4 @@ -From 4bfd853ce5f453c11bf3376a7c25a66964be68be Mon Sep 17 00:00:00 2001 +From 44e9f98e750fe8171d75df30354e63ef03e5b5ba Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Dec 2016 23:07:42 -0500 Subject: [PATCH] Prevent Pathfinding out of World Border @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Pathfinding out of World Border This prevents Entities from trying to run outside of the World Border diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 0c5215657..05e0545fd 100644 +index 76d1f4bd21..76b2787bae 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -73,6 +73,7 @@ public abstract class NavigationAbstract { @@ -26,7 +26,7 @@ index 0c5215657..05e0545fd 100644 if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 4763c30a8..ec5386fd5 100644 +index 4763c30a81..ec5386fd50 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -29,7 +29,7 @@ public class WorldBorder { diff --git a/Spigot-Server-Patches/0159-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0158-Bound-Treasure-Maps-to-World-Border.patch similarity index 95% rename from Spigot-Server-Patches/0159-Bound-Treasure-Maps-to-World-Border.patch rename to Spigot-Server-Patches/0158-Bound-Treasure-Maps-to-World-Border.patch index 981283a738..a092defa2b 100644 --- a/Spigot-Server-Patches/0159-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0158-Bound-Treasure-Maps-to-World-Border.patch @@ -1,4 +1,4 @@ -From c562348ff2e519c8f456cdf7966730a3391cea5b Mon Sep 17 00:00:00 2001 +From 2251066897e6922fa76254032d8420e91fb16eca Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:15:11 -0500 Subject: [PATCH] Bound Treasure Maps to World Border @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 263ea953a..8b8b468f3 100644 +index 263ea953ad..8b8b468f39 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -124,6 +124,7 @@ public abstract class StructureGenerator @@ -23,7 +23,7 @@ index 263ea953a..8b8b468f3 100644 if (structurestart != StructureGenerator.a) { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index ec5386fd5..08424a88b 100644 +index ec5386fd50..08424a88bf 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -33,6 +33,18 @@ public class WorldBorder { diff --git a/Spigot-Server-Patches/0160-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0159-Configurable-Cartographer-Treasure-Maps.patch similarity index 91% rename from Spigot-Server-Patches/0160-Configurable-Cartographer-Treasure-Maps.patch rename to Spigot-Server-Patches/0159-Configurable-Cartographer-Treasure-Maps.patch index edc9d45512..3863159bb0 100644 --- a/Spigot-Server-Patches/0160-Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/0159-Configurable-Cartographer-Treasure-Maps.patch @@ -1,4 +1,4 @@ -From ec6f484932e8d2c5f039245e18942fa4c02fc7fb Mon Sep 17 00:00:00 2001 +From 39a196741c1700fa0eb36c211f9a2656e89fe58f Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:26:27 -0500 Subject: [PATCH] Configurable Cartographer Treasure Maps @@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f64a5ef35..5df8b1143 100644 +index 872001d04..b95f259a9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -333,4 +333,14 @@ public class PaperWorldConfig { +@@ -334,4 +334,14 @@ public class PaperWorldConfig { Bukkit.getLogger().warning("Spawn Egg and Armor Stand NBT filtering disabled, this is a potential security risk"); } } @@ -28,7 +28,7 @@ index f64a5ef35..5df8b1143 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index abfd9adbd..dcc14aa11 100644 +index 45df38bad..e8fdf8625 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -755,6 +755,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { diff --git a/Spigot-Server-Patches/0161-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0160-Optimize-ItemStack.isEmpty.patch similarity index 83% rename from Spigot-Server-Patches/0161-Optimize-ItemStack.isEmpty.patch rename to Spigot-Server-Patches/0160-Optimize-ItemStack.isEmpty.patch index 6a20ec00f1..143e6e46e2 100644 --- a/Spigot-Server-Patches/0161-Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/0160-Optimize-ItemStack.isEmpty.patch @@ -1,4 +1,4 @@ -From a568807b1275842ccd23458e723c4bcaac760497 Mon Sep 17 00:00:00 2001 +From 766b2224cc263eb3f5d84aedae774f89cc97afdc Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Dec 2016 03:48:29 -0500 Subject: [PATCH] Optimize ItemStack.isEmpty() @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ed714c2cc..ca169e113 100644 +index 6e7b2e721d..33e82f5377 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -140,7 +140,7 @@ public final class ItemStack { +@@ -142,7 +142,7 @@ public final class ItemStack { } public boolean isEmpty() { diff --git a/Spigot-Server-Patches/0162-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0161-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 86% rename from Spigot-Server-Patches/0162-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-Server-Patches/0161-Add-API-methods-to-control-if-armour-stands-can-move.patch index 2f14a6ed2e..98ab58e122 100644 --- a/Spigot-Server-Patches/0162-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/0161-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -1,11 +1,11 @@ -From c454c72a987b25fdfd7dd8a651f4aa4beb8b891e Mon Sep 17 00:00:00 2001 +From 9552638e5117ea211b9a4d0f6104982070a79281 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 21 Dec 2016 11:47:25 -0600 Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 4c615baea..52a1036fd 100644 +index cf11a2225..578d96640 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -44,6 +44,7 @@ public class EntityArmorStand extends EntityLiving { @@ -17,7 +17,7 @@ index 4c615baea..52a1036fd 100644 public EntityArmorStand(World world) { super(EntityTypes.ARMOR_STAND, world); @@ -755,4 +756,13 @@ public class EntityArmorStand extends EntityLiving { - public boolean de() { + public boolean df() { return false; } + @@ -31,14 +31,15 @@ index 4c615baea..52a1036fd 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index 2b66a08ad..8a06cb165 100644 +index 2b66a08ad..124c3185b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -@@ -211,4 +211,14 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { +@@ -211,4 +211,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { public void setMarker(boolean marker) { getHandle().setMarker(marker); } + ++ // Paper start + @Override + public boolean canMove() { + return getHandle().canMove; @@ -48,6 +49,7 @@ index 2b66a08ad..8a06cb165 100644 + public void setCanMove(boolean move) { + getHandle().canMove = move; + } ++ // Paper end } -- 2.18.0 diff --git a/Spigot-Server-Patches/0163-Add-option-to-remove-invalid-statistics.patch b/Spigot-Server-Patches/0162-Add-option-to-remove-invalid-statistics.patch similarity index 92% rename from Spigot-Server-Patches/0163-Add-option-to-remove-invalid-statistics.patch rename to Spigot-Server-Patches/0162-Add-option-to-remove-invalid-statistics.patch index fe6c6d90d5..847e71d037 100644 --- a/Spigot-Server-Patches/0163-Add-option-to-remove-invalid-statistics.patch +++ b/Spigot-Server-Patches/0162-Add-option-to-remove-invalid-statistics.patch @@ -1,14 +1,14 @@ -From 2544e5bd92cf9529f315cd485c63960ee5bb9658 Mon Sep 17 00:00:00 2001 +From 76c7552376cc1589c2638fc771b9267878df9f51 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 20 Dec 2016 23:09:21 -0600 Subject: [PATCH] Add option to remove invalid statistics diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 459c86bce..ea6fcb39f 100644 +index 315d85090..644e01101 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -262,4 +262,13 @@ public class PaperConfig { +@@ -266,4 +266,13 @@ public class PaperConfig { maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20; } } @@ -23,7 +23,7 @@ index 459c86bce..ea6fcb39f 100644 + } } diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java -index 172f72fd8..7ba12c23d 100644 +index 07e7db455..34c57e26f 100644 --- a/src/main/java/net/minecraft/server/ServerStatisticManager.java +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java @@ -83,6 +83,7 @@ public class ServerStatisticManager extends StatisticManager { diff --git a/Spigot-Server-Patches/0164-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0163-Properly-fix-item-duplication-bug.patch similarity index 83% rename from Spigot-Server-Patches/0164-Properly-fix-item-duplication-bug.patch rename to Spigot-Server-Patches/0163-Properly-fix-item-duplication-bug.patch index 56963e80d3..1dd9abade5 100644 --- a/Spigot-Server-Patches/0164-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0163-Properly-fix-item-duplication-bug.patch @@ -1,4 +1,4 @@ -From 905fa22f222f8547b63412650bc2927850fa8382 Mon Sep 17 00:00:00 2001 +From 99549bbd0a129084cb529b8d7d5aa1b2cca756c8 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Tue, 27 Dec 2016 01:57:57 +0000 Subject: [PATCH] Properly fix item duplication bug @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cf2a39384..c91caf578 100644 +index 4bde378afb..7059fc1187 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1531,7 +1531,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1525,7 +1525,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,10 +19,10 @@ index cf2a39384..c91caf578 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1f2cfbc92..f26636e30 100644 +index 969e28c3b2..3885c8628c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2504,7 +2504,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2505,7 +2505,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } public final boolean isDisconnected() { diff --git a/Spigot-Server-Patches/0165-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0164-String-based-Action-Bar-API.patch similarity index 87% rename from Spigot-Server-Patches/0165-String-based-Action-Bar-API.patch rename to Spigot-Server-Patches/0164-String-based-Action-Bar-API.patch index 3a4684e68c..a15aabe5f4 100644 --- a/Spigot-Server-Patches/0165-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0164-String-based-Action-Bar-API.patch @@ -1,11 +1,11 @@ -From 470c28710bb1546fec26de9724cad439462497a7 Mon Sep 17 00:00:00 2001 +From f5962e81f2d63910e83d54400b0173879b453d57 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 15:02:42 -0500 Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index a4b0901cf..02940d697 100644 +index 70cdc3f102..381542e0d2 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,10 +1,13 @@ @@ -20,9 +20,9 @@ index a4b0901cf..02940d697 100644 +import javax.annotation.Nonnull; import javax.annotation.Nullable; - import java.util.concurrent.ExecutionException; - import java.util.concurrent.Executor; -@@ -17,6 +20,24 @@ public final class MCUtil { + import java.util.Queue; + import java.util.concurrent.CompletableFuture; +@@ -21,6 +24,24 @@ public final class MCUtil { private MCUtil() {} @@ -45,9 +45,9 @@ index a4b0901cf..02940d697 100644 + return ExceptionUtils.getFullStackTrace(new Throwable(str)); + } - /** - * Ensures the target code is running on the main thread -@@ -198,4 +219,13 @@ public final class MCUtil { + public static boolean isMainThread() { + return MinecraftServer.getServer().isMainThread(); +@@ -289,4 +310,13 @@ public final class MCUtil { } return null; } @@ -62,7 +62,7 @@ index a4b0901cf..02940d697 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7d4355439..1c8c364d3 100644 +index dea59d3fab..a546f3118e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -208,6 +208,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0166-Activation-Range-Improvements.patch b/Spigot-Server-Patches/0165-Activation-Range-Improvements.patch similarity index 96% rename from Spigot-Server-Patches/0166-Activation-Range-Improvements.patch rename to Spigot-Server-Patches/0165-Activation-Range-Improvements.patch index 3264336628..940b1b43c4 100644 --- a/Spigot-Server-Patches/0166-Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/0165-Activation-Range-Improvements.patch @@ -1,4 +1,4 @@ -From 527982777c9728d51edc763ccf27080487902c05 Mon Sep 17 00:00:00 2001 +From 571ec9d52c313314df1280403dd225517047839b Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 22:38:06 -0500 Subject: [PATCH] Activation Range Improvements @@ -6,7 +6,7 @@ Subject: [PATCH] Activation Range Improvements Fixes and adds new Immunities to improve gameplay behavior diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index e2e1095118..34dcd01ded 100644 +index b347567699..53b25dd805 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -18,7 +18,7 @@ index e2e1095118..34dcd01ded 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1bef317758..c1618f8c36 100644 +index 8dbff3c370..3da4bc356a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -74,7 +74,7 @@ public abstract class EntityLiving extends Entity { @@ -31,15 +31,15 @@ index 1bef317758..c1618f8c36 100644 protected int ticksFarFromPlayer; protected float aZ; diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 2698579603..864ca3cc6e 100644 +index bb86ecb2fb..5cd8c3f288 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java @@ -363,6 +363,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn return this.bR != null; } -+ public boolean inCaravan() { return this.em(); } // Paper - OBFHELPER - public boolean em() { ++ public boolean inCaravan() { return this.en(); } // Paper - OBFHELPER + public boolean en() { return this.bQ != null; } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java diff --git a/Spigot-Server-Patches/0167-Firework-API-s.patch b/Spigot-Server-Patches/0166-Firework-API-s.patch similarity index 96% rename from Spigot-Server-Patches/0167-Firework-API-s.patch rename to Spigot-Server-Patches/0166-Firework-API-s.patch index c6ab9a39c7..6b9f909308 100644 --- a/Spigot-Server-Patches/0167-Firework-API-s.patch +++ b/Spigot-Server-Patches/0166-Firework-API-s.patch @@ -1,11 +1,11 @@ -From 03ba9d6471507f90f994c073cb953104b14a9bf9 Mon Sep 17 00:00:00 2001 +From 9e4afcd7dd8a13723ed96074ecc3f71bef52f7d1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 01:18:33 -0500 Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 4c2cdd4bc..abf8799c4 100644 +index 6e2592e96d..f9332d3fda 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -53,7 +53,7 @@ index 4c2cdd4bc..abf8799c4 100644 public boolean bk() { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 7b1d51e5a..1493d0999 100644 +index 5eae1724ed..d4420e68fb 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -19,6 +19,7 @@ public class ItemFireworks extends Item { @@ -73,7 +73,7 @@ index 7b1d51e5a..1493d0999 100644 if (!entityhuman.abilities.canInstantlyBuild) { itemstack.subtract(1); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index e658816c2..0d69deb51 100644 +index e658816c24..0d69deb51c 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -108,7 +108,7 @@ public class NBTTagCompound implements NBTBase { @@ -86,7 +86,7 @@ index e658816c2..0d69deb51 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index 7b3b20682..b39e33f4f 100644 +index 7b3b206823..b39e33f4f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -1,6 +1,7 @@ diff --git a/Spigot-Server-Patches/0168-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0167-PlayerTeleportEndGatewayEvent.patch similarity index 92% rename from Spigot-Server-Patches/0168-PlayerTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0167-PlayerTeleportEndGatewayEvent.patch index 357eec5680..c4df78a8f8 100644 --- a/Spigot-Server-Patches/0168-PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0167-PlayerTeleportEndGatewayEvent.patch @@ -1,4 +1,4 @@ -From dcd26cf78eb1be638e65f503ec57c45ad15a6b0b Mon Sep 17 00:00:00 2001 +From e2f315dc84a82b3d7a612787b73136bcb502495e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 31 Dec 2016 21:44:50 -0500 Subject: [PATCH] PlayerTeleportEndGatewayEvent @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index bb9822799..c3d30dc94 100644 +index 9fd4ab6a7f..888bbd7a45 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -126,7 +126,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/0169-ShulkerBox-Dupe-Prevention.patch b/Spigot-Server-Patches/0168-ShulkerBox-Dupe-Prevention.patch similarity index 90% rename from Spigot-Server-Patches/0169-ShulkerBox-Dupe-Prevention.patch rename to Spigot-Server-Patches/0168-ShulkerBox-Dupe-Prevention.patch index 1464ff67b4..7928c2ed67 100644 --- a/Spigot-Server-Patches/0169-ShulkerBox-Dupe-Prevention.patch +++ b/Spigot-Server-Patches/0168-ShulkerBox-Dupe-Prevention.patch @@ -1,4 +1,4 @@ -From aad88b0533769c7d6b63acdd216dda85afc81ffc Mon Sep 17 00:00:00 2001 +From 14c4520470eb40961776f706ffb916db46f2128e Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 16:32:56 -0500 Subject: [PATCH] ShulkerBox Dupe Prevention @@ -7,7 +7,7 @@ This ensures that Shulker Boxes can never drop their contents twice, and that the inventory is cleared incase it some how also got saved to the world. diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java -index a823e7073..37ec634f6 100644 +index 82b4d82c0e..d00bd9d610 100644 --- a/src/main/java/net/minecraft/server/BlockShulkerBox.java +++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java @@ -100,6 +100,7 @@ public class BlockShulkerBox extends BlockTileEntity { diff --git a/Spigot-Server-Patches/0170-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0169-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 93% rename from Spigot-Server-Patches/0170-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-Server-Patches/0169-Provide-E-TE-Chunk-count-stat-methods.patch index fdae65a9ac..92908aaaa1 100644 --- a/Spigot-Server-Patches/0170-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0169-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From 7fd2743b54acb9d73497c60fac89f8c2ab7b783d Mon Sep 17 00:00:00 2001 +From fc7de1415a8052d3d1eb76f878c5bcd34258c9bb Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:24:46 -0500 Subject: [PATCH] Provide E/TE/Chunk count stat methods @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 90e260f3b..8b63192cf 100644 +index 90e260f3b3..8b63192cf9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -81,6 +81,29 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0171-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0170-Enforce-Sync-Player-Saves.patch similarity index 81% rename from Spigot-Server-Patches/0171-Enforce-Sync-Player-Saves.patch rename to Spigot-Server-Patches/0170-Enforce-Sync-Player-Saves.patch index e72a606c44..904a4a8ae0 100644 --- a/Spigot-Server-Patches/0171-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0170-Enforce-Sync-Player-Saves.patch @@ -1,4 +1,4 @@ -From 61d3c06b65d8a1032845bff14e2dbfc071cd9906 Mon Sep 17 00:00:00 2001 +From c8cb88449adba448d0c187dca5d998dd2f22a236 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:41:58 -0500 Subject: [PATCH] Enforce Sync Player Saves @@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3ee587014..fdbc01792 100644 +index 12f6812d67..c8b5a610aa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1227,6 +1227,7 @@ public abstract class PlayerList { +@@ -1220,6 +1220,7 @@ public abstract class PlayerList { } public void savePlayers(Integer interval) { @@ -18,7 +18,7 @@ index 3ee587014..fdbc01792 100644 long now = MinecraftServer.currentTick; MinecraftTimings.savePlayers.startTiming(); // Paper int numSaved = 0; // Paper -@@ -1238,6 +1239,7 @@ public abstract class PlayerList { +@@ -1231,6 +1232,7 @@ public abstract class PlayerList { } } MinecraftTimings.savePlayers.stopTiming(); // Paper diff --git a/Spigot-Server-Patches/0172-Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/0171-Enforce-Sync-Chunk-Unloads.patch similarity index 92% rename from Spigot-Server-Patches/0172-Enforce-Sync-Chunk-Unloads.patch rename to Spigot-Server-Patches/0171-Enforce-Sync-Chunk-Unloads.patch index 73e150c0d3..0ee1099acc 100644 --- a/Spigot-Server-Patches/0172-Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/0171-Enforce-Sync-Chunk-Unloads.patch @@ -1,4 +1,4 @@ -From 52a8c651983adc960cd9028d41fad58b1db2e468 Mon Sep 17 00:00:00 2001 +From 43dcb62043ee21ca98b65960606e890140287243 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 16:06:44 -0500 Subject: [PATCH] Enforce Sync Chunk Unloads @@ -7,7 +7,7 @@ Unloading Chunks async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8b63192cf..86848543d 100644 +index 8b63192cf9..86848543d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -224,6 +224,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0173-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0172-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 81% rename from Spigot-Server-Patches/0173-Don-t-allow-entities-to-ride-themselves-572.patch rename to Spigot-Server-Patches/0172-Don-t-allow-entities-to-ride-themselves-572.patch index 5a8283ed3b..c7ffe47b0a 100644 --- a/Spigot-Server-Patches/0173-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0172-Don-t-allow-entities-to-ride-themselves-572.patch @@ -1,14 +1,14 @@ -From 9998cb5e703231aa7a957c741909a28c120e59dd Mon Sep 17 00:00:00 2001 +From ff2027323bb780168321193a701b4328d3742544 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Sun, 8 Jan 2017 04:31:36 +0000 Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index eb2a693af..b47bf9738 100644 +index 167cbb2820..78b7b8be99 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2075,6 +2075,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2088,6 +2088,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } protected void o(Entity entity) { @@ -17,5 +17,5 @@ index eb2a693af..b47bf9738 100644 throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0174-Fix-block-break-desync.patch b/Spigot-Server-Patches/0173-Fix-block-break-desync.patch similarity index 90% rename from Spigot-Server-Patches/0174-Fix-block-break-desync.patch rename to Spigot-Server-Patches/0173-Fix-block-break-desync.patch index a8c3956c54..d63d4d442c 100644 --- a/Spigot-Server-Patches/0174-Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/0173-Fix-block-break-desync.patch @@ -1,11 +1,11 @@ -From 9d17fa0376681765789ccddcb32b0310bdf1ed67 Mon Sep 17 00:00:00 2001 +From e84c33f296ef5dda7c89380053e5609ea81c9736 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Sun, 8 Jan 2017 18:50:35 +1100 Subject: [PATCH] Fix block break desync diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f26636e30..aa93b5945 100644 +index 9ac86f7af2..62b7d86e17 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1145,6 +1145,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -18,5 +18,5 @@ index f26636e30..aa93b5945 100644 } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) { return; -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0175-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0174-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 96% rename from Spigot-Server-Patches/0175-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-Server-Patches/0174-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 38dec7c0b2..38ba496b74 100644 --- a/Spigot-Server-Patches/0175-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0174-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -1,4 +1,4 @@ -From b381115d1a60cf615a6bc13d874fd8bb29a02c1b Mon Sep 17 00:00:00 2001 +From b3d7ede96e1be472691ae42cdcd99ffdf7e672d9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:31:46 -0500 Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player @@ -8,10 +8,10 @@ Adds lots of information about why this orb exists. Replaces isFromBottle() with logic that persists entity reloads too. diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ff110c8e95..d95587c8cc 100644 +index 43feccef8f..e820bfbd56 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -473,13 +473,13 @@ public class Block implements IMaterial { +@@ -471,13 +471,13 @@ public class Block implements IMaterial { } } @@ -28,7 +28,7 @@ index ff110c8e95..d95587c8cc 100644 } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index e5f0645774..e237c5dc1a 100644 +index 131f8a5156..d8ab87e216 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -618,7 +618,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo @@ -120,7 +120,7 @@ index 3c888d6015..79d80596df 100644 public void d(EntityHuman entityhuman) { diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 7440e4a2a9..895254c155 100644 +index 1804a49de9..82e4d2eab6 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -467,7 +467,7 @@ public class EntityFishingHook extends Entity { @@ -131,9 +131,9 @@ index 7440e4a2a9..895254c155 100644 + this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper } // CraftBukkit end - if (itemstack1.getItem().a(TagsItem.G)) { + if (itemstack1.getItem().a(TagsItem.D)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c1618f8c36..9f493e43d4 100644 +index 3da4bc356a..f9a76ce27c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -353,7 +353,8 @@ public abstract class EntityLiving extends Entity { @@ -160,7 +160,7 @@ index a5e1939e05..e73dba09a6 100644 this.die(); diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index fc0c1cc3b2..dd4ecfa883 100644 +index e8fdf86250..b51543ea7a 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -411,7 +411,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { @@ -186,7 +186,7 @@ index 4a128f707b..b870964674 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 33b5080147..e34198e407 100644 +index f455317eb6..55e45f84ca 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -384,7 +384,7 @@ public class PlayerInteractManager { @@ -221,10 +221,10 @@ index 998662d9e6..6b4eb7f053 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 86848543d0..7004f11764 100644 +index 9cd991c3e7..b3756074b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1220,7 +1220,7 @@ public class CraftWorld implements World { +@@ -1216,7 +1216,7 @@ public class CraftWorld implements World { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new EntityTNTPrimed(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0176-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0175-Cap-Entity-Collisions.patch similarity index 86% rename from Spigot-Server-Patches/0176-Cap-Entity-Collisions.patch rename to Spigot-Server-Patches/0175-Cap-Entity-Collisions.patch index 94425ac9b2..476ff6d2b2 100644 --- a/Spigot-Server-Patches/0176-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0175-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From d778eb49ecc9e8d5cbfcc4b20f33d607fbc13b00 Mon Sep 17 00:00:00 2001 +From 24e6eede4853d38e743e99254a59a3d849df67bb Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jan 2017 18:07:56 -0500 Subject: [PATCH] Cap Entity Collisions @@ -12,10 +12,10 @@ 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 5df8b1143f..0b748d402b 100644 +index b95f259a9..4991138df 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -343,4 +343,10 @@ public class PaperWorldConfig { +@@ -344,4 +344,10 @@ public class PaperWorldConfig { log("Treasure Maps will return already discovered locations"); } } @@ -27,10 +27,10 @@ index 5df8b1143f..0b748d402b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b47bf97387..db7e37aee6 100644 +index 78b7b8be9..6db20aa75 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -168,6 +168,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; public boolean fromMobSpawner; @@ -39,10 +39,10 @@ index b47bf97387..db7e37aee6 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9f493e43d4..fc0e440798 100644 +index f9a76ce27..3b4867bfc 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2316,8 +2316,11 @@ public abstract class EntityLiving extends Entity { +@@ -2318,8 +2318,11 @@ public abstract class EntityLiving extends Entity { } } diff --git a/Spigot-Server-Patches/0177-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0176-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 96% rename from Spigot-Server-Patches/0177-Remove-CraftScheduler-Async-Task-Debugger.patch rename to Spigot-Server-Patches/0176-Remove-CraftScheduler-Async-Task-Debugger.patch index d7e015fc3f..f615dba082 100644 --- a/Spigot-Server-Patches/0177-Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/Spigot-Server-Patches/0176-Remove-CraftScheduler-Async-Task-Debugger.patch @@ -1,4 +1,4 @@ -From dac6c2c4e9dc1417cda683cf1ec54f22774da31c Mon Sep 17 00:00:00 2001 +From 41d4fcb5e9244eeb5cbd7da27dd7e9917b6b5ad6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 00:04:04 -0500 Subject: [PATCH] Remove CraftScheduler Async Task Debugger @@ -9,7 +9,7 @@ One report of a suspected memory leak with the system. This adds additional overhead to asynchronous task dispatching diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 26753fac5..a2fadaf82 100644 +index 26753fac5e..a2fadaf82c 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -84,8 +84,8 @@ public class CraftScheduler implements BukkitScheduler { @@ -58,5 +58,5 @@ index 26753fac5..a2fadaf82 100644 @Deprecated -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0178-Shame-on-you-Mojang.patch b/Spigot-Server-Patches/0177-Shame-on-you-Mojang.patch similarity index 91% rename from Spigot-Server-Patches/0178-Shame-on-you-Mojang.patch rename to Spigot-Server-Patches/0177-Shame-on-you-Mojang.patch index 11229e57c2..8cb01c0a48 100644 --- a/Spigot-Server-Patches/0178-Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/0177-Shame-on-you-Mojang.patch @@ -1,4 +1,4 @@ -From 17d230338982a4a23f4e00da04d055e05a6f884f Mon Sep 17 00:00:00 2001 +From a1b78315b821502b8462d4d2dab70bfb154ed863 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 19:17:28 -0500 Subject: [PATCH] Shame on you Mojang @@ -12,7 +12,7 @@ This then triggers async chunk loads! What in the hell were you thinking? diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java -index 1181d45fa..d081166d8 100644 +index 1181d45fad..d081166d86 100644 --- a/src/main/java/net/minecraft/server/BlockBeacon.java +++ b/src/main/java/net/minecraft/server/BlockBeacon.java @@ -49,7 +49,7 @@ public class BlockBeacon extends BlockTileEntity { @@ -34,5 +34,5 @@ index 1181d45fa..d081166d8 100644 } } -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0179-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0178-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch similarity index 85% rename from Spigot-Server-Patches/0179-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch rename to Spigot-Server-Patches/0178-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 26b90fc196..f64a690a22 100644 --- a/Spigot-Server-Patches/0179-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0178-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,14 +1,14 @@ -From 31b95b88c25e4b25cf7ef32ff4692d1bf937b679 Mon Sep 17 00:00:00 2001 +From 658b49a1c546172fd548a57b28ebc14b5f47ff54 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 7 Feb 2017 16:55:35 -0600 Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index ef35eb7ec..70790386e 100644 +index c96f1b2753..4973721243 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -328,7 +328,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -338,7 +338,7 @@ public class ChunkProviderServer implements IChunkProvider { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); @@ -18,5 +18,5 @@ index ef35eb7ec..70790386e 100644 LongIterator longiterator = this.unloadQueue.iterator(); -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0180-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0179-Do-not-let-armorstands-drown.patch similarity index 82% rename from Spigot-Server-Patches/0180-Do-not-let-armorstands-drown.patch rename to Spigot-Server-Patches/0179-Do-not-let-armorstands-drown.patch index 345adb220a..5b512424fe 100644 --- a/Spigot-Server-Patches/0180-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0179-Do-not-let-armorstands-drown.patch @@ -1,11 +1,11 @@ -From 0628af2631258500bd906bbaf21bcaca89c8de03 Mon Sep 17 00:00:00 2001 +From 224496958b947329bcbcf013a4f9492ba7f109d7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 18 Feb 2017 19:29:58 -0600 Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 52a1036fdb..26171b3430 100644 +index 578d966401..e9a746f138 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -764,5 +764,10 @@ public class EntityArmorStand extends EntityLiving { @@ -20,23 +20,23 @@ index 52a1036fdb..26171b3430 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index fc0e440798..38baecd862 100644 +index 3b4867bfc9..b596a616fe 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -201,6 +201,7 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag, iblockdata, blockposition); } -+ public boolean canBreatheUnderwater() { return this.bZ(); } // Paper - OBFHELPER - public boolean bZ() { ++ public boolean canBreatheUnderwater() { return this.ca(); } // Paper - OBFHELPER + public boolean ca() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -235,7 +236,7 @@ public abstract class EntityLiving extends Entity { if (this.isAlive()) { if (this.a(TagsFluid.a) && this.world.getType(new BlockPosition(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ)).getBlock() != Blocks.BUBBLE_COLUMN) { -- if (!this.bZ() && !MobEffectUtil.c(this) && !flag1) { -+ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER +- if (!this.ca() && !MobEffectUtil.c(this) && !flag1) { ++ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden this.setAirTicks(this.l(this.getAirTicks())); if (this.getAirTicks() == -20) { this.setAirTicks(0); diff --git a/Spigot-Server-Patches/0181-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0180-Properly-handle-async-calls-to-restart-the-server.patch similarity index 96% rename from Spigot-Server-Patches/0181-Properly-handle-async-calls-to-restart-the-server.patch rename to Spigot-Server-Patches/0180-Properly-handle-async-calls-to-restart-the-server.patch index 79ef83c306..a9ce3c73c2 100644 --- a/Spigot-Server-Patches/0181-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0180-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From b502589f3799987378d72bfd7fd843b6e888b490 Mon Sep 17 00:00:00 2001 +From 2290cb8d1859a89dc6b1a8e9a6783c76a782849b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 23:34:11 -0500 Subject: [PATCH] Properly handle async calls to restart the server @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f81ff5628..f679c6bc2 100644 +index c97953a2fd..8576545bb7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -85,6 +85,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -41,7 +41,7 @@ index f81ff5628..f679c6bc2 100644 private boolean isStopped; private int ticks; protected final Proxy d; -@@ -590,7 +591,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -635,7 +636,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati if (this.s != null) { MinecraftServer.LOGGER.info("Saving players"); this.s.savePlayers(); @@ -50,7 +50,7 @@ index f81ff5628..f679c6bc2 100644 try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets } -@@ -649,10 +650,18 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -694,10 +695,18 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati return this.isRunning; } @@ -69,7 +69,7 @@ index f81ff5628..f679c6bc2 100644 // Paper start - Further improve server tick loop private static final int TPS = 20; private static final long SEC_IN_NANO = 1000000000; -@@ -1607,6 +1616,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1667,6 +1676,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati return this.aa; } @@ -78,10 +78,10 @@ index f81ff5628..f679c6bc2 100644 return this.serverThread; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index fdbc01792..4c9ff8c29 100644 +index c8b5a610aa..0b0d996523 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1345,10 +1345,15 @@ public abstract class PlayerList { +@@ -1338,10 +1338,15 @@ public abstract class PlayerList { entityplayer.playerInteractManager.b(generatoraccess.getWorldData().getGameType()); } @@ -98,7 +98,7 @@ index fdbc01792..4c9ff8c29 100644 } // CraftBukkit end // Paper start - Remove collideRule team if it exists -@@ -1359,6 +1364,7 @@ public abstract class PlayerList { +@@ -1352,6 +1357,7 @@ public abstract class PlayerList { } // Paper end } @@ -107,7 +107,7 @@ index fdbc01792..4c9ff8c29 100644 // CraftBukkit start public void sendMessage(IChatBaseComponent[] iChatBaseComponents) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 947c43a5d..f15fd9f37 100644 +index 947c43a5d0..f15fd9f370 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -46,88 +46,123 @@ public class RestartCommand extends Command @@ -306,5 +306,5 @@ index 947c43a5d..f15fd9f37 100644 } } -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0182-Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/0181-Add-system-property-to-disable-book-size-limits.patch similarity index 96% rename from Spigot-Server-Patches/0182-Add-system-property-to-disable-book-size-limits.patch rename to Spigot-Server-Patches/0181-Add-system-property-to-disable-book-size-limits.patch index bb1c7a5888..b2354bb461 100644 --- a/Spigot-Server-Patches/0182-Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/0181-Add-system-property-to-disable-book-size-limits.patch @@ -1,4 +1,4 @@ -From 7212abfc785954f473b1ae2c683b2a87852d5b8a Mon Sep 17 00:00:00 2001 +From 58676fef1f3ff751dc347888740ef41c7407e0cd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 13 May 2017 20:11:21 -0500 Subject: [PATCH] Add system property to disable book size limits @@ -11,7 +11,7 @@ to make books with as much data as they want. Do not use this without limiting incoming data from packets in some other way. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 6ff1a2dcd..64a939952 100644 +index 6ff1a2dcd6..64a9399527 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -40,6 +40,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { @@ -57,5 +57,5 @@ index 6ff1a2dcd..64a939952 100644 } -- -2.17.1 +2.18.0 diff --git a/Spigot-Server-Patches/0183-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0182-Add-option-to-make-parrots-stay-on-shoulders-despite.patch similarity index 90% rename from Spigot-Server-Patches/0183-Add-option-to-make-parrots-stay-on-shoulders-despite.patch rename to Spigot-Server-Patches/0182-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 9d07be7581..9cd40da898 100644 --- a/Spigot-Server-Patches/0183-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0182-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -1,4 +1,4 @@ -From ae5ea9831fce8e583f76f7f39513e5ee4475b617 Mon Sep 17 00:00:00 2001 +From 9578efb4818e086eadd5b51ea7d33f5d2fb0afbf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 16 May 2017 21:29:08 -0500 Subject: [PATCH] Add option to make parrots stay on shoulders despite movement @@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0b748d402..99fe720e8 100644 +index 4991138dfe..87c599338a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -349,4 +349,10 @@ public class PaperWorldConfig { +@@ -350,4 +350,10 @@ public class PaperWorldConfig { maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); log( "Max Entity Collisions: " + maxCollisionsPerEntity ); } @@ -26,7 +26,7 @@ index 0b748d402..99fe720e8 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 83bfb6611..0486dee2c 100644 +index 06b663c4db..42c6249535 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -460,7 +460,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -39,10 +39,10 @@ index 83bfb6611..0486dee2c 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index aa93b5945..383ef87ba 100644 +index 08ef17dfe1..d4701d8d56 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1746,6 +1746,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1747,6 +1747,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { switch (packetplayinentityaction.c()) { case START_SNEAKING: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0184-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0183-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 84% rename from Spigot-Server-Patches/0184-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-Server-Patches/0183-Add-configuration-option-to-prevent-player-names-fro.patch index f1902243ad..223cb6610b 100644 --- a/Spigot-Server-Patches/0184-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0183-Add-configuration-option-to-prevent-player-names-fro.patch @@ -1,4 +1,4 @@ -From 7c1020f87381d93af07c2ac419e8780a643c7405 Mon Sep 17 00:00:00 2001 +From 3df55783b95d0434f69f9fb85cc4db2cb5e993ac Mon Sep 17 00:00:00 2001 From: kashike Date: Fri, 9 Jun 2017 07:24:34 -0700 Subject: [PATCH] Add configuration option to prevent player names from being @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ea6fcb39f..dbafef023 100644 +index 644e011017..329950802f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -271,4 +271,9 @@ public class PaperConfig { +@@ -275,4 +275,9 @@ public class PaperConfig { } removeInvalidStatistics = getBoolean("settings.remove-invalid-statistics", false); } @@ -20,10 +20,10 @@ index ea6fcb39f..dbafef023 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1b6a849e2..470e334f7 100644 +index 35b26d6128..8412e71d71 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2005,5 +2005,10 @@ public final class CraftServer implements Server { +@@ -1989,5 +1989,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0185-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0184-Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 95% rename from Spigot-Server-Patches/0185-Use-TerminalConsoleAppender-for-console-improvements.patch rename to Spigot-Server-Patches/0184-Use-TerminalConsoleAppender-for-console-improvements.patch index b1547310f6..b889a532bc 100644 --- a/Spigot-Server-Patches/0185-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0184-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -1,4 +1,4 @@ -From 280084302de32062c408e239b644dda5e1b24a83 Mon Sep 17 00:00:00 2001 +From c1dafcce6dd2f9cd431fd85a44036602e7013fbf Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 9 Jun 2017 19:03:43 +0200 Subject: [PATCH] Use TerminalConsoleAppender for console improvements @@ -19,10 +19,10 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 17bc80776..47cb2c036 100644 +index 09b4ddf199..47e307a246 100644 --- a/pom.xml +++ b/pom.xml -@@ -40,12 +40,6 @@ +@@ -39,12 +39,6 @@ ${minecraft.version}-SNAPSHOT compile @@ -35,7 +35,7 @@ index 17bc80776..47cb2c036 100644 org.ow2.asm asm -@@ -70,6 +64,32 @@ +@@ -69,6 +63,32 @@ 3.0.3 compile @@ -68,7 +68,7 @@ index 17bc80776..47cb2c036 100644 junit -@@ -203,10 +223,18 @@ +@@ -202,10 +222,18 @@ META-INF/services/java.sql.Driver @@ -89,7 +89,7 @@ index 17bc80776..47cb2c036 100644 org.apache.maven.plugins diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java new file mode 100644 -index 000000000..688b4715e +index 0000000000..688b4715eb --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java @@ -0,0 +1,40 @@ @@ -135,7 +135,7 @@ index 000000000..688b4715e +} diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java new file mode 100644 -index 000000000..685deaa0e +index 0000000000..685deaa0e5 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java @@ -0,0 +1,17 @@ @@ -157,7 +157,7 @@ index 000000000..685deaa0e + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index a3d58b5ce..681194e94 100644 +index bf1fffcfee..af430b73f0 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -79,6 +79,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -199,7 +199,7 @@ index a3d58b5ce..681194e94 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f679c6bc2..39a8b1d69 100644 +index db09d391ea..41ee97b1a4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -57,7 +57,6 @@ import org.apache.commons.lang3.Validate; @@ -210,16 +210,16 @@ index f679c6bc2..39a8b1d69 100644 import joptsimple.OptionSet; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.CraftServer; -@@ -142,7 +141,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -143,7 +142,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public OptionSet options; public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; - public ConsoleReader reader; + //public ConsoleReader reader; // Paper public static int currentTick = 0; // Paper - Further improve tick loop + public boolean serverAutoSave = false; // Paper public final Thread primaryThread; - public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); -@@ -183,7 +182,9 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -185,7 +184,9 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.ac.a((IResourcePackListener) this.al); // CraftBukkit start this.options = options; @@ -229,7 +229,7 @@ index f679c6bc2..39a8b1d69 100644 if (System.console() == null && System.getProperty("jline.terminal") == null) { System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); Main.useJline = false; -@@ -204,6 +205,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -206,6 +207,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati LOGGER.warn((String) null, ex); } } @@ -238,7 +238,7 @@ index f679c6bc2..39a8b1d69 100644 Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); this.serverThread = primaryThread = new Thread(this, "Server thread"); // Moved from main -@@ -804,7 +807,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -849,7 +852,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } finally { // CraftBukkit start - Restore terminal to original settings try { @@ -247,7 +247,7 @@ index f679c6bc2..39a8b1d69 100644 } catch (Exception ignored) { } // CraftBukkit end -@@ -1285,7 +1288,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1345,7 +1348,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } public void sendMessage(IChatBaseComponent ichatbasecomponent) { @@ -257,7 +257,7 @@ index f679c6bc2..39a8b1d69 100644 public KeyPair G() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4c9ff8c29..9e403d625 100644 +index 0b0d996523..4cbe148010 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -78,8 +78,7 @@ public abstract class PlayerList { @@ -271,7 +271,7 @@ index 4c9ff8c29..9e403d625 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 470e334f7..9fe7c6a0d 100644 +index 8412e71d71..47b4c01067 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -137,8 +137,8 @@ import java.nio.ByteBuffer; @@ -284,7 +284,7 @@ index 470e334f7..9fe7c6a0d 100644 import org.bukkit.NamespacedKey; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.block.data.CraftBlockData; -@@ -1141,9 +1141,13 @@ public final class CraftServer implements Server { +@@ -1124,9 +1124,13 @@ public final class CraftServer implements Server { return logger; } @@ -299,7 +299,7 @@ index 470e334f7..9fe7c6a0d 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index aad208f47..ac38028d7 100644 +index c552c624e5..3245fded9b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -14,7 +14,7 @@ import java.util.logging.Logger; @@ -311,7 +311,7 @@ index aad208f47..ac38028d7 100644 public class Main { public static boolean useJline = true; -@@ -176,6 +176,8 @@ public class Main { +@@ -178,6 +178,8 @@ public class Main { } try { @@ -320,7 +320,7 @@ index aad208f47..ac38028d7 100644 // This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals String jline_UnsupportedTerminal = new String(new char[] {'j','l','i','n','e','.','U','n','s','u','p','p','o','r','t','e','d','T','e','r','m','i','n','a','l'}); String jline_terminal = new String(new char[] {'j','l','i','n','e','.','t','e','r','m','i','n','a','l'}); -@@ -193,10 +195,18 @@ public class Main { +@@ -195,10 +197,18 @@ public class Main { // This ensures the terminal literal will always match the jline implementation System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName()); } @@ -341,7 +341,7 @@ index aad208f47..ac38028d7 100644 if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java deleted file mode 100644 -index 26a2fb894..000000000 +index 26a2fb8942..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java +++ /dev/null @@ -1,74 +0,0 @@ @@ -420,7 +420,7 @@ index 26a2fb894..000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 33e8ea02c..1e3aae3b8 100644 +index 33e8ea02c4..1e3aae3b8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -8,17 +8,27 @@ import java.util.logging.Level; @@ -499,7 +499,7 @@ index 33e8ea02c..1e3aae3b8 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index 984df4083..bbb5a84f3 100644 +index 984df4083d..bbb5a84f36 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -20,7 +20,7 @@ public class ServerShutdownThread extends Thread { @@ -513,7 +513,7 @@ index 984df4083..bbb5a84f3 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java deleted file mode 100644 -index b64097113..000000000 +index b640971130..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ /dev/null @@ -1,54 +0,0 @@ @@ -572,7 +572,7 @@ index b64097113..000000000 - } -} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 5cee8f00e..08b6bb7f9 100644 +index 5cee8f00ef..08b6bb7f97 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -1,12 +1,11 @@ diff --git a/Spigot-Server-Patches/0186-provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/0185-provide-a-configurable-option-to-disable-creeper-lin.patch similarity index 88% rename from Spigot-Server-Patches/0186-provide-a-configurable-option-to-disable-creeper-lin.patch rename to Spigot-Server-Patches/0185-provide-a-configurable-option-to-disable-creeper-lin.patch index 9bcf342695..e4c158e7e1 100644 --- a/Spigot-Server-Patches/0186-provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/0185-provide-a-configurable-option-to-disable-creeper-lin.patch @@ -1,4 +1,4 @@ -From bf87bdd3574f5c1a208ffe8ea73199994905069c Mon Sep 17 00:00:00 2001 +From 588438d85b874d5d68a5abfe77c3ab961e773eb9 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Jun 2017 21:01:18 +0100 Subject: [PATCH] provide a configurable option to disable creeper lingering @@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 99fe720e8..c80d84b9b 100644 +index 87c599338..23cb3feef 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -355,4 +355,10 @@ public class PaperWorldConfig { +@@ -356,4 +356,10 @@ public class PaperWorldConfig { parrotsHangOnBetter = getBoolean("parrots-are-unaffected-by-player-movement", false); log("Parrots are unaffected by player movement: " + parrotsHangOnBetter); } @@ -21,11 +21,11 @@ index 99fe720e8..c80d84b9b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index f286b6286..f37169d73 100644 +index 8b0134ecd..0147054df 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -214,7 +214,7 @@ public class EntityCreeper extends EntityMonster { - private void dF() { + private void dG() { Collection collection = this.getEffects(); - if (!collection.isEmpty()) { diff --git a/Spigot-Server-Patches/0187-Item-canEntityPickup.patch b/Spigot-Server-Patches/0186-Item-canEntityPickup.patch similarity index 92% rename from Spigot-Server-Patches/0187-Item-canEntityPickup.patch rename to Spigot-Server-Patches/0186-Item-canEntityPickup.patch index f26d366ba4..6b06b44ef1 100644 --- a/Spigot-Server-Patches/0187-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0186-Item-canEntityPickup.patch @@ -1,11 +1,11 @@ -From 11478e1b753667087f079de9c6aa568c7c40efd8 Mon Sep 17 00:00:00 2001 +From d59a01eaa5f962e8616dd5b2916f194ca8636432 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 5 May 2017 03:57:17 -0500 Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d29364b01..9dc86e90d 100644 +index 3723fd9770..14d122b22b 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -512,6 +512,11 @@ public abstract class EntityInsentient extends EntityLiving { @@ -21,7 +21,7 @@ index d29364b01..9dc86e90d 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 4af09f5cd..f2a4476c5 100644 +index 4af09f5cdb..f2a4476c5c 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -13,6 +13,7 @@ public class EntityItem extends Entity { @@ -33,7 +33,7 @@ index 4af09f5cd..f2a4476c5 100644 private UUID f; private UUID g; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index a17a537d6..1df17f09b 100644 +index a17a537d69..1df17f09bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -37,6 +37,16 @@ public class CraftItem extends CraftEntity implements Item { diff --git a/Spigot-Server-Patches/0188-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/0187-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 95% rename from Spigot-Server-Patches/0188-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-Server-Patches/0187-PlayerPickupItemEvent-setFlyAtPlayer.patch index 22c8b779a1..156f2e7b07 100644 --- a/Spigot-Server-Patches/0188-PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/Spigot-Server-Patches/0187-PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -1,11 +1,11 @@ -From 96319109ec641f4aca1b0267122c18112b42bf46 Mon Sep 17 00:00:00 2001 +From a7b7ab149feb1f3dca1cb24e0d88e43118021449 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 May 2017 06:26:09 -0500 Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index f2a4476c5..62d1c3d11 100644 +index f2a4476c5c..62d1c3d119 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -308,6 +308,7 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/0189-PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/0188-PlayerAttemptPickupItemEvent.patch similarity index 94% rename from Spigot-Server-Patches/0189-PlayerAttemptPickupItemEvent.patch rename to Spigot-Server-Patches/0188-PlayerAttemptPickupItemEvent.patch index d4086ff75d..1f7a657ec5 100644 --- a/Spigot-Server-Patches/0189-PlayerAttemptPickupItemEvent.patch +++ b/Spigot-Server-Patches/0188-PlayerAttemptPickupItemEvent.patch @@ -1,11 +1,11 @@ -From a245aa5dfbedac9d105b7d507a4d180ca22108f2 Mon Sep 17 00:00:00 2001 +From e7685d8e92926c91d7704389eedf46fd90446b3c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 11 Jun 2017 16:30:30 -0500 Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 62d1c3d11..d232bab74 100644 +index 62d1c3d119..d232bab745 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/0190-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0189-Add-UnknownCommandEvent.patch similarity index 89% rename from Spigot-Server-Patches/0190-Add-UnknownCommandEvent.patch rename to Spigot-Server-Patches/0189-Add-UnknownCommandEvent.patch index ca27bdfab7..9ed1dc72b3 100644 --- a/Spigot-Server-Patches/0190-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0189-Add-UnknownCommandEvent.patch @@ -1,11 +1,11 @@ -From be4afd9ab09714e4d71ad135da08502529867317 Mon Sep 17 00:00:00 2001 +From 43a73429e4e31a393e524f7b3068e54b6de79597 Mon Sep 17 00:00:00 2001 From: Sweepyoface Date: Sat, 17 Jun 2017 18:48:21 -0400 Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9fe7c6a0d..69cfe5c4d 100644 +index 47b4c01067..ca696b2417 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -79,6 +79,7 @@ import org.bukkit.craftbukkit.util.Versioning; @@ -16,7 +16,7 @@ index 9fe7c6a0d..69cfe5c4d 100644 import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; -@@ -720,7 +721,13 @@ public final class CraftServer implements Server { +@@ -721,7 +722,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/Spigot-Server-Patches/0191-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0190-Basic-PlayerProfile-API.patch similarity index 96% rename from Spigot-Server-Patches/0191-Basic-PlayerProfile-API.patch rename to Spigot-Server-Patches/0190-Basic-PlayerProfile-API.patch index 06663bfeb0..96a710c570 100644 --- a/Spigot-Server-Patches/0191-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0190-Basic-PlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 7e4b09409f3d9851a51215a840be880c73a0c7f1 Mon Sep 17 00:00:00 2001 +From d97b85a66563487e861582b8b2a54458c8425f09 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 15 Jan 2018 22:11:48 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 000000000..9ad5853de +index 0000000000..9ad5853de3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -0,0 +1,281 @@ @@ -294,7 +294,7 @@ index 000000000..9ad5853de +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java new file mode 100644 -index 000000000..25836b975 +index 0000000000..25836b975b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java @@ -0,0 +1,30 @@ @@ -330,7 +330,7 @@ index 000000000..25836b975 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java new file mode 100644 -index 000000000..3bcdb8f93 +index 0000000000..3bcdb8f93f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +1,17 @@ @@ -353,7 +353,7 @@ index 000000000..3bcdb8f93 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java new file mode 100644 -index 000000000..4b2a67423 +index 0000000000..4b2a67423f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -0,0 +1,29 @@ @@ -388,7 +388,7 @@ index 000000000..4b2a67423 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java new file mode 100644 -index 000000000..3aceb0ea8 +index 0000000000..3aceb0ea8a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java @@ -0,0 +1,11 @@ @@ -404,7 +404,7 @@ index 000000000..3aceb0ea8 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 02940d697..4539b5601 100644 +index 381542e0d2..80927de08b 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,6 +1,9 @@ @@ -417,7 +417,7 @@ index 02940d697..4539b5601 100644 import org.apache.commons.lang.exception.ExceptionUtils; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftWorld; -@@ -66,6 +69,10 @@ public final class MCUtil { +@@ -157,6 +160,10 @@ public final class MCUtil { return run.get(); } @@ -429,10 +429,10 @@ index 02940d697..4539b5601 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 39a8b1d69..4654e22c8 100644 +index 41ee97b1a4..8e72220f37 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1114,7 +1114,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1162,7 +1162,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati */ // CraftBukkit end String s1 = "."; // PAIL? @@ -441,7 +441,7 @@ index 39a8b1d69..4654e22c8 100644 MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); UserCache usercache = new UserCache(gameprofilerepository, new File(s1, MinecraftServer.a.getName())); -@@ -1562,6 +1562,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1622,6 +1622,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.G = i; } @@ -450,7 +450,7 @@ index 39a8b1d69..4654e22c8 100644 return this.V; } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index a47a51a41..4c476f757 100644 +index a47a51a412..4c476f757c 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -44,7 +44,7 @@ public class UserCache { @@ -486,10 +486,10 @@ index a47a51a41..4c476f757 100644 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 69cfe5c4d..0ef1186b9 100644 +index ca696b2417..213eb3f4aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -152,6 +152,10 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; +@@ -153,6 +153,10 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.event.server.TabCompleteEvent; import net.md_5.bungee.api.chat.BaseComponent; @@ -500,7 +500,7 @@ index 69cfe5c4d..0ef1186b9 100644 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2021,5 +2025,21 @@ public final class CraftServer implements Server { +@@ -2005,5 +2009,21 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0192-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0191-Shoulder-Entities-Release-API.patch similarity index 95% rename from Spigot-Server-Patches/0192-Shoulder-Entities-Release-API.patch rename to Spigot-Server-Patches/0191-Shoulder-Entities-Release-API.patch index ee25d0253d..ed7f5cc608 100644 --- a/Spigot-Server-Patches/0192-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0191-Shoulder-Entities-Release-API.patch @@ -1,11 +1,11 @@ -From 7c4e663b965bd364495f89ac6677c07779ddd659 Mon Sep 17 00:00:00 2001 +From a7caf052e8586f81c16f32cebf9ceb38ee599153 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 17 Jun 2017 15:18:30 -0400 Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 0486dee2c..f08c0ba60 100644 +index 42c6249535..b20cab58b1 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1819,21 +1819,48 @@ public abstract class EntityHuman extends EntityLiving { @@ -62,10 +62,10 @@ index 0486dee2c..f08c0ba60 100644 public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 073c8acf2..9e2fc4947 100644 +index d96c6afdb3..e06ac23852 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -445,6 +445,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -454,6 +454,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().a(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0193-Profile-Lookup-Events.patch b/Spigot-Server-Patches/0192-Profile-Lookup-Events.patch similarity index 97% rename from Spigot-Server-Patches/0193-Profile-Lookup-Events.patch rename to Spigot-Server-Patches/0192-Profile-Lookup-Events.patch index 6a6aaaf850..8db514e7c8 100644 --- a/Spigot-Server-Patches/0193-Profile-Lookup-Events.patch +++ b/Spigot-Server-Patches/0192-Profile-Lookup-Events.patch @@ -1,4 +1,4 @@ -From 1f1911f9fa39fa1662ea475f1d3cb3705fae9478 Mon Sep 17 00:00:00 2001 +From d1090b257a18d039d63dde81cca6bb2fb7a1dc2b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 17 Jun 2017 17:00:32 -0400 Subject: [PATCH] Profile Lookup Events @@ -7,7 +7,7 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p profiles that had to be looked up. diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -index 3bcdb8f93..bb9894318 100644 +index 3bcdb8f93f..bb9894318e 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -1,17 +1,68 @@ diff --git a/Spigot-Server-Patches/0194-Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/0193-Block-player-logins-during-server-shutdown.patch similarity index 88% rename from Spigot-Server-Patches/0194-Block-player-logins-during-server-shutdown.patch rename to Spigot-Server-Patches/0193-Block-player-logins-during-server-shutdown.patch index 93755a20f3..e21f236c02 100644 --- a/Spigot-Server-Patches/0194-Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/0193-Block-player-logins-during-server-shutdown.patch @@ -1,17 +1,17 @@ -From 147cea6aa1decfdcbf1f3d7fc2bca8f22fdaae5a Mon Sep 17 00:00:00 2001 +From a1e1fd273bd4c01c575f6cea31f72219187b536d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 2 Jul 2017 21:35:56 -0500 Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 89a11a496..bab13a4fd 100644 +index b6e8296824..85eff6e2dd 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -50,6 +50,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { } - public void X_() { + public void Y_() { + // Paper start - Do not allow logins while the server is shutting down + if (!MinecraftServer.getServer().isRunning()) { + this.disconnect(new ChatMessage(org.spigotmc.SpigotConfig.restartMessage)); diff --git a/Spigot-Server-Patches/0195-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0194-Entity-fromMobSpawner.patch similarity index 89% rename from Spigot-Server-Patches/0195-Entity-fromMobSpawner.patch rename to Spigot-Server-Patches/0194-Entity-fromMobSpawner.patch index 8cd57f47d3..ba26c2124d 100644 --- a/Spigot-Server-Patches/0195-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0194-Entity-fromMobSpawner.patch @@ -1,14 +1,14 @@ -From e199a3a50ef50a8cb6818a7b18871b3dfdac874c Mon Sep 17 00:00:00 2001 +From 337b86fc7de9fa7fa2cdd3f1af4d0b01577661e9 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 18 Jun 2017 18:17:05 -0500 Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index db7e37aee..cd1639e26 100644 +index f79295052a..034169140b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -168,6 +168,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; public boolean fromMobSpawner; @@ -16,7 +16,7 @@ index db7e37aee..cd1639e26 100644 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1658,6 +1659,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1667,6 +1668,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index db7e37aee..cd1639e26 100644 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1806,6 +1811,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1815,6 +1820,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } @@ -37,7 +37,7 @@ index db7e37aee..cd1639e26 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 61472a0eb..2b6b062c6 100644 +index 61472a0eb2..2b6b062c61 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -115,6 +115,7 @@ public abstract class MobSpawnerAbstract { @@ -49,7 +49,7 @@ index 61472a0eb..2b6b062c6 100644 if ( entity.world.spigotConfig.nerfSpawnerMobs ) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 03a3328b0..6d4dc539c 100644 +index 03a3328b06..6d4dc539cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -816,5 +816,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/0196-Fix-Anvil-Level-sync-to-client.patch b/Spigot-Server-Patches/0195-Fix-Anvil-Level-sync-to-client.patch similarity index 93% rename from Spigot-Server-Patches/0196-Fix-Anvil-Level-sync-to-client.patch rename to Spigot-Server-Patches/0195-Fix-Anvil-Level-sync-to-client.patch index 4207682cab..f0fc9c9f3a 100644 --- a/Spigot-Server-Patches/0196-Fix-Anvil-Level-sync-to-client.patch +++ b/Spigot-Server-Patches/0195-Fix-Anvil-Level-sync-to-client.patch @@ -1,4 +1,4 @@ -From 4a7821dd77549bcdfd5bde075bb5057dfe2ca86f Mon Sep 17 00:00:00 2001 +From dafadb7573dda165d077047126448e2806cb7f29 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 11 Jul 2017 23:17:57 -0400 Subject: [PATCH] Fix Anvil Level sync to client @@ -10,7 +10,7 @@ Was done incorrectly and is now causing level desyncs to client. Always send current level to the client, and instead make setWindowProperty set the level. diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java -index 845ec2250..c252ff6d5 100644 +index 229f4f8829..fb3413d81e 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -377,9 +377,9 @@ public class ContainerAnvil extends Container { @@ -26,7 +26,7 @@ index 845ec2250..c252ff6d5 100644 this.lastLevelCost = this.levelCost; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1c8c364d3..019fd4b48 100644 +index a546f3118e..8686457e13 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1378,6 +1378,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0197-Add-missing-coverages-for-getTileEntity-in-order-to-.patch b/Spigot-Server-Patches/0196-Add-missing-coverages-for-getTileEntity-in-order-to-.patch similarity index 90% rename from Spigot-Server-Patches/0197-Add-missing-coverages-for-getTileEntity-in-order-to-.patch rename to Spigot-Server-Patches/0196-Add-missing-coverages-for-getTileEntity-in-order-to-.patch index ee80c26c4d..bda1f660e0 100644 --- a/Spigot-Server-Patches/0197-Add-missing-coverages-for-getTileEntity-in-order-to-.patch +++ b/Spigot-Server-Patches/0196-Add-missing-coverages-for-getTileEntity-in-order-to-.patch @@ -1,4 +1,4 @@ -From 4ecc569661a1bba81809d640be36e55f827e6fe4 Mon Sep 17 00:00:00 2001 +From 6abcfc52f3b1140bf55d775ef2083c3bc17c0797 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 22 Jul 2017 15:22:59 +0100 Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e766e2536..c5da2cde3 100644 +index 8f6ce6bf1a..5d5f6f6328 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -234,6 +234,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0198-Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/0197-Improve-the-Saddle-API-for-Horses.patch similarity index 94% rename from Spigot-Server-Patches/0198-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-Server-Patches/0197-Improve-the-Saddle-API-for-Horses.patch index b62df91004..8fed37f46f 100644 --- a/Spigot-Server-Patches/0198-Improve-the-Saddle-API-for-Horses.patch +++ b/Spigot-Server-Patches/0197-Improve-the-Saddle-API-for-Horses.patch @@ -1,4 +1,4 @@ -From d5fae2a8f82bdf07f4d23afeb78e13d26180b350 Mon Sep 17 00:00:00 2001 +From 8e0eed18f7b4b54add9bdf23b0ecad8b38cc77c5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 10 Dec 2016 16:24:06 -0500 Subject: [PATCH] Improve the Saddle API for Horses @@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa and access their saddle state separately from an interface shared with Armor. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 14d041680..e56bef334 100644 +index 14d0416802..e56bef3340 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract; @@ -27,7 +27,7 @@ index 14d041680..e56bef334 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java -index 173818e68..2f6852404 100644 +index 173818e682..2f68524049 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java @@ -4,7 +4,7 @@ import net.minecraft.server.IInventory; @@ -41,7 +41,7 @@ index 173818e68..2f6852404 100644 super(inventory); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java new file mode 100644 -index 000000000..99cfbaf90 +index 0000000000..99cfbaf90b --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java @@ -0,0 +1,15 @@ diff --git a/Spigot-Server-Patches/0199-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0198-Implement-ensureServerConversions-API.patch similarity index 86% rename from Spigot-Server-Patches/0199-Implement-ensureServerConversions-API.patch rename to Spigot-Server-Patches/0198-Implement-ensureServerConversions-API.patch index 4b544f3521..d3327ad920 100644 --- a/Spigot-Server-Patches/0199-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0198-Implement-ensureServerConversions-API.patch @@ -1,4 +1,4 @@ -From 4d681ce123b48ae324efb5883474c0c4317d4328 Mon Sep 17 00:00:00 2001 +From 27d25274373a6f4533ce86ef73351e049c0f127b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 22:43:12 -0400 Subject: [PATCH] Implement ensureServerConversions API @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 59d2685dc..27a264f54 100644 +index 0fb3c238a..e98e1ed72 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -288,4 +288,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -287,4 +287,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0200-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0199-Implement-getI18NDisplayName.patch similarity index 88% rename from Spigot-Server-Patches/0200-Implement-getI18NDisplayName.patch rename to Spigot-Server-Patches/0199-Implement-getI18NDisplayName.patch index 3bf83cad58..45e40b8c1a 100644 --- a/Spigot-Server-Patches/0200-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0199-Implement-getI18NDisplayName.patch @@ -1,4 +1,4 @@ -From 2a4dd5bde33fc980cfb0b74f7330461f74bea81d Mon Sep 17 00:00:00 2001 +From 570da01a74b273d367daa8ffbd4e4c38ed323aee Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 23:59:38 -0400 Subject: [PATCH] Implement getI18NDisplayName @@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 27a264f54..1cdbdf6d0 100644 +index e98e1ed72..1df2b463a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -293,5 +293,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -292,5 +292,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0201-GH-806-Respect-saving-disabled-before-unloading-all-.patch b/Spigot-Server-Patches/0200-GH-806-Respect-saving-disabled-before-unloading-all-.patch similarity index 91% rename from Spigot-Server-Patches/0201-GH-806-Respect-saving-disabled-before-unloading-all-.patch rename to Spigot-Server-Patches/0200-GH-806-Respect-saving-disabled-before-unloading-all-.patch index 4d39493b3c..652f58925e 100644 --- a/Spigot-Server-Patches/0201-GH-806-Respect-saving-disabled-before-unloading-all-.patch +++ b/Spigot-Server-Patches/0200-GH-806-Respect-saving-disabled-before-unloading-all-.patch @@ -1,4 +1,4 @@ -From d8b44f39e8fefbad27e051d8d8ad1b52d687409e Mon Sep 17 00:00:00 2001 +From f7d2dff64466b07794f828ff7f3f0e9d632a2a07 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Jul 2017 00:06:43 -0400 Subject: [PATCH] GH-806: Respect saving disabled before unloading all chunks @@ -9,7 +9,7 @@ This behavior causes a save to occur even though saving was supposed to be turne It's triggered when Hell/End worlds are empty of players. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cf5c76a78..bfe2d03a5 100644 +index cf5c76a78e..bfe2d03a57 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -194,7 +194,7 @@ public class PlayerChunkMap { diff --git a/Spigot-Server-Patches/0202-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0201-ProfileWhitelistVerifyEvent.patch similarity index 94% rename from Spigot-Server-Patches/0202-ProfileWhitelistVerifyEvent.patch rename to Spigot-Server-Patches/0201-ProfileWhitelistVerifyEvent.patch index 5edff7a999..c1c11f4c8c 100644 --- a/Spigot-Server-Patches/0202-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0201-ProfileWhitelistVerifyEvent.patch @@ -1,11 +1,11 @@ -From 29abeacb899601637af19e18457fff1ba671f470 Mon Sep 17 00:00:00 2001 +From dab3a07d152b33b5d5751aa2ea340d5f365c8a86 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 3 Jul 2017 18:11:10 -0500 Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9e403d625..879780c5b 100644 +index 4cbe148010..45e42e9989 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,9 +543,9 @@ public abstract class PlayerList { @@ -20,7 +20,7 @@ index 9e403d625..879780c5b 100644 } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); -@@ -1184,9 +1184,25 @@ public abstract class PlayerList { +@@ -1177,9 +1177,25 @@ public abstract class PlayerList { this.server.getCommandDispatcher().a(entityplayer); } diff --git a/Spigot-Server-Patches/0203-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0202-Fix-this-stupid-bullshit.patch similarity index 91% rename from Spigot-Server-Patches/0203-Fix-this-stupid-bullshit.patch rename to Spigot-Server-Patches/0202-Fix-this-stupid-bullshit.patch index 074d34b953..189d4d0c10 100644 --- a/Spigot-Server-Patches/0203-Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/0202-Fix-this-stupid-bullshit.patch @@ -1,4 +1,4 @@ -From 65acab73c8ed9963f274dd34e30d183069604441 Mon Sep 17 00:00:00 2001 +From 24d03637c3ce3f7c0c5268c5516e90c1f3c6d4fa Mon Sep 17 00:00:00 2001 From: DemonWav Date: Sun, 6 Aug 2017 17:17:53 -0500 Subject: [PATCH] Fix this stupid bullshit @@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ac38028d7..ad0635925 100644 +index 3245fded9b..d4f6e009e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -215,10 +215,12 @@ public class Main { +@@ -217,10 +217,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { diff --git a/Spigot-Server-Patches/0204-Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/0203-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 89% rename from Spigot-Server-Patches/0204-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to Spigot-Server-Patches/0203-Ocelot-despawns-should-honor-nametags-and-leash.patch index 9079618866..ffa130547e 100644 --- a/Spigot-Server-Patches/0204-Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/0203-Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -1,11 +1,11 @@ -From 0b24486b1491cb7f560baf2b753fcbc4111369fe Mon Sep 17 00:00:00 2001 +From 25b46dccb550d0d2f16157b10a9da455ae7e8d43 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:54:40 -0500 Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index 6ea276aa0..720e7bbf9 100644 +index 4e132eabb1..c28b72222e 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -61,7 +61,7 @@ public class EntityOcelot extends EntityTameableAnimal { diff --git a/Spigot-Server-Patches/0205-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/0204-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 92% rename from Spigot-Server-Patches/0205-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to Spigot-Server-Patches/0204-Reset-spawner-timer-when-spawner-event-is-cancelled.patch index e9e25e798e..fbca4658dd 100644 --- a/Spigot-Server-Patches/0205-Reset-spawner-timer-when-spawner-event-is-cancelled.patch +++ b/Spigot-Server-Patches/0204-Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -1,11 +1,11 @@ -From e175a2606aa41ccdd34359e8ed80506380c74ae1 Mon Sep 17 00:00:00 2001 +From f43818ecbd951f93007a6112564c338f7aa42db7 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:45:19 -0500 Subject: [PATCH] Reset spawner timer when spawner event is cancelled diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 2b6b062c6..c76dbe74a 100644 +index 2b6b062c61..c76dbe74ac 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -121,6 +121,9 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/0206-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0205-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 92% rename from Spigot-Server-Patches/0206-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to Spigot-Server-Patches/0205-Fix-MC-117075-TE-Unload-Lag-Spike.patch index b65cd4600c..3c0d1cf7f1 100644 --- a/Spigot-Server-Patches/0206-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0205-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -1,11 +1,11 @@ -From 17637d37ab1940aa043270746f079f79afaca09e Mon Sep 17 00:00:00 2001 +From c8e4e8aa0b920806ef94772fdfb9d803b31ff748 Mon Sep 17 00:00:00 2001 From: mezz Date: Wed, 9 Aug 2017 17:51:22 -0500 Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ca7c23f54..d0ce6b363 100644 +index 92070c9325..2f9aa10f85 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1275,7 +1275,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0207-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0206-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 90% rename from Spigot-Server-Patches/0207-Allow-specifying-a-custom-authentication-servers-dow.patch rename to Spigot-Server-Patches/0206-Allow-specifying-a-custom-authentication-servers-dow.patch index 0929a5195f..8204ff50cb 100644 --- a/Spigot-Server-Patches/0207-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0206-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -1,4 +1,4 @@ -From 0dcddd2985a9c7a7b64d4c84c900b84c4929bcfb Mon Sep 17 00:00:00 2001 +From 2b552c360f4a543cadc543d179f25a88f4ccd3e7 Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 17 Aug 2017 16:08:20 -0700 Subject: [PATCH] Allow specifying a custom "authentication servers down" kick @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index dbafef023..ec89ecfca 100644 +index 329950802f..7a2c703022 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -16,7 +16,7 @@ index dbafef023..ec89ecfca 100644 import com.google.common.base.Throwables; import java.io.File; -@@ -276,4 +277,9 @@ public class PaperConfig { +@@ -280,4 +281,9 @@ public class PaperConfig { private static void suggestPlayersWhenNull() { suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions); } @@ -27,10 +27,10 @@ index dbafef023..ec89ecfca 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index bab13a4fd..d0e719f44 100644 +index 005efbc111..6249b0e686 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -241,6 +241,10 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -240,6 +240,10 @@ public class LoginListener implements PacketLoginInListener, ITickable { LoginListener.this.i = LoginListener.this.a(gameprofile); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else { diff --git a/Spigot-Server-Patches/0208-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0207-LivingEntity-setKiller.patch similarity index 87% rename from Spigot-Server-Patches/0208-LivingEntity-setKiller.patch rename to Spigot-Server-Patches/0207-LivingEntity-setKiller.patch index 747f524ab0..2d468a9c77 100644 --- a/Spigot-Server-Patches/0208-LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/0207-LivingEntity-setKiller.patch @@ -1,14 +1,14 @@ -From 2ad5b2c13862575d1cf7a73a68e117b5729be51f Mon Sep 17 00:00:00 2001 +From dbe597643719f35822ae46e6e32feb03333214b3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:49:48 -0500 Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 506d0d4e48..460a050cce 100644 +index b25ce0c58f..71b9b45f10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -255,6 +255,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -253,6 +253,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity(); } diff --git a/Spigot-Server-Patches/0209-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0208-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch similarity index 92% rename from Spigot-Server-Patches/0209-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch rename to Spigot-Server-Patches/0208-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 6d1d4a7fcd..527e292b31 100644 --- a/Spigot-Server-Patches/0209-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/0208-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -1,4 +1,4 @@ -From 85d40c5071b3c70477b3dfbb204207f97904c8d3 Mon Sep 17 00:00:00 2001 +From bbc9db021b60dd6257e0efc1acb190c28f0a023c Mon Sep 17 00:00:00 2001 From: Minecrell Date: Mon, 18 Sep 2017 12:00:03 +0200 Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger @@ -12,10 +12,10 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index f2c7d2ba8b..fa6c3702a7 100644 +index 47e307a246..a93ed45df9 100644 --- a/pom.xml +++ b/pom.xml -@@ -90,6 +90,13 @@ +@@ -89,6 +89,13 @@ runtime @@ -30,7 +30,7 @@ index f2c7d2ba8b..fa6c3702a7 100644 junit diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 681194e94f..927cbeedcd 100644 +index af430b73f0..8c76300185 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -131,8 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0210-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0209-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 93% rename from Spigot-Server-Patches/0210-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to Spigot-Server-Patches/0209-Handle-plugin-prefixes-using-Log4J-configuration.patch index 344e696fb9..3942f1a3c4 100644 --- a/Spigot-Server-Patches/0210-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/0209-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -1,4 +1,4 @@ -From 3b947e0656877c19c211ce7680e3937ae5dea267 Mon Sep 17 00:00:00 2001 +From 0cb27d53aa22f145a8515ee04760f587a64dc4bf Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:14:55 +0200 Subject: [PATCH] Handle plugin prefixes using Log4J configuration @@ -15,10 +15,10 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index 9d2473317..eb2cdf129 100644 +index a93ed45df9..bb32cb749d 100644 --- a/pom.xml +++ b/pom.xml -@@ -87,7 +87,7 @@ +@@ -86,7 +86,7 @@ org.apache.logging.log4j log4j-core 2.8.1 @@ -28,10 +28,10 @@ index 9d2473317..eb2cdf129 100644 diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9a1ffed07..b39096f04 100644 +index ffbb1e894a..7f3543970f 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -286,7 +286,7 @@ public class SpigotConfig +@@ -292,7 +292,7 @@ public class SpigotConfig private static void playerSample() { playerSample = getInt( "settings.sample-count", 12 ); @@ -41,7 +41,7 @@ index 9a1ffed07..b39096f04 100644 public static int playerShuffle; diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 08b6bb7f9..9f8334376 100644 +index 08b6bb7f97..9f8334376f 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -2,10 +2,22 @@ diff --git a/Spigot-Server-Patches/0211-Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/0210-Include-Log4J2-SLF4J-implementation.patch similarity index 84% rename from Spigot-Server-Patches/0211-Include-Log4J2-SLF4J-implementation.patch rename to Spigot-Server-Patches/0210-Include-Log4J2-SLF4J-implementation.patch index 9f1d8cf8c7..86ca74b568 100644 --- a/Spigot-Server-Patches/0211-Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/0210-Include-Log4J2-SLF4J-implementation.patch @@ -1,14 +1,14 @@ -From edb75eca4cd2549499d4475155065a2e73d4b9c0 Mon Sep 17 00:00:00 2001 +From a56190cc108317d133af9fa00a0e7ed0ad0ae60e Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:33:35 +0200 Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index eb2cdf129..353a5560e 100644 +index bb32cb749d..a319cfe3b8 100644 --- a/pom.xml +++ b/pom.xml -@@ -91,6 +91,12 @@ +@@ -90,6 +90,12 @@ diff --git a/Spigot-Server-Patches/0212-Disable-logger-prefix-for-various-plugins-bypassing-.patch b/Spigot-Server-Patches/0211-Disable-logger-prefix-for-various-plugins-bypassing-.patch similarity index 95% rename from Spigot-Server-Patches/0212-Disable-logger-prefix-for-various-plugins-bypassing-.patch rename to Spigot-Server-Patches/0211-Disable-logger-prefix-for-various-plugins-bypassing-.patch index e84d0ea243..f39b34a294 100644 --- a/Spigot-Server-Patches/0212-Disable-logger-prefix-for-various-plugins-bypassing-.patch +++ b/Spigot-Server-Patches/0211-Disable-logger-prefix-for-various-plugins-bypassing-.patch @@ -1,4 +1,4 @@ -From f0482df655443d55ca6c3af38ad3fdc16e60273b Mon Sep 17 00:00:00 2001 +From 302c4c748fcecce67136bb6784edec39bed38d40 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Sat, 23 Sep 2017 21:07:20 +0200 Subject: [PATCH] Disable logger prefix for various plugins bypassing the @@ -11,7 +11,7 @@ log. Disable the logger prefix for these plugins so the messages show up correctly. diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 9f8334376..6711e6dff 100644 +index 9f8334376f..6711e6dff9 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -5,7 +5,8 @@ diff --git a/Spigot-Server-Patches/0213-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0212-Add-PlayerJumpEvent.patch similarity index 92% rename from Spigot-Server-Patches/0213-Add-PlayerJumpEvent.patch rename to Spigot-Server-Patches/0212-Add-PlayerJumpEvent.patch index 70a5eb21b1..840a5ff83a 100644 --- a/Spigot-Server-Patches/0213-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0212-Add-PlayerJumpEvent.patch @@ -1,23 +1,23 @@ -From dd4f541fca1b685e85db063ff2813f6d552cb262 Mon Sep 17 00:00:00 2001 +From 79fc93dd4ff1dd0556c676f32dcd539d6e2104b1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 28 Sep 2017 17:21:44 -0400 Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index f08c0ba60..1b944abea 100644 +index b20cab58b1..1bfe9d0e7a 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1460,6 +1460,7 @@ public abstract class EntityHuman extends EntityLiving { return 0; } -+ public void jump() { this.cG(); } // Paper - OBFHELPER - public void cG() { - super.cG(); ++ public void jump() { this.cH(); } // Paper - OBFHELPER + public void cH() { + super.cH(); this.a(StatisticList.JUMP); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 383ef87ba..480b93aa0 100644 +index 932eeb19db..7465c548af 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -57,6 +57,8 @@ import org.bukkit.inventory.CraftingInventory; @@ -33,7 +33,7 @@ index 383ef87ba..480b93aa0 100644 d8 = d5 - this.p; d9 = d6 - this.q; if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { -- this.player.cG(); +- this.player.cH(); + // Paper start - Add player jump event + Player player = this.getPlayer(); + Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location. diff --git a/Spigot-Server-Patches/0214-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0213-handle-PacketPlayInKeepAlive-async.patch similarity index 92% rename from Spigot-Server-Patches/0214-handle-PacketPlayInKeepAlive-async.patch rename to Spigot-Server-Patches/0213-handle-PacketPlayInKeepAlive-async.patch index 16314c9032..6aa086ba5d 100644 --- a/Spigot-Server-Patches/0214-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0213-handle-PacketPlayInKeepAlive-async.patch @@ -1,4 +1,4 @@ -From 05eb39bf369cc2a0267af54bead833e5fccfec1e Mon Sep 17 00:00:00 2001 +From f2b3ec9db7d748b5dc17a7e00a91145efbb5fd0b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 5 Oct 2017 01:54:07 +0100 Subject: [PATCH] handle PacketPlayInKeepAlive async @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 480b93aa0..9f7443ef0 100644 +index c1dd2db89d..e8f1883c98 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2470,14 +2470,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2471,14 +2471,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/Spigot-Server-Patches/0215-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0214-Expose-client-protocol-version-and-virtual-host.patch similarity index 95% rename from Spigot-Server-Patches/0215-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-Server-Patches/0214-Expose-client-protocol-version-and-virtual-host.patch index 7070c28631..7583ac8b15 100644 --- a/Spigot-Server-Patches/0215-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0214-Expose-client-protocol-version-and-virtual-host.patch @@ -1,4 +1,4 @@ -From 3541b3881a5ed15147bc2f89d8802dd32b52249b Mon Sep 17 00:00:00 2001 +From 27ae3854b22a9da1824e3adad67c0d1a94b52be4 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 10 Oct 2017 18:45:20 +0200 Subject: [PATCH] Expose client protocol version and virtual host @@ -6,7 +6,7 @@ Subject: [PATCH] Expose client protocol version and virtual host diff --git a/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java new file mode 100644 -index 000000000..5caca6439 +index 0000000000..5caca6439d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java @@ -0,0 +1,50 @@ @@ -61,7 +61,7 @@ index 000000000..5caca6439 + +} diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 088ec198e..bc34cd687 100644 +index 2d57bdf40e..816210fb91 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -15,6 +15,7 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -84,7 +84,7 @@ index 088ec198e..bc34cd687 100644 public void a(IChatBaseComponent ichatbasecomponent) {} diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 5b0d83a1d..424464d09 100644 +index 0afaea8109..61f9eb3e64 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -63,6 +63,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -99,7 +99,7 @@ index 5b0d83a1d..424464d09 100644 public NetworkManager(EnumProtocolDirection enumprotocoldirection) { this.h = enumprotocoldirection; diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java -index 7acdac55e..f1a3be69d 100644 +index 7acdac55e5..f1a3be69d0 100644 --- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java +++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java @@ -33,6 +33,7 @@ public class PacketHandshakingInSetProtocol implements Packet Date: Sun, 15 Oct 2017 00:29:07 +0100 Subject: [PATCH] revert serverside behavior of keepalives @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9f7443ef0..7e96c4eb4 100644 +index add29081d2..cb9f25e961 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -69,7 +69,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/0217-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch b/Spigot-Server-Patches/0216-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch similarity index 92% rename from Spigot-Server-Patches/0217-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch rename to Spigot-Server-Patches/0216-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch index 8e6b230f73..22538c69ad 100644 --- a/Spigot-Server-Patches/0217-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch +++ b/Spigot-Server-Patches/0216-Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch @@ -1,4 +1,4 @@ -From 02485329579ce13c80b522e35a9dbf9602e0d82e Mon Sep 17 00:00:00 2001 +From b088e781bdb0c1f995db5e4865791f7aeb6c401e Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Fri, 20 Oct 2017 04:33:45 +0200 Subject: [PATCH] Replace HashSet with fastutil's ObjectOpenHashSet in @@ -13,7 +13,7 @@ ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickList Fixes https://github.com/PaperMC/Paper/issues/588 diff --git a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java -index 80a5c29f3..cd864c404 100644 +index 80a5c29f3b..cd864c4047 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java +++ b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java @@ -8,7 +8,7 @@ import java.util.TreeSet; diff --git a/Spigot-Server-Patches/0218-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0217-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 97% rename from Spigot-Server-Patches/0218-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to Spigot-Server-Patches/0217-Send-attack-SoundEffects-only-to-players-who-can-see.patch index c4ec08e7d0..f44056311a 100644 --- a/Spigot-Server-Patches/0218-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0217-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -1,4 +1,4 @@ -From 6ded5c4dfe33c7a2da270fb889d550c0f89afcc2 Mon Sep 17 00:00:00 2001 +From e18095189bb47d3aa275a03f012007f493105b05 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 31 Oct 2017 03:26:18 +0100 Subject: [PATCH] Send attack SoundEffects only to players who can see the @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1b944abea..ae4dd621d 100644 +index 1bfe9d0e7a..cd3e021a09 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -981,6 +981,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -40,7 +40,7 @@ index 1b944abea..ae4dd621d 100644 - this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.bV(), 1.0F, 1.0F); + sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.bV(), 1.0F, 1.0F); // Paper - send while respecting visibility - this.dk(); + this.dl(); } @@ -1113,15 +1122,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -72,7 +72,7 @@ index 1b944abea..ae4dd621d 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d0ce6b363..56292fad9 100644 +index 2f9aa10f85..2904a845b1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -916,6 +916,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0219-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0218-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 93% rename from Spigot-Server-Patches/0219-Option-for-maximum-exp-value-when-merging-orbs.patch rename to Spigot-Server-Patches/0218-Option-for-maximum-exp-value-when-merging-orbs.patch index c6c966b6f3..4862f08671 100644 --- a/Spigot-Server-Patches/0219-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0218-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -1,14 +1,14 @@ -From 15caeb73f605a58c3988eba2faba786ec1de8850 Mon Sep 17 00:00:00 2001 +From 07b380c41787410463243cd3b4610603b2f93945 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 10 Nov 2017 23:03:12 -0500 Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c80d84b9b..605e84173 100644 +index 23cb3feef..1c642e636 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -361,4 +361,10 @@ public class PaperWorldConfig { +@@ -362,4 +362,10 @@ public class PaperWorldConfig { disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false); log("Creeper lingering effect: " + disableCreeperLingeringEffect); } @@ -20,7 +20,7 @@ index c80d84b9b..605e84173 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 56292fad9..d5c509733 100644 +index 2904a845b..142b6cc03 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -994,16 +994,30 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0220-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0219-Add-PlayerArmorChangeEvent.patch similarity index 93% rename from Spigot-Server-Patches/0220-Add-PlayerArmorChangeEvent.patch rename to Spigot-Server-Patches/0219-Add-PlayerArmorChangeEvent.patch index 61455b7f6c..6646042213 100644 --- a/Spigot-Server-Patches/0220-Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/0219-Add-PlayerArmorChangeEvent.patch @@ -1,11 +1,11 @@ -From c181940c4734bff813360c6c3109e3c680107d55 Mon Sep 17 00:00:00 2001 +From 28232f54f42a2be1d450bb346630809b76fbf87f Mon Sep 17 00:00:00 2001 From: pkt77 Date: Fri, 10 Nov 2017 23:46:34 -0500 Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 38baecd862..2f325f695e 100644 +index b596a616fe..999a02cad3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index 38baecd862..2f325f695e 100644 import com.google.common.base.Objects; import com.google.common.collect.Maps; import java.util.Collection; -@@ -2045,6 +2046,13 @@ public abstract class EntityLiving extends Entity { +@@ -2047,6 +2048,13 @@ public abstract class EntityLiving extends Entity { ItemStack itemstack1 = this.getEquipment(enumitemslot); if (!ItemStack.matches(itemstack1, itemstack)) { diff --git a/Spigot-Server-Patches/0221-Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/0220-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 91% rename from Spigot-Server-Patches/0221-Prevent-logins-from-being-processed-when-the-player-.patch rename to Spigot-Server-Patches/0220-Prevent-logins-from-being-processed-when-the-player-.patch index 2574c762d0..883dc3b6bf 100644 --- a/Spigot-Server-Patches/0221-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/0220-Prevent-logins-from-being-processed-when-the-player-.patch @@ -1,4 +1,4 @@ -From 9bdee54edd28ee7085c421af0183d3b196c9954e Mon Sep 17 00:00:00 2001 +From c456212ffebb223d42fc2f3c9faf162477427caf Mon Sep 17 00:00:00 2001 From: killme Date: Sun, 12 Nov 2017 19:40:01 +0100 Subject: [PATCH] Prevent logins from being processed when the player has @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index d0e719f44..7dbc6f437 100644 +index 3464af6791..ae10cd89c1 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -57,7 +57,11 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/0222-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0221-use-CB-BlockState-implementations-for-captured-block.patch similarity index 94% rename from Spigot-Server-Patches/0222-use-CB-BlockState-implementations-for-captured-block.patch rename to Spigot-Server-Patches/0221-use-CB-BlockState-implementations-for-captured-block.patch index 62da1619b4..1685eb4af8 100644 --- a/Spigot-Server-Patches/0222-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0221-use-CB-BlockState-implementations-for-captured-block.patch @@ -1,4 +1,4 @@ -From bd84d6b81f6ed4ad32b47fca3e98a50dac4b1822 Mon Sep 17 00:00:00 2001 +From 871572c7cb06159e032d17dcaf629252fd3ba907 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 16 Nov 2017 12:12:41 +0000 Subject: [PATCH] use CB BlockState implementations for captured blocks @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d5c509733..b96511804 100644 +index 142b6cc033..642a504d4f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -374,7 +374,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0223-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0222-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 92% rename from Spigot-Server-Patches/0223-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-Server-Patches/0222-API-to-get-a-BlockState-without-a-snapshot.patch index 7d0f77ea4c..59e1ecb6a9 100644 --- a/Spigot-Server-Patches/0223-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0222-API-to-get-a-BlockState-without-a-snapshot.patch @@ -1,4 +1,4 @@ -From 94d006f44ba2bb5da02873d81d82a0f0fe833300 Mon Sep 17 00:00:00 2001 +From c193383e12907fb2df80cbef83d0368fa99829d0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 6 Nov 2017 21:08:22 -0500 Subject: [PATCH] API to get a BlockState without a snapshot @@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 2cfe2202e..909432d51 100644 +index 6021a3401f..536fd37254 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -203,7 +203,12 @@ public abstract class TileEntity implements KeyedObject { +@@ -206,7 +206,12 @@ public abstract class TileEntity implements KeyedObject { // Paper } // CraftBukkit start - add method @@ -29,7 +29,7 @@ index 2cfe2202e..909432d51 100644 if (world == null) return null; // Spigot start org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()); -@@ -212,7 +217,7 @@ public abstract class TileEntity implements KeyedObject { +@@ -215,7 +220,7 @@ public abstract class TileEntity implements KeyedObject { // Paper return null; } // Spigot end @@ -39,7 +39,7 @@ index 2cfe2202e..909432d51 100644 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index bbf7b5088..c94b5c817 100644 +index d6e4adf147..8cb08c5584 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -263,6 +263,20 @@ public class CraftBlock implements Block { @@ -64,7 +64,7 @@ index bbf7b5088..c94b5c817 100644 switch (material) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 0558cafe3..d4d9c5fc5 100644 +index 0558cafe31..d4d9c5fc50 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -23,20 +23,40 @@ public class CraftBlockEntityState extends CraftBlockState @@ -114,7 +114,7 @@ index 0558cafe3..d4d9c5fc5 100644 private T createSnapshot(T tileEntity, World world) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -index 7a8d44529..97b4e6910 100644 +index 7a8d445299..97b4e6910d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java @@ -14,10 +14,12 @@ public class CraftSign extends CraftBlockEntityState implements diff --git a/Spigot-Server-Patches/0224-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0223-AsyncTabCompleteEvent.patch similarity index 95% rename from Spigot-Server-Patches/0224-AsyncTabCompleteEvent.patch rename to Spigot-Server-Patches/0223-AsyncTabCompleteEvent.patch index 9b522cc50a..0eca4f1e70 100644 --- a/Spigot-Server-Patches/0224-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0223-AsyncTabCompleteEvent.patch @@ -1,4 +1,4 @@ -From 9b2ecdc4d560d69dfd41dad01498207a3ef040f9 Mon Sep 17 00:00:00 2001 +From a521466350c33583f337ec4eb7ae52362b594861 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Nov 2017 13:19:58 -0500 Subject: [PATCH] AsyncTabCompleteEvent @@ -14,18 +14,18 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7e96c4eb4..ab2bd6dae 100644 +index bfaeaa7559..90ac83b5b1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -504,18 +504,59 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -504,18 +504,60 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } public void a(PacketPlayInTabComplete packetplayintabcomplete) { - PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); + // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start - if (chatSpamField.addAndGet(this, 5) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) { -- this.disconnect(new ChatMessage("disconnect.spam", new Object[0])); + if (chatSpamField.addAndGet(this, 2) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) { + this.disconnect(new ChatMessage("disconnect.spam", new Object[0])); + minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper return; } @@ -85,10 +85,10 @@ index 7e96c4eb4..ab2bd6dae 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0ef1186b9..d605e5792 100644 +index 213eb3f4aa..ed8d0de9fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1685,7 +1685,7 @@ public final class CraftServer implements Server { +@@ -1669,7 +1669,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } @@ -98,7 +98,7 @@ index 0ef1186b9..d605e5792 100644 return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions(); diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 1e3aae3b8..95d13c146 100644 +index 1e3aae3b8f..95d13c146b 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -28,6 +28,39 @@ public class ConsoleCommandCompleter implements Completer { diff --git a/Spigot-Server-Patches/0225-Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/0224-Avoid-NPE-in-PathfinderGoalTempt.patch similarity index 89% rename from Spigot-Server-Patches/0225-Avoid-NPE-in-PathfinderGoalTempt.patch rename to Spigot-Server-Patches/0224-Avoid-NPE-in-PathfinderGoalTempt.patch index de264175cf..439c9cdcf2 100644 --- a/Spigot-Server-Patches/0225-Avoid-NPE-in-PathfinderGoalTempt.patch +++ b/Spigot-Server-Patches/0224-Avoid-NPE-in-PathfinderGoalTempt.patch @@ -1,11 +1,11 @@ -From 66b8e5de50e36ee6f046f28135d963376827f17e Mon Sep 17 00:00:00 2001 +From a36a3ffd0d1048e5e1cc7e74f46ae7a1d54289f6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 29 Nov 2017 22:18:54 -0500 Subject: [PATCH] Avoid NPE in PathfinderGoalTempt diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java -index 154202700..64b1ac71b 100644 +index 8ca996e652..1b82479418 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java @@ -52,7 +52,7 @@ public class PathfinderGoalTempt extends PathfinderGoal { diff --git a/Spigot-Server-Patches/0226-PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/0225-PlayerPickupExperienceEvent.patch similarity index 91% rename from Spigot-Server-Patches/0226-PlayerPickupExperienceEvent.patch rename to Spigot-Server-Patches/0225-PlayerPickupExperienceEvent.patch index 18338e14c7..19c4cc4dd4 100644 --- a/Spigot-Server-Patches/0226-PlayerPickupExperienceEvent.patch +++ b/Spigot-Server-Patches/0225-PlayerPickupExperienceEvent.patch @@ -1,4 +1,4 @@ -From 8bed7b19ff45041aeeb92705f05366a3b2a15cff Mon Sep 17 00:00:00 2001 +From 9849a550cb90b5d34fb6d2a4882175a8e055460a Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:02:53 -0500 Subject: [PATCH] PlayerPickupExperienceEvent @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 79d80596d..a87ef5fb8 100644 +index 79d80596df..a87ef5fb8c 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -218,7 +218,7 @@ public class EntityExperienceOrb extends Entity { diff --git a/Spigot-Server-Patches/0227-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0226-ExperienceOrbMergeEvent.patch similarity index 93% rename from Spigot-Server-Patches/0227-ExperienceOrbMergeEvent.patch rename to Spigot-Server-Patches/0226-ExperienceOrbMergeEvent.patch index c0ee601c88..9a2af97c4c 100644 --- a/Spigot-Server-Patches/0227-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0226-ExperienceOrbMergeEvent.patch @@ -1,4 +1,4 @@ -From be8638c45049455649276f1af83033d7eb7760d2 Mon Sep 17 00:00:00 2001 +From 2c317cc196671b1892fe0fdf7b50105a322978e9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:57:26 -0500 Subject: [PATCH] ExperienceOrbMergeEvent @@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b96511804..d8ce3efc9 100644 +index 642a504d4f..00eb342f8c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1003,7 +1003,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0228-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0227-Ability-to-apply-mending-to-XP-API.patch similarity index 95% rename from Spigot-Server-Patches/0228-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-Server-Patches/0227-Ability-to-apply-mending-to-XP-API.patch index 5c849a7ebc..542f0fc63b 100644 --- a/Spigot-Server-Patches/0228-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0227-Ability-to-apply-mending-to-XP-API.patch @@ -1,4 +1,4 @@ -From efe7ce57afb0a73e514ce0c788a111757e7ac7ae Mon Sep 17 00:00:00 2001 +From ad3c4c9dde2939d26da9efc5af88b794ecaac362 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Dec 2017 17:36:49 -0500 Subject: [PATCH] Ability to apply mending to XP API @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index 3204d94c5..e4ed9e206 100644 +index 3204d94c54..e4ed9e2066 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java @@ -245,6 +245,7 @@ public class EnchantmentManager { @@ -22,7 +22,7 @@ index 3204d94c5..e4ed9e206 100644 List list = enchantment.a(entityliving); diff --git a/src/main/java/net/minecraft/server/Enchantments.java b/src/main/java/net/minecraft/server/Enchantments.java -index 0f4aad20f..3a5263fd9 100644 +index 0f4aad20fe..3a5263fd9f 100644 --- a/src/main/java/net/minecraft/server/Enchantments.java +++ b/src/main/java/net/minecraft/server/Enchantments.java @@ -36,7 +36,7 @@ public class Enchantments { @@ -35,7 +35,7 @@ index 0f4aad20f..3a5263fd9 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index a87ef5fb8..b8bfc7577 100644 +index a87ef5fb8c..b8bfc75771 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -246,10 +246,12 @@ public class EntityExperienceOrb extends Entity { @@ -52,7 +52,7 @@ index a87ef5fb8..b8bfc7577 100644 return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 43e357e39..7021a81be 100644 +index 23200bb597..9f69000cb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -970,8 +970,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0229-Configurable-Chunks-Sends-per-Tick-setting.patch b/Spigot-Server-Patches/0228-Configurable-Chunks-Sends-per-Tick-setting.patch similarity index 91% rename from Spigot-Server-Patches/0229-Configurable-Chunks-Sends-per-Tick-setting.patch rename to Spigot-Server-Patches/0228-Configurable-Chunks-Sends-per-Tick-setting.patch index 5e917c3629..3ef3e34548 100644 --- a/Spigot-Server-Patches/0229-Configurable-Chunks-Sends-per-Tick-setting.patch +++ b/Spigot-Server-Patches/0228-Configurable-Chunks-Sends-per-Tick-setting.patch @@ -1,4 +1,4 @@ -From f833988ed04cab6d37a5e4fe6e0e011709bb0444 Mon Sep 17 00:00:00 2001 +From eb6289939059668071131cd9acee2ee6c026caf7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 1 Jan 2018 15:41:59 -0500 Subject: [PATCH] Configurable Chunks Sends per Tick setting @@ -8,10 +8,10 @@ Vanilla already had this limited, make it configurable. Limit how much exploration lags the server diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 605e84173..703642c0b 100644 +index 1c642e636..87c0feb25 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -367,4 +367,13 @@ public class PaperWorldConfig { +@@ -368,4 +368,13 @@ public class PaperWorldConfig { expMergeMaxValue = getInt("experience-merge-max-value", -1); log("Experience Merge Max Value: " + expMergeMaxValue); } diff --git a/removed/server/0259-Configurable-Max-Chunk-Gens-per-Tick.patch b/Spigot-Server-Patches/0229-Configurable-Max-Chunk-Gens-per-Tick.patch similarity index 85% rename from removed/server/0259-Configurable-Max-Chunk-Gens-per-Tick.patch rename to Spigot-Server-Patches/0229-Configurable-Max-Chunk-Gens-per-Tick.patch index 2032691ad4..13e780dbeb 100644 --- a/removed/server/0259-Configurable-Max-Chunk-Gens-per-Tick.patch +++ b/Spigot-Server-Patches/0229-Configurable-Max-Chunk-Gens-per-Tick.patch @@ -1,4 +1,4 @@ -From 9b92490838fd8805b3e867cc7235a0bcf0854f7f Mon Sep 17 00:00:00 2001 +From 463a09fd84f4d456094bbaf1608897879de235ff Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 1 Jan 2018 16:10:24 -0500 Subject: [PATCH] Configurable Max Chunk Gens per Tick @@ -13,10 +13,10 @@ This should result in no noticeable speed reduction in generation for servers no lagging, and let larger servers reduce this value according to their own desires. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e3ff78180..0ddf826f9 100644 +index 87c0feb25..f3ab146d3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -472,4 +472,16 @@ public class PaperWorldConfig { +@@ -377,4 +377,15 @@ public class PaperWorldConfig { } log("Max Chunk Sends Per Tick: " + maxChunkSendsPerTick); } @@ -31,33 +31,32 @@ index e3ff78180..0ddf826f9 100644 + log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); + } + } -+ } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 395386f29..baf72404e 100644 +index 344b95233..fcd9f5491 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -27,6 +27,7 @@ public class PlayerChunk { - private boolean done; - +@@ -28,6 +28,7 @@ public class PlayerChunk { // CraftBukkit start - add fields + // You know the drill, https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse + // All may seem good at first, but there's deeper issues if you play for a bit + boolean chunkExists; // Paper private boolean loadInProgress = false; private Runnable loadedRunnable = new Runnable() { public void run() { -@@ -50,6 +51,7 @@ public class PlayerChunk { - // CraftBukkit start - loadInProgress = true; - this.chunk = playerchunkmap.getWorld().getChunkProviderServer().getChunkAt(i, j, loadedRunnable, false); +@@ -49,6 +50,7 @@ public class PlayerChunk { + this.playerChunkMap = playerchunkmap; + this.location = new ChunkCoordIntPair(i, j); + this.chunk = playerchunkmap.getWorld().getChunkProviderServer().getOrLoadChunkAt(i, j); + this.chunkExists = this.chunk != null || ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper markChunkUsed(); // Paper - delay chunk unloads - // CraftBukkit end } + diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6ee9f6cfb..99652ae3e 100644 +index 9fd07f859..e29aaab2d 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -166,6 +166,7 @@ public class PlayerChunkMap { +@@ -140,6 +140,7 @@ public class PlayerChunkMap { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); @@ -65,7 +64,7 @@ index 6ee9f6cfb..99652ae3e 100644 // Spigot end Iterator iterator1 = this.h.iterator(); -@@ -175,6 +176,11 @@ public class PlayerChunkMap { +@@ -149,6 +150,11 @@ public class PlayerChunkMap { if (playerchunk1.f() == null) { boolean flag = playerchunk1.a(PlayerChunkMap.b); diff --git a/Spigot-Server-Patches/0230-Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/0230-Make-max-squid-spawn-height-configurable.patch index f988d9e677..4caf927181 100644 --- a/Spigot-Server-Patches/0230-Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/0230-Make-max-squid-spawn-height-configurable.patch @@ -1,4 +1,4 @@ -From a7d52d9da454870e13059c9cee1ea2b09943c662 Mon Sep 17 00:00:00 2001 +From d28ac9662ec743cf08fb7978e1033b1ecf267d31 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 11 Jan 2018 16:47:28 -0600 Subject: [PATCH] Make max squid spawn height configurable @@ -7,33 +7,21 @@ I don't know why upstream made only the minimum height configurable but whatever diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 703642c0b..a33c55f41 100644 +index f3ab146d3..128034dbb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -376,4 +376,21 @@ public class PaperWorldConfig { +@@ -388,4 +388,9 @@ public class PaperWorldConfig { + log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); } - log("Max Chunk Sends Per Tick: " + maxChunkSendsPerTick); } + -+ public int maxChunkGensPerTick = 10; -+ private void maxChunkGensPerTick() { -+ maxChunkGensPerTick = getInt("max-chunk-gens-per-tick", maxChunkGensPerTick); -+ if (maxChunkGensPerTick <= 0) { -+ maxChunkGensPerTick = Integer.MAX_VALUE; -+ log("Max Chunk Gens Per Tick: Unlimited (NOT RECOMMENDED)"); -+ } else { -+ log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); -+ } -+ } -+ + public double squidMaxSpawnHeight; + private void squidMaxSpawnHeight() { + squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); + } -+ } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index ffc6d0b68..70b251210 100644 +index 97de169de..3099f6aa7 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -167,7 +167,10 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/Spigot-Server-Patches/0231-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0231-PreCreatureSpawnEvent.patch index 260691a08e..4407b5607f 100644 --- a/Spigot-Server-Patches/0231-PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/0231-PreCreatureSpawnEvent.patch @@ -1,4 +1,4 @@ -From 6e4911557836aeeaf25a0ee89018de637d0149a9 Mon Sep 17 00:00:00 2001 +From 9a0a56e528db31e6d9a887b2b3ac7cb408fd8210 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:01:31 -0500 Subject: [PATCH] PreCreatureSpawnEvent @@ -15,7 +15,7 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index c76dbe74a..b88160a2e 100644 +index c76dbe74ac..d10196fcbd 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -1,6 +1,7 @@ @@ -26,7 +26,7 @@ index c76dbe74a..b88160a2e 100644 import java.util.Iterator; import java.util.List; import javax.annotation.Nullable; -@@ -94,6 +95,27 @@ public abstract class MobSpawnerAbstract { +@@ -94,6 +95,28 @@ public abstract class MobSpawnerAbstract { double d3 = j >= 1 ? nbttaglist.k(0) : (double) blockposition.getX() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; double d4 = j >= 2 ? nbttaglist.k(1) : (double) (blockposition.getY() + world.random.nextInt(3) - 1); double d5 = j >= 3 ? nbttaglist.k(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; @@ -44,6 +44,7 @@ index c76dbe74a..b88160a2e 100644 + org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER + ); + if (!event.callEvent()) { ++ flag = true; + if (event.shouldAbortSpawn()) { + break; + } @@ -55,7 +56,7 @@ index c76dbe74a..b88160a2e 100644 if (entity == null) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 6d842df62..8c6c68c9e 100644 +index 342a15db5e..973c3d1e9e 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -160,10 +160,30 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/0232-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0232-PlayerNaturallySpawnCreaturesEvent.patch index 1c7a7787cc..230d9dab56 100644 --- a/Spigot-Server-Patches/0232-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0232-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From d3c65296d8baec00ffccc097fbd32c984eda341e Mon Sep 17 00:00:00 2001 +From 7834dbeef5d2f49dbed7721ff35dd583e2b84356 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:36:02 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent @@ -9,7 +9,7 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 8c6c68c9e..e7bf1e5fc 100644 +index 973c3d1e9e..f525fd1b42 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -47,6 +47,15 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/0233-Add-SkullMeta.setPlayerProfile-API.patch b/Spigot-Server-Patches/0233-Add-SkullMeta.setPlayerProfile-API.patch index f9904783ab..380faaba2a 100644 --- a/Spigot-Server-Patches/0233-Add-SkullMeta.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0233-Add-SkullMeta.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 50b9db3c2112d6d203c3ba1d3ce14e0e494e3c44 Mon Sep 17 00:00:00 2001 +From 5419d733dfcb2453954fa596166dd20e45ca00ef Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 19 Jan 2018 00:36:25 -0500 Subject: [PATCH] Add SkullMeta.setPlayerProfile API @@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 52de1439e..960ae59ae 100644 +index e9e2c1445..d894fadef 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.inventory; @@ -28,7 +28,7 @@ index 52de1439e..960ae59ae 100644 @DelegateDeserialization(SerializableMeta.class) class CraftMetaSkull extends CraftMetaItem implements SkullMeta { -@@ -131,6 +135,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -130,6 +134,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { return hasOwner() ? profile.getName() : null; } diff --git a/Spigot-Server-Patches/0234-Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/0234-Fill-Profile-Property-Events.patch index 0ece840c7d..7fe590d1a9 100644 --- a/Spigot-Server-Patches/0234-Fill-Profile-Property-Events.patch +++ b/Spigot-Server-Patches/0234-Fill-Profile-Property-Events.patch @@ -1,4 +1,4 @@ -From 4e3afed7ad46f7fb12501512b3b056d43845b225 Mon Sep 17 00:00:00 2001 +From 58025f5c89a85bf0b61e258b8a7c49d485b44e06 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 2 Jan 2018 00:31:26 -0500 Subject: [PATCH] Fill Profile Property Events @@ -11,7 +11,7 @@ If Mojang API does need to be hit, event fire so you can get the results. This is useful for implementing a ProfileCache for Player Skulls diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java -index 4b2a67423..f83aa5ef0 100644 +index 4b2a67423f..f83aa5ef0f 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -1,5 +1,7 @@ diff --git a/Spigot-Server-Patches/0235-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/0235-PlayerAdvancementCriterionGrantEvent.patch index 0e2b81d2de..e84202c873 100644 --- a/Spigot-Server-Patches/0235-PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-Server-Patches/0235-PlayerAdvancementCriterionGrantEvent.patch @@ -1,11 +1,11 @@ -From 746b48fb737927fc6f25497d06fdbb40ef59be9b Mon Sep 17 00:00:00 2001 +From 460396241443a00d258da20fd6e6717649361f94 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 19 Jan 2018 08:15:29 -0600 Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 57918d3d6..67556ed32 100644 +index d0eb65aaf0..5fe0e947c3 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java @@ -232,6 +232,12 @@ public class AdvancementDataPlayer { diff --git a/Spigot-Server-Patches/0236-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0236-Add-ArmorStand-Item-Meta.patch index 9ff4b2c843..69989eaa79 100644 --- a/Spigot-Server-Patches/0236-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0236-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From 3cdab27e9d5d15730d83f109ca6428e725e80c5e Mon Sep 17 00:00:00 2001 +From ca412bfa3f41d52e4dc3fa2b21e6f4375c6aa7bb Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Jan 2018 17:04:14 -0500 Subject: [PATCH] Add ArmorStand Item Meta @@ -13,10 +13,10 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 1cdbdf6d0..da109e35a 100644 +index 1df2b463a..abdbd4989 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -184,6 +184,8 @@ public final class CraftItemFactory implements ItemFactory { +@@ -183,6 +183,8 @@ public final class CraftItemFactory implements ItemFactory { return meta instanceof CraftMetaSpawnEgg ? meta : new CraftMetaSpawnEgg(meta); case KNOWLEDGE_BOOK: return meta instanceof CraftMetaKnowledgeBook ? meta : new CraftMetaKnowledgeBook(meta); @@ -26,7 +26,7 @@ index 1cdbdf6d0..da109e35a 100644 case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index cadff64bf..b1e0d6185 100644 +index e2699564a..aad380c3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -395,6 +395,8 @@ public final class CraftItemStack extends ItemStack { @@ -40,7 +40,7 @@ index cadff64bf..b1e0d6185 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 000000000..30941c7b0 +index 000000000..0e8acf12e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +1,309 @@ @@ -219,8 +219,8 @@ index 000000000..30941c7b0 + } + + @Override -+ void deserializeInternal(NBTTagCompound tag) { -+ super.deserializeInternal(tag); ++ void deserializeInternal(NBTTagCompound tag, Object context) { ++ super.deserializeInternal(tag, context); + + if (tag.hasKey(ENTITY_TAG.NBT)) { + entityTag = tag.getCompound(ENTITY_TAG.NBT); @@ -354,10 +354,10 @@ index 000000000..30941c7b0 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e43a24989..df4bbba57 100644 +index f21c1e846..a5fcf6bd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -134,6 +134,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -136,6 +136,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { .put(CraftMetaCharge.class, "FIREWORK_EFFECT") .put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK") .put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET") @@ -365,7 +365,7 @@ index e43a24989..df4bbba57 100644 .put(CraftMetaItem.class, "UNSPECIFIC") .build(); -@@ -1083,7 +1084,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1093,7 +1094,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { CraftMetaCharge.EXPLOSION.NBT, CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMetaKnowledgeBook.BOOK_RECIPES.NBT, diff --git a/Spigot-Server-Patches/0237-Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/0237-Extend-Player-Interact-cancellation.patch index a9617aeea1..0e4cd2d227 100644 --- a/Spigot-Server-Patches/0237-Extend-Player-Interact-cancellation.patch +++ b/Spigot-Server-Patches/0237-Extend-Player-Interact-cancellation.patch @@ -1,4 +1,4 @@ -From 8ee7700cdaccb5163a9398141a29fc19c30e0eea Mon Sep 17 00:00:00 2001 +From fc10d576b3d09d06db5582b291dd01567dce5ed6 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Feb 2018 10:43:46 +0000 Subject: [PATCH] Extend Player Interact cancellation @@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index e34198e40..620efb1ac 100644 +index 55e45f84ca..e83b4fb4b0 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -110,6 +110,7 @@ public class PlayerInteractManager { @@ -24,7 +24,7 @@ index e34198e40..620efb1ac 100644 // Update any tile entity data for this block TileEntity tileentity = this.world.getTileEntity(blockposition); if (tileentity != null) { -@@ -249,6 +250,34 @@ public class PlayerInteractManager { +@@ -249,6 +250,33 @@ public class PlayerInteractManager { return flag; } @@ -42,15 +42,14 @@ index e34198e40..620efb1ac 100644 + BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite()); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston)); + } else if (block instanceof BlockBed) { -+ if (data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT) { -+ // Restore head of bed -+ BlockPosition head = position.shift(data.get(BlockBed.FACING)); -+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head)); ++ // Restore other half of bed ++ boolean foot = data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT; ++ BlockPosition otherBlock = position.shift(foot ? data.get(BlockBed.FACING) : data.get(BlockBed.FACING).opposite()); ++ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, otherBlock)); + -+ TileEntity tileentity = this.world.getTileEntity(head); -+ if (tileentity != null) { -+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket()); -+ } ++ TileEntity tileentity = this.world.getTileEntity(otherBlock); ++ if (tileentity != null) { ++ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket()); + } + } + } @@ -59,7 +58,7 @@ index e34198e40..620efb1ac 100644 public boolean breakBlock(BlockPosition blockposition) { IBlockData iblockdata = this.world.getType(blockposition); // CraftBukkit start - fire BlockBreakEvent -@@ -297,11 +326,7 @@ public class PlayerInteractManager { +@@ -297,11 +325,7 @@ public class PlayerInteractManager { } // Let the client know the block still exists ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); @@ -72,7 +71,7 @@ index e34198e40..620efb1ac 100644 // Update any tile entity data for this block TileEntity tileentity = this.world.getTileEntity(blockposition); if (tileentity != null) { -@@ -459,7 +484,25 @@ public class PlayerInteractManager { +@@ -459,7 +483,25 @@ public class PlayerInteractManager { ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); } else if (iblockdata.getBlock() instanceof BlockCake) { ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake diff --git a/Spigot-Server-Patches/0238-Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/0238-Tameable-getOwnerUniqueId-API.patch index a751268120..61c7072cfa 100644 --- a/Spigot-Server-Patches/0238-Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-Server-Patches/0238-Tameable-getOwnerUniqueId-API.patch @@ -1,4 +1,4 @@ -From b88bf8f54e70c80c89c723a466518a0a0bc7881d Mon Sep 17 00:00:00 2001 +From 4109edb37b1ec2944247d97c29d71195ac9ba911 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 24 Feb 2018 01:14:55 -0500 Subject: [PATCH] Tameable#getOwnerUniqueId API @@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index e56bef334..cc9d432e7 100644 +index e56bef3340..cc9d432e7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -83,6 +83,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -21,7 +21,7 @@ index e56bef334..cc9d432e7 100644 return getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java -index eaaebeab8..2e959321b 100644 +index eaaebeab83..2e959321b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -18,6 +18,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat diff --git a/Spigot-Server-Patches/0239-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0239-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 418f3c8bee..5df27bf6f4 100644 --- a/Spigot-Server-Patches/0239-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/0239-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -1,14 +1,14 @@ -From c343647c7c1da02fcf1fb959638cdf50c4517dbf Mon Sep 17 00:00:00 2001 +From 03bde12d5856ae2c86d660a0e14b4e3d272c82c3 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Sat, 10 Mar 2018 00:50:24 +0100 Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a33c55f41..4ca31c8eb 100644 +index 128034dbb..2ce60eb05 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -179,6 +179,11 @@ public class PaperWorldConfig { +@@ -180,6 +180,11 @@ public class PaperWorldConfig { disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); } @@ -21,7 +21,7 @@ index a33c55f41..4ca31c8eb 100644 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index ae4dd621d..4fb300468 100644 +index cd3e021a0..d04f9b380 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1021,6 +1021,7 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0240-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch b/Spigot-Server-Patches/0240-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch index 2efcc95866..84dab040b7 100644 --- a/Spigot-Server-Patches/0240-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch +++ b/Spigot-Server-Patches/0240-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch @@ -1,4 +1,4 @@ -From 60e36541916056a066dfbad3f6cba828ad68fd88 Mon Sep 17 00:00:00 2001 +From 5db29b1d9b5e59cb0f75c5e2716ace221aae5989 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Mar 2018 13:03:49 +0000 Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened @@ -6,7 +6,7 @@ Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java -index ac81d3f86..f50bae012 100644 +index ac81d3f86b..f50bae0123 100644 --- a/src/main/java/net/minecraft/server/InventoryEnderChest.java +++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java @@ -5,7 +5,7 @@ import org.bukkit.inventory.InventoryHolder; diff --git a/Spigot-Server-Patches/0241-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0241-Prevent-Frosted-Ice-from-loading-holding-chunks.patch index a585a3e97a..8e7e291006 100644 --- a/Spigot-Server-Patches/0241-Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ b/Spigot-Server-Patches/0241-Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -1,11 +1,11 @@ -From 566c2f52f198e39d6ba6c4c94a0242ffc7e2d7a1 Mon Sep 17 00:00:00 2001 +From f3e8233ea031d161f9fb5a92a019cd34f4ac7081 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 10 Mar 2018 16:33:15 -0500 Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 77cf6b8e9..9d9671eae 100644 +index 77cf6b8e9b..9d9671eaec 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java @@ -25,6 +25,12 @@ public class BlockIceFrost extends BlockIce { diff --git a/Spigot-Server-Patches/0242-Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/0242-Disable-Explicit-Network-Manager-Flushing.patch index d41ff3a3b0..b80039b3ff 100644 --- a/Spigot-Server-Patches/0242-Disable-Explicit-Network-Manager-Flushing.patch +++ b/Spigot-Server-Patches/0242-Disable-Explicit-Network-Manager-Flushing.patch @@ -1,4 +1,4 @@ -From 63e1dbdab75cf30b185ca29a91c5ce9f106f9da7 Mon Sep 17 00:00:00 2001 +From 83268ebeef5e977ab9b5d81b7e1851cf10c4abb5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 11 Mar 2018 14:13:33 -0400 Subject: [PATCH] Disable Explicit Network Manager Flushing @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 424464d09..909ad36fb 100644 +index 61f9eb3e64..2272f1239b 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -66,6 +66,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/Spigot-Server-Patches/0243-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0243-Implement-extended-PaperServerListPingEvent.patch index ba80269169..8cf52e859c 100644 --- a/Spigot-Server-Patches/0243-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0243-Implement-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From 557f91f2d60f8facf05cd18160e6c1d87ec5949e Mon Sep 17 00:00:00 2001 +From ce7b02aacbd7529f9bffc562a9a24d7fb2a988c4 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java new file mode 100644 -index 000000000..c1a8e295b +index 0000000000..c1a8e295b6 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java @@ -0,0 +1,31 @@ @@ -43,7 +43,7 @@ index 000000000..c1a8e295b +} diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java new file mode 100644 -index 000000000..a2a409e63 +index 0000000000..a2a409e635 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java @@ -0,0 +1,11 @@ @@ -60,7 +60,7 @@ index 000000000..a2a409e63 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 000000000..350410527 +index 0000000000..350410527b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +1,112 @@ @@ -177,10 +177,10 @@ index 000000000..350410527 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4654e22c8..97581d995 100644 +index 8e72220f37..90b1871196 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -870,7 +870,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -915,7 +915,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati if (i - this.Y >= 5000000000L) { this.Y = i; this.n.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.B(), this.A())); @@ -189,8 +189,8 @@ index 4654e22c8..97581d995 100644 int j = MathHelper.nextInt(this.o, 0, this.A() - agameprofile.length); for (int k = 0; k < agameprofile.length; ++k) { -@@ -1220,10 +1220,12 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati - return "1.13-pre7"; +@@ -1280,10 +1280,12 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + return "1.13"; } + public int getPlayerCount() { return A(); } // Paper - OBFHELPER @@ -203,7 +203,7 @@ index 4654e22c8..97581d995 100644 return this.s.getMaxPlayers(); } diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index c9edd289a..8aa121e2f 100644 +index c9edd289ac..8aa121e2f7 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -30,6 +30,8 @@ public class PacketStatusListener implements PacketStatusInListener { @@ -226,7 +226,7 @@ index c9edd289a..8aa121e2f 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index d7e1ecc03..f20cddc41 100644 +index d7e1ecc031..f20cddc41c 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -29,6 +29,7 @@ public class ServerPing { @@ -251,10 +251,10 @@ index d7e1ecc03..f20cddc41 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b39096f04..d89224e7d 100644 +index 7f3543970f..6cc48258dc 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -285,7 +285,7 @@ public class SpigotConfig +@@ -291,7 +291,7 @@ public class SpigotConfig public static int playerSample; private static void playerSample() { diff --git a/Spigot-Server-Patches/0244-Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/0244-Improved-Async-Task-Scheduler.patch index b0cd01a2ea..c0a7889f3e 100644 --- a/Spigot-Server-Patches/0244-Improved-Async-Task-Scheduler.patch +++ b/Spigot-Server-Patches/0244-Improved-Async-Task-Scheduler.patch @@ -1,4 +1,4 @@ -From f476b5d557791b1d72e162a31a0d6c1ba6225039 Mon Sep 17 00:00:00 2001 +From fde7de079c6f314161efb3c36c58ba96fb90e6b9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 16 Mar 2018 22:59:43 -0400 Subject: [PATCH] Improved Async Task Scheduler @@ -32,7 +32,7 @@ operations are decoupled from the sync tasks queue. diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java new file mode 100644 -index 000000000..eaf869287 +index 0000000000..eaf8692877 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java @@ -0,0 +1,127 @@ @@ -164,7 +164,7 @@ index 000000000..eaf869287 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index a2fadaf82..223afc7ed 100644 +index a2fadaf82c..223afc7edc 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -15,7 +15,6 @@ import java.util.concurrent.atomic.AtomicReference; diff --git a/Spigot-Server-Patches/0245-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/0245-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 58adc7536e..36c2cf4302 100644 --- a/Spigot-Server-Patches/0245-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/0245-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -1,4 +1,4 @@ -From 4603e7767cf800889109614583659c4824185d35 Mon Sep 17 00:00:00 2001 +From dbf5e0efaf13ef601966eafd9c58768f22b17f2d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 11:45:57 -0400 Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 7dbc6f437..02bbb0d1d 100644 +index 91cd6e0f61..f02b28059c 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -1,5 +1,7 @@ @@ -25,7 +25,7 @@ index 7dbc6f437..02bbb0d1d 100644 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; -@@ -281,8 +284,16 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -280,8 +283,16 @@ public class LoginListener implements PacketLoginInListener, ITickable { java.util.UUID uniqueId = i.getId(); final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; diff --git a/Spigot-Server-Patches/0246-Call-PortalCreateEvent-for-exit-portals.patch b/Spigot-Server-Patches/0246-Call-PortalCreateEvent-for-exit-portals.patch index e8a31552d2..8d962097df 100644 --- a/Spigot-Server-Patches/0246-Call-PortalCreateEvent-for-exit-portals.patch +++ b/Spigot-Server-Patches/0246-Call-PortalCreateEvent-for-exit-portals.patch @@ -1,11 +1,11 @@ -From 3d002d32e0ca98b0fe7dde739c78504adc12da55 Mon Sep 17 00:00:00 2001 +From 1638f3ff3613a2cfefd5bb77b761ff9b96e46e8d Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Sun, 18 Mar 2018 15:44:44 +0100 Subject: [PATCH] Call PortalCreateEvent for exit portals diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java -index 402d8d7d6..f36373450 100644 +index 402d8d7d63..f363734500 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -3,16 +3,23 @@ package net.minecraft.server; diff --git a/Spigot-Server-Patches/0247-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0247-Player.setPlayerProfile-API.patch index 5a8ed4aad6..588fd570cc 100644 --- a/Spigot-Server-Patches/0247-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0247-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From b1272fc90f5669440ddbcb89feeb838d83930742 Mon Sep 17 00:00:00 2001 +From 854b7ae7e7fdb222ab2b685b8e00dd22a44d5e54 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:29:48 -0400 Subject: [PATCH] Player.setPlayerProfile API @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4fb300468..65f4ea6cc 100644 +index d04f9b380e..5015bd0710 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -67,7 +67,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index 4fb300468..65f4ea6cc 100644 private final ItemCooldown ce; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 02bbb0d1d..e73b07f42 100644 +index f02b28059c..bb33cf3029 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -38,7 +38,7 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -31,7 +31,7 @@ index 02bbb0d1d..e73b07f42 100644 private final String j; private SecretKey loginKey; private EntityPlayer l; -@@ -285,12 +285,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -284,12 +284,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; // Paper start @@ -48,7 +48,7 @@ index 02bbb0d1d..e73b07f42 100644 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7021a81be..c0b484177 100644 +index 9f69000cb2..8313c5192b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -91,7 +91,7 @@ index 7021a81be..c0b484177 100644 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1191,6 +1204,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1191,6 +1204,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } @@ -109,10 +109,31 @@ index 7021a81be..c0b484177 100644 + for (EntityPlayer player : players) { + player.getBukkitEntity().reregisterPlayer(self); + } ++ refreshPlayer(); + } + public PlayerProfile getPlayerProfile() { + return new CraftPlayerProfile(this).clone(); + } ++ ++ private void refreshPlayer() { ++ EntityPlayer handle = getHandle(); ++ ++ Location loc = getLocation(); ++ ++ PlayerConnection connection = handle.playerConnection; ++ reregisterPlayer(handle); ++ ++ //Respawn the player then update their position and selected slot ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, handle.world.getDifficulty(), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); ++ handle.updateAbilities(); ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); ++ net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle); ++ ++ if (this.isOp()) { ++ this.setOp(false); ++ this.setOp(true); ++ } ++ } + // Paper end public void removeDisconnectingPlayer(Player player) { diff --git a/Spigot-Server-Patches/0248-Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/0248-Fix-Dragon-Server-Crashes.patch index c5fb7eafd2..98efff037f 100644 --- a/Spigot-Server-Patches/0248-Fix-Dragon-Server-Crashes.patch +++ b/Spigot-Server-Patches/0248-Fix-Dragon-Server-Crashes.patch @@ -1,4 +1,4 @@ -From f115c470c9ec36d4a124b3ce10a655f0b4a1a6ea Mon Sep 17 00:00:00 2001 +From e2fb3d62635848c82a99efb75ad353a6c389a88b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Mar 2018 20:52:07 -0400 Subject: [PATCH] Fix Dragon Server Crashes @@ -7,7 +7,7 @@ If the dragon tries to find "ground" and hits a hole, or off edge, it will infinitely keep looking for non air and eventually crash. diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index 41b5a4519..b78d3fe50 100644 +index 41b5a4519b..b78d3fe508 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java @@ -51,7 +51,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded diff --git a/Spigot-Server-Patches/0249-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0249-getPlayerUniqueId-API.patch index 6dcfbb5119..78d0d0bb3a 100644 --- a/Spigot-Server-Patches/0249-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0249-getPlayerUniqueId-API.patch @@ -1,4 +1,4 @@ -From 8b072f7bcac5a64cbeb681a56c0a70d3b1760e45 Mon Sep 17 00:00:00 2001 +From bd5033a7e28d0ad24b413b011cfda0ad8d05ad2d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 01:40:24 -0400 Subject: [PATCH] getPlayerUniqueId API @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d605e5792..0b361d82f 100644 +index ed8d0de9fa..6d23320e6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1379,6 +1379,26 @@ public final class CraftServer implements Server { +@@ -1362,6 +1362,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0250-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0250-Make-player-data-saving-configurable.patch index ca1337a2c2..0b93612bb4 100644 --- a/Spigot-Server-Patches/0250-Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/0250-Make-player-data-saving-configurable.patch @@ -1,14 +1,14 @@ -From 252500c4df07e3b9ddca3342251edfc69eba13e2 Mon Sep 17 00:00:00 2001 +From 1a71c96aa9cb6788c37d8c728f6f264c51d6556f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Mon, 26 Mar 2018 18:30:53 +0300 Subject: [PATCH] Make player data saving configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ec89ecfca..b602bbf12 100644 +index 7a2c70302..03846919f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -282,4 +282,13 @@ public class PaperConfig { +@@ -286,4 +286,13 @@ public class PaperConfig { private static void authenticationServersDownKickMessage() { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } diff --git a/Spigot-Server-Patches/0251-Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/0251-Make-legacy-ping-handler-more-reliable.patch index c9f70a20f3..71c17545d5 100644 --- a/Spigot-Server-Patches/0251-Make-legacy-ping-handler-more-reliable.patch +++ b/Spigot-Server-Patches/0251-Make-legacy-ping-handler-more-reliable.patch @@ -1,4 +1,4 @@ -From d9e2a3cf0ea3d161fe6ec584a55cefdffc86b308 Mon Sep 17 00:00:00 2001 +From 7ed9f30f128f27736c38ab140dca2ac2ff0d6889 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 18:22:50 +0200 Subject: [PATCH] Make legacy ping handler more reliable @@ -28,7 +28,7 @@ respond to the request. [2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13 diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 41115108f..07c53f505 100644 +index 41115108f1..07c53f5057 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -14,6 +14,7 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter { diff --git a/Spigot-Server-Patches/0252-Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/0252-Call-PaperServerListPingEvent-for-legacy-pings.patch index 03eeca3008..043c57b42d 100644 --- a/Spigot-Server-Patches/0252-Call-PaperServerListPingEvent-for-legacy-pings.patch +++ b/Spigot-Server-Patches/0252-Call-PaperServerListPingEvent-for-legacy-pings.patch @@ -1,4 +1,4 @@ -From 3cfed1cabdc149a5016551c477c05fea9dab436d Mon Sep 17 00:00:00 2001 +From b63089a639307fd34b01ccb97374fb59873f6e79 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 19:30:51 +0200 Subject: [PATCH] Call PaperServerListPingEvent for legacy pings @@ -6,7 +6,7 @@ Subject: [PATCH] Call PaperServerListPingEvent for legacy pings diff --git a/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java new file mode 100644 -index 000000000..74c012fd4 +index 0000000000..74c012fd40 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java @@ -0,0 +1,73 @@ @@ -84,7 +84,7 @@ index 000000000..74c012fd4 + +} diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 07c53f505..91acfceec 100644 +index 07c53f5057..91acfceec8 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -9,6 +9,7 @@ import java.net.InetSocketAddress; diff --git a/Spigot-Server-Patches/0253-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0253-Flag-to-disable-the-channel-limit.patch index 157b1c236c..fb5e686fa8 100644 --- a/Spigot-Server-Patches/0253-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0253-Flag-to-disable-the-channel-limit.patch @@ -1,4 +1,4 @@ -From cfcc5a751071bb5a3d54c5147ed2d0b1ce0652fc Mon Sep 17 00:00:00 2001 +From 397887e6789c73b3cee3d5fc35f7a1c5c5a4b19d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 31 Mar 2018 17:04:26 +0100 Subject: [PATCH] Flag to disable the channel limit @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c0b484177..60bc6d331 100644 +index 8313c5192..8c1e49759 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -132,6 +132,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -20,7 +20,7 @@ index c0b484177..60bc6d331 100644 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1385,7 +1386,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1406,7 +1407,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0254-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0254-Add-method-to-open-already-placed-sign.patch index 9f87557093..17227b8042 100644 --- a/Spigot-Server-Patches/0254-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0254-Add-method-to-open-already-placed-sign.patch @@ -1,14 +1,14 @@ -From 0f0a1e0abec3f8dd616b1356ff2fd571fa693d28 Mon Sep 17 00:00:00 2001 +From 846943696efc9b1ccacf885d7badf1dc90addfdc Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 1 Apr 2018 02:29:37 +0300 Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 9e2fc4947..4b9ecb4a6 100644 +index e06ac23852..6f1659b221 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -508,4 +508,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -517,4 +517,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { entity.remove(); } } diff --git a/Spigot-Server-Patches/0255-Load-version-history-at-server-start.patch b/Spigot-Server-Patches/0255-Load-version-history-at-server-start.patch index 813a9c4bcf..69f6affbf9 100644 --- a/Spigot-Server-Patches/0255-Load-version-history-at-server-start.patch +++ b/Spigot-Server-Patches/0255-Load-version-history-at-server-start.patch @@ -1,11 +1,11 @@ -From 1b5e237639a102046ad53bf1e8f0993344645ce7 Mon Sep 17 00:00:00 2001 +From 5819bb6f428681e72e0a2c1b5f2521de4b8d3555 Mon Sep 17 00:00:00 2001 From: Kyle Wood Date: Thu, 1 Mar 2018 19:38:14 -0600 Subject: [PATCH] Load version history at server start diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 927cbeedcd..ae7a8c1046 100644 +index 8c76300185..8e15710caf 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -207,6 +207,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0256-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0256-Configurable-sprint-interruption-on-attack.patch index 3b4e09befa..4299b13988 100644 --- a/Spigot-Server-Patches/0256-Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/0256-Configurable-sprint-interruption-on-attack.patch @@ -1,4 +1,4 @@ -From 272351def6380d58c578121249084b58c33fb005 Mon Sep 17 00:00:00 2001 +From 2d83beeb89c8ab579c3069503d3a404cd87058c9 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 14 Apr 2018 20:20:46 +0200 Subject: [PATCH] Configurable sprint interruption on attack @@ -6,20 +6,21 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4ca31c8eb..b07ff9587 100644 +index 2ce60eb05..9daa8f66a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -398,4 +398,8 @@ public class PaperWorldConfig { +@@ -398,4 +398,9 @@ public class PaperWorldConfig { + private void squidMaxSpawnHeight() { squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); } - ++ + public boolean disableSprintInterruptionOnAttack; + private void disableSprintInterruptionOnAttack() { + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 65f4ea6cc..a766a1467 100644 +index 5015bd071..738ac8570 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1073,7 +1073,11 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0257-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0257-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index 99f743eada..3091bc79bc 100644 --- a/Spigot-Server-Patches/0257-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0257-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -1,14 +1,14 @@ -From 6728452343b99a6782ba86e8f06c8efc541ec1ce Mon Sep 17 00:00:00 2001 +From be2b54d1a53f9197e5864aaebfca7b9bd94b8c3d Mon Sep 17 00:00:00 2001 From: 0x22 <0x22@futureclient.net> Date: Thu, 26 Apr 2018 04:41:11 -0400 Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ab2bd6dae..067f7b990 100644 +index 90ac83b5b1..7bf99cae1b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2502,7 +2502,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2504,7 +2504,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { diff --git a/Spigot-Server-Patches/0258-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0258-EndermanEscapeEvent.patch index 2170459097..ee91bfa822 100644 --- a/Spigot-Server-Patches/0258-EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/0258-EndermanEscapeEvent.patch @@ -1,4 +1,4 @@ -From eff134b277d169c072ec4e9e4a625b4eed570ad8 Mon Sep 17 00:00:00 2001 +From 521528b63eccb2a3d5a1e6fe68bb24cc2761b182 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:15:55 -0400 Subject: [PATCH] EndermanEscapeEvent @@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 96e29539b..e5eb0189d 100644 +index ddf64ee6c5..a766b38959 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -1,6 +1,7 @@ @@ -39,7 +39,7 @@ index 96e29539b..e5eb0189d 100644 - if (f > 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { + if (f > 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper this.setGoalTarget((EntityLiving) null); - this.dz(); + this.dA(); } @@ -247,7 +254,7 @@ public class EntityEnderman extends EntityMonster { public boolean damageEntity(DamageSource damagesource, float f) { @@ -48,7 +48,7 @@ index 96e29539b..e5eb0189d 100644 - } else if (damagesource instanceof EntityDamageSourceIndirect) { + } else if (damagesource instanceof EntityDamageSourceIndirect && tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper for (int i = 0; i < 64; ++i) { - if (this.dz()) { + if (this.dA()) { return true; @@ -258,7 +265,7 @@ public class EntityEnderman extends EntityMonster { } else { @@ -56,7 +56,7 @@ index 96e29539b..e5eb0189d 100644 - if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { + if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper - this.dz(); + this.dA(); } @@ -347,7 +354,7 @@ public class EntityEnderman extends EntityMonster { @@ -74,7 +74,7 @@ index 96e29539b..e5eb0189d 100644 if (this.i.f((EntityHuman) this.d)) { - if (((EntityHuman) this.d).h(this.i) < 16.0D) { + if (((EntityHuman) this.d).h(this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { // Paper - this.i.dz(); + this.i.dA(); } -- diff --git a/Spigot-Server-Patches/0259-Enderman.teleportRandomly.patch b/Spigot-Server-Patches/0259-Enderman.teleportRandomly.patch index 02dca261fd..82c5d6c8b7 100644 --- a/Spigot-Server-Patches/0259-Enderman.teleportRandomly.patch +++ b/Spigot-Server-Patches/0259-Enderman.teleportRandomly.patch @@ -1,4 +1,4 @@ -From 4aa456490016a276e95bc4671452be27080de984 Mon Sep 17 00:00:00 2001 +From bba39e03862eb5a4cc461cf03483e8947b833cbf Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:29:44 -0400 Subject: [PATCH] Enderman.teleportRandomly() @@ -6,19 +6,19 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index e5eb0189d..df94b4ca9 100644 +index a766b38959..0f64c8f2b5 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -184,6 +184,7 @@ public class EntityEnderman extends EntityMonster { super.mobTick(); } -+ public boolean teleportRandomly() { return dz(); } // Paper - OBFHELPER - protected boolean dz() { ++ public boolean teleportRandomly() { return dA(); } // Paper - OBFHELPER + protected boolean dA() { double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D; double d1 = this.locY + (double) (this.random.nextInt(64) - 32); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java -index 5998530a8..f62ea821f 100644 +index 5998530a8f..f62ea821fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java @@ -16,6 +16,7 @@ public class CraftEnderman extends CraftMonster implements Enderman { diff --git a/Spigot-Server-Patches/0260-Block-Enderpearl-Travel-Exploit.patch b/Spigot-Server-Patches/0260-Block-Enderpearl-Travel-Exploit.patch index 6213a84d88..f965cc1798 100644 --- a/Spigot-Server-Patches/0260-Block-Enderpearl-Travel-Exploit.patch +++ b/Spigot-Server-Patches/0260-Block-Enderpearl-Travel-Exploit.patch @@ -1,4 +1,4 @@ -From 1a3f838cf2b440c14f09906a39b4ce9d3296c3b0 Mon Sep 17 00:00:00 2001 +From 09e45ce6ab61d7e5c112db870bf4595d1b849fab Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 17:15:26 -0400 Subject: [PATCH] Block Enderpearl Travel Exploit @@ -12,10 +12,10 @@ This disables that by not saving the thrower when the chunk is unloaded. This is mainly useful for survival servers that do not allow freeform teleporting. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b07ff9587..f1db4becd 100644 +index 9daa8f66a..3467da7c8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -402,4 +402,10 @@ public class PaperWorldConfig { +@@ -403,4 +403,10 @@ public class PaperWorldConfig { private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); } diff --git a/Spigot-Server-Patches/0261-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0261-Expand-World.spawnParticle-API-and-add-Builder.patch index 09660ae013..86d8eb5dd3 100644 --- a/Spigot-Server-Patches/0261-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0261-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From c2a083674e1af22455c5b81ea3d35a854280b245 Mon Sep 17 00:00:00 2001 +From cdf38ff5f4faa5cb5d280968ba11078321ea8c54 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 15 Aug 2017 22:29:12 -0400 Subject: [PATCH] Expand World.spawnParticle API and add Builder @@ -9,7 +9,7 @@ the standard API is to send the packet to everyone in the world, which is ineffe This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c5da2cde3..4ac2d39c5 100644 +index 5d5f6f6328..d506503e93 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1205,14 +1205,20 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -37,10 +37,10 @@ index c5da2cde3..4ac2d39c5 100644 if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7004f1176..1afb480f8 100644 +index b3756074b5..62638d4e25 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1576,13 +1576,17 @@ public class CraftWorld implements World { +@@ -1572,13 +1572,17 @@ public class CraftWorld implements World { spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data); } diff --git a/Spigot-Server-Patches/0262-EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/0262-EndermanAttackPlayerEvent.patch index ef4ff0ca64..d8de3ee81f 100644 --- a/Spigot-Server-Patches/0262-EndermanAttackPlayerEvent.patch +++ b/Spigot-Server-Patches/0262-EndermanAttackPlayerEvent.patch @@ -1,4 +1,4 @@ -From c021ee56772971a27376c93715633f054136944d Mon Sep 17 00:00:00 2001 +From 9ee9f23739ae7fe7599a3eb8c43d4195a6a6735c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 May 2018 20:18:54 -0400 Subject: [PATCH] EndermanAttackPlayerEvent @@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index df94b4ca9..f2fcba3d9 100644 +index 0f64c8f2b5..2db0eb4946 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -135,7 +135,15 @@ public class EntityEnderman extends EntityMonster { diff --git a/Spigot-Server-Patches/0263-WitchConsumePotionEvent.patch b/Spigot-Server-Patches/0263-WitchConsumePotionEvent.patch index 7e191df73b..4e6f87d5e3 100644 --- a/Spigot-Server-Patches/0263-WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/0263-WitchConsumePotionEvent.patch @@ -1,4 +1,4 @@ -From b8489746b3b8239af444718a14db63df9a013f9e Mon Sep 17 00:00:00 2001 +From a986b34be653bc35d35d30c824015d1b4b9bc71f Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 May 2018 20:35:16 -0400 Subject: [PATCH] WitchConsumePotionEvent @@ -6,7 +6,7 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 71d8b6f8f..cf0669589 100644 +index b397636247..790ab11c17 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -67,7 +67,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/0264-WitchThrowPotionEvent.patch b/Spigot-Server-Patches/0264-WitchThrowPotionEvent.patch index 9ddd0df2cd..7d56710ade 100644 --- a/Spigot-Server-Patches/0264-WitchThrowPotionEvent.patch +++ b/Spigot-Server-Patches/0264-WitchThrowPotionEvent.patch @@ -1,4 +1,4 @@ -From 29d89398140ce66b1a3209076b0c1928e6998cef Mon Sep 17 00:00:00 2001 +From bd0fa8018b2603d1f15fb90546d9666e04f03450 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 May 2018 20:44:58 -0400 Subject: [PATCH] WitchThrowPotionEvent @@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index cf0669589..59f3f4404 100644 +index 790ab11c17..9d802be18a 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -154,7 +154,15 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/0265-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0265-Allow-spawning-Item-entities-with-World.spawnEntity.patch index fb10bea3a9..d8e6902306 100644 --- a/Spigot-Server-Patches/0265-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0265-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -1,4 +1,4 @@ -From dc479ddb30269b2192d02a677dfee75596be4123 Mon Sep 17 00:00:00 2001 +From a05cc2ae56fad0c73d3bd41977a09ef3ec6c4d1f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Jun 2018 20:39:20 -0400 Subject: [PATCH] Allow spawning Item entities with World.spawnEntity @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1afb480f8..f7eaecb3f 100644 +index 62638d4e25..affbb93bfd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -936,6 +936,10 @@ public class CraftWorld implements World { +@@ -932,6 +932,10 @@ public class CraftWorld implements World { if (Boat.class.isAssignableFrom(clazz)) { entity = new EntityBoat(world, x, y, z); entity.setPositionRotation(x, y, z, yaw, pitch); diff --git a/Spigot-Server-Patches/0266-Don-t-load-chunks-for-villager-door-checks.patch b/Spigot-Server-Patches/0266-Don-t-load-chunks-for-villager-door-checks.patch index 427bec202d..e929e750d7 100644 --- a/Spigot-Server-Patches/0266-Don-t-load-chunks-for-villager-door-checks.patch +++ b/Spigot-Server-Patches/0266-Don-t-load-chunks-for-villager-door-checks.patch @@ -1,4 +1,4 @@ -From c84eb9a263bf5bf86b6ed453989bce78ef18670f Mon Sep 17 00:00:00 2001 +From 837badd75f18ba3bb4eaa964fb3476cfeaf22c90 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 00:32:22 -0400 Subject: [PATCH] Don't load chunks for villager door checks @@ -6,7 +6,7 @@ Subject: [PATCH] Don't load chunks for villager door checks This avoids villages spam loading chunks sync diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index dfcabb83a..22fe23e8e 100644 +index dfcabb83a1..22fe23e8ed 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -313,6 +313,12 @@ public class Village { diff --git a/Spigot-Server-Patches/0267-WitchReadyPotionEvent.patch b/Spigot-Server-Patches/0267-WitchReadyPotionEvent.patch index 053fc0e3e0..2a9e321bb0 100644 --- a/Spigot-Server-Patches/0267-WitchReadyPotionEvent.patch +++ b/Spigot-Server-Patches/0267-WitchReadyPotionEvent.patch @@ -1,11 +1,11 @@ -From 6a0a12787818097574820822ec616173d555934d Mon Sep 17 00:00:00 2001 +From 2fbd924ddeb8078f8241b35933e14e35a220767d Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 22:47:26 -0400 Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 59f3f4404..45b6e2b7b 100644 +index 9d802be18a..0096df5de0 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -100,7 +100,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/0268-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0268-ItemStack-getMaxItemUseDuration.patch index 9dd3a1a678..faf35d83af 100644 --- a/Spigot-Server-Patches/0268-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0268-ItemStack-getMaxItemUseDuration.patch @@ -1,4 +1,4 @@ -From 2447f92f25673681de873f0f7c2c828e66749b07 Mon Sep 17 00:00:00 2001 +From 3413e0db563571a6aed48adddd2597b9aff71561 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 23:00:29 -0400 Subject: [PATCH] ItemStack#getMaxItemUseDuration @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ca169e113..dad883054 100644 +index 33e82f5377..0952bf0b82 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -514,6 +514,7 @@ public final class ItemStack { +@@ -516,6 +516,7 @@ public final class ItemStack { this.getItem().b(this, world, entityhuman); } @@ -18,10 +18,10 @@ index ca169e113..dad883054 100644 return this.getItem().c(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index b1e0d6185..03f611518 100644 +index aad380c3b7..5f3331de13 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -182,6 +182,13 @@ public final class CraftItemStack extends ItemStack { +@@ -183,6 +183,13 @@ public final class CraftItemStack extends ItemStack { return (handle == null) ? Material.AIR.getMaxStackSize() : handle.getItem().getMaxStackSize(); } diff --git a/Spigot-Server-Patches/0269-Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0269-Implement-EntityTeleportEndGatewayEvent.patch index f69b679ecb..db9f94e07a 100644 --- a/Spigot-Server-Patches/0269-Implement-EntityTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0269-Implement-EntityTeleportEndGatewayEvent.patch @@ -1,11 +1,11 @@ -From 94174eb07753ceb680c9deb800186df594922629 Mon Sep 17 00:00:00 2001 +From d75aa9bc0f292cc70f7fd674acda2e705ca169cf Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 9 Jun 2018 14:08:39 +0200 Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index c3d30dc94..fd9be7574 100644 +index 888bbd7a45..c6632588eb 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -138,8 +138,19 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/0270-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/0270-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index ac233bfe7d..400735e51c 100644 --- a/Spigot-Server-Patches/0270-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/Spigot-Server-Patches/0270-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -1,4 +1,4 @@ -From d8cc785ed1c99aaa99a903e700fd4af772fc8622 Mon Sep 17 00:00:00 2001 +From d1bada03a8ddbe7c0ca4054c6c8fc5e4342935c5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 Jun 2018 01:18:49 -0400 Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index f37169d73..86935f70a 100644 +index 0147054dff..bbb4ca0fe6 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -12,7 +12,7 @@ public class EntityCreeper extends EntityMonster { @@ -19,7 +19,7 @@ index f37169d73..86935f70a 100644 private int fuseTicks; public int maxFuseTicks = 30; @@ -205,6 +205,7 @@ public class EntityCreeper extends EntityMonster { - this.dF(); + this.dG(); } else { fuseTicks = 0; + this.datawatcher.set(isIgnitedDW, Boolean.valueOf(false)); // Paper diff --git a/Spigot-Server-Patches/0271-Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/0271-Properly-remove-entities-on-dimension-teleport.patch index 5f960a0c1d..508f4f31f0 100644 --- a/Spigot-Server-Patches/0271-Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/0271-Properly-remove-entities-on-dimension-teleport.patch @@ -1,4 +1,4 @@ -From 014b84371464966ee131a8b52ddf87154e02343e Mon Sep 17 00:00:00 2001 +From 071a95c07fb5f705384223310947d7a6c2031f69 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 Jun 2018 20:04:42 -0400 Subject: [PATCH] Properly remove entities on dimension teleport @@ -22,10 +22,10 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cd1639e26..ea42800ae 100644 +index 472c48bef7..efcc215ed3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2594,7 +2594,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2607,7 +2607,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end */ @@ -35,14 +35,14 @@ index cd1639e26..ea42800ae 100644 this.world.methodProfiler.a("reposition"); /* CraftBukkit start - Handled in calculateTarget diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4ac2d39c5..d6d3ffa6f 100644 +index d506503e93..697296acd0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1025,6 +1025,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } protected void c(Entity entity) { -+ if (!entity.valid) return; // Paper - Already removed, dont fire twice - this looks like it can happen even without our changes ++ if (!this.entitiesByUUID.containsKey(entity.getUniqueID()) && !entity.valid) return; // Paper - Already removed, dont fire twice - this looks like it can happen even without our changes super.c(entity); this.entitiesById.d(entity.getId()); this.entitiesByUUID.remove(entity.getUniqueID()); diff --git a/Spigot-Server-Patches/0272-Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/0272-Fix-CraftEntity-hashCode.patch index fa3f914f4e..8a04e333a0 100644 --- a/Spigot-Server-Patches/0272-Fix-CraftEntity-hashCode.patch +++ b/Spigot-Server-Patches/0272-Fix-CraftEntity-hashCode.patch @@ -1,4 +1,4 @@ -From 401b1eabffdb3192c2f5d29b2ae00ed856bc6f19 Mon Sep 17 00:00:00 2001 +From 4e9e1e8a0136e140460f3054bd60ee7795002846 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 Jun 2018 20:20:15 -0400 Subject: [PATCH] Fix CraftEntity hashCode @@ -21,7 +21,7 @@ check is essentially the same as this.getHandle() == other.getHandle() However, replaced it too to make it clearer of intent. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 6d4dc539c..7da6a25f1 100644 +index 6d4dc539cb..7da6a25f1d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -525,14 +525,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/0273-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0273-Configurable-Alternative-LootPool-Luck-Formula.patch index 8a0e58e8ca..d35394c794 100644 --- a/Spigot-Server-Patches/0273-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/0273-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -1,4 +1,4 @@ -From 0bd14e1218f146e26524a3c799209482a53e99e0 Mon Sep 17 00:00:00 2001 +From 2c64129f6d08bbf3d89edebe4c9c5c0ae61849b3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 15 Jun 2018 00:30:32 -0400 Subject: [PATCH] Configurable Alternative LootPool Luck Formula @@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b602bbf12..62bce1806 100644 +index 03846919f..5a17ce3d2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -291,4 +291,12 @@ public class PaperConfig { +@@ -295,4 +295,12 @@ public class PaperConfig { "such as inventories, experience points, advancements and the like will not be saved when they log out."); } } diff --git a/Spigot-Server-Patches/0274-Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/0274-Print-Error-details-when-failing-to-save-player-data.patch index f28db80a53..4690cc3a9a 100644 --- a/Spigot-Server-Patches/0274-Print-Error-details-when-failing-to-save-player-data.patch +++ b/Spigot-Server-Patches/0274-Print-Error-details-when-failing-to-save-player-data.patch @@ -1,11 +1,11 @@ -From f20915ce41068548c77552bce50c39b26cf2a669 Mon Sep 17 00:00:00 2001 +From 3b1a296bedbe1651e82c0c07801a4d6da256ba4e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 15 Jun 2018 20:37:03 -0400 Subject: [PATCH] Print Error details when failing to save player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index cbfdb3cf7..9a243010d 100644 +index cbfdb3cf79..9a243010d0 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -157,7 +157,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { diff --git a/Spigot-Server-Patches/0275-Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/0275-Make-shield-blocking-delay-configurable.patch index e66dcad16d..25ff46e7cc 100644 --- a/Spigot-Server-Patches/0275-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/0275-Make-shield-blocking-delay-configurable.patch @@ -1,14 +1,14 @@ -From 1fe88e14503474a32459e6777e8f2e8096c85adf Mon Sep 17 00:00:00 2001 +From 30427ff32f5721e52b627144cc6ef04a04a06954 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 16 Jun 2018 01:18:16 -0500 Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f1db4becde..ef4bfb480c 100644 +index 3467da7c8e..ddb5ced79d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -408,4 +408,9 @@ public class PaperWorldConfig { +@@ -409,4 +409,9 @@ public class PaperWorldConfig { disableEnderpearlExploit = getBoolean("game-mechanics.disable-unloaded-chunk-enderpearl-exploit", disableEnderpearlExploit); log("Disable Unloaded Chunk Enderpearl Exploit: " + (disableEnderpearlExploit ? "enabled" : "disabled")); } @@ -19,10 +19,10 @@ index f1db4becde..ef4bfb480c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2f325f695e..ab3246ee02 100644 +index 999a02cad3..eaab10a146 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2661,7 +2661,7 @@ public abstract class EntityLiving extends Entity { +@@ -2664,7 +2664,7 @@ public abstract class EntityLiving extends Entity { if (this.isHandRaised() && !this.activeItem.isEmpty()) { Item item = this.activeItem.getItem(); @@ -31,8 +31,8 @@ index 2f325f695e..ab3246ee02 100644 } else { return false; } -@@ -2749,4 +2749,16 @@ public abstract class EntityLiving extends Entity { - public boolean de() { +@@ -2752,4 +2752,16 @@ public abstract class EntityLiving extends Entity { + public boolean df() { return true; } + @@ -49,10 +49,10 @@ index 2f325f695e..ab3246ee02 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 460a050cce..35ba95e0f5 100644 +index 71b9b45f10..d7344809ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -530,5 +530,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -528,5 +528,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setArrowsStuck(int arrows) { getHandle().setArrowCount(arrows); } diff --git a/Spigot-Server-Patches/0276-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/0276-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index 7e8c08286c..28812d69b8 100644 --- a/Spigot-Server-Patches/0276-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/0276-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -1,4 +1,4 @@ -From 4d81780db6fefcf2f2854874aaff39f758fd2c23 Mon Sep 17 00:00:00 2001 +From 50eb40a8a5203c8aa84d94d24148d7c4acf3c16c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Jun 2018 16:23:38 -0400 Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors @@ -6,7 +6,7 @@ Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors This code was causing NPE's in saving player data, potentially related to reloads. diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java -index 71d6c4552..799f2be70 100644 +index 71d6c45529..799f2be707 100644 --- a/src/main/java/net/minecraft/server/RecipeBookServer.java +++ b/src/main/java/net/minecraft/server/RecipeBookServer.java @@ -77,7 +77,11 @@ public class RecipeBookServer extends RecipeBook { diff --git a/Spigot-Server-Patches/0277-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0277-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index e5da2e7956..76878be901 100644 --- a/Spigot-Server-Patches/0277-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0277-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -1,4 +1,4 @@ -From ce9ae41f9c1a58dfb36d50e022a54f9a693baf9b Mon Sep 17 00:00:00 2001 +From c40eeffb614580d924ea6b00a3e3d05e614365ed Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 15 Jun 2013 19:51:17 -0400 Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API @@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API Adds ability to get what arrow was shot, and control if it should be consumed. diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index c2bc8060ac..1ae967d1c0 100644 +index 8e1f6427d5..e262ce0969 100644 --- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java @@ -160,7 +160,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR @@ -19,7 +19,7 @@ index c2bc8060ac..1ae967d1c0 100644 event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index 4aa3b6249f..c8fc180458 100644 +index 8489f45be2..379a7f84a5 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -57,6 +57,7 @@ public class ItemBow extends Item { diff --git a/Spigot-Server-Patches/0278-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0278-PlayerReadyArrowEvent.patch index c83835479a..f99990ee8a 100644 --- a/Spigot-Server-Patches/0278-PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/0278-PlayerReadyArrowEvent.patch @@ -1,4 +1,4 @@ -From afc01323c53932b9808ec3b3b386bf5bc371b41d Mon Sep 17 00:00:00 2001 +From 637bff64eeaaf0fc7af097f126863f0b81da9240 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 18 Jun 2018 01:12:53 -0400 Subject: [PATCH] PlayerReadyArrowEvent @@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index c8fc18045..de0d80361 100644 +index 379a7f84a5..c0caeda362 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0279-Fire-EntityShootBowEvent-for-Illusioner.patch b/Spigot-Server-Patches/0279-Fire-EntityShootBowEvent-for-Illusioner.patch index 5aa81da5d7..35ddbe5f80 100644 --- a/Spigot-Server-Patches/0279-Fire-EntityShootBowEvent-for-Illusioner.patch +++ b/Spigot-Server-Patches/0279-Fire-EntityShootBowEvent-for-Illusioner.patch @@ -1,11 +1,11 @@ -From 6bdfc29966cb4da65d45841001ec76f154cbf34c Mon Sep 17 00:00:00 2001 +From ba6a4bd84e793af70eef53160e5308825978314b Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 18 Jun 2018 22:19:36 -0400 Subject: [PATCH] Fire EntityShootBowEvent for Illusioner diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index d03fa6318..16c3be42e 100644 +index 82b36350c4..aebf704664 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -123,8 +123,18 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan diff --git a/Spigot-Server-Patches/0280-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0280-Implement-EntityKnockbackByEntityEvent.patch index 056fabf378..a27364116c 100644 --- a/Spigot-Server-Patches/0280-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0280-Implement-EntityKnockbackByEntityEvent.patch @@ -1,4 +1,4 @@ -From be0ea88947f6c5be87e3dfd4c20665785d6858db Mon Sep 17 00:00:00 2001 +From 75b301f96c5f5dfddc5bca5671e055cefcb9fcde Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Mon, 18 Jun 2018 15:46:23 +0200 Subject: [PATCH] Implement EntityKnockbackByEntityEvent @@ -6,10 +6,10 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ab3246ee02..f67b4ca353 100644 +index eaab10a146..4455dc4891 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1245,6 +1245,12 @@ public abstract class EntityLiving extends Entity { +@@ -1247,6 +1247,12 @@ public abstract class EntityLiving extends Entity { this.impulse = true; float f1 = MathHelper.sqrt(d0 * d0 + d1 * d1); @@ -22,7 +22,7 @@ index ab3246ee02..f67b4ca353 100644 this.motX /= 2.0D; this.motZ /= 2.0D; this.motX -= d0 / (double) f1 * (double) f; -@@ -1257,6 +1263,18 @@ public abstract class EntityLiving extends Entity { +@@ -1259,6 +1265,18 @@ public abstract class EntityLiving extends Entity { } } diff --git a/Spigot-Server-Patches/0281-Expand-Explosions-API.patch b/Spigot-Server-Patches/0281-Expand-Explosions-API.patch index 657174bad2..072de8c39c 100644 --- a/Spigot-Server-Patches/0281-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0281-Expand-Explosions-API.patch @@ -1,4 +1,4 @@ -From 72cd1ffe96f7827b81fbbca604f1e55ffe645d8e Mon Sep 17 00:00:00 2001 +From 067f19f3dc53dc4a36ac8914fe3a868f3baf5542 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Jun 2018 23:17:24 -0400 Subject: [PATCH] Expand Explosions API @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f7eaecb3f..e8290759b 100644 +index affbb93bfd..23f0d5cb7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -548,6 +548,11 @@ public class CraftWorld implements World { +@@ -544,6 +544,11 @@ public class CraftWorld implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) { return !world.createExplosion(null, x, y, z, power, setFire, breakBlocks).wasCanceled; } diff --git a/Spigot-Server-Patches/0282-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0282-LivingEntity-Hand-Raised-Item-Use-API.patch index 8af5b0a0eb..42ef3b962e 100644 --- a/Spigot-Server-Patches/0282-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0282-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -1,4 +1,4 @@ -From 42f348c4866235a751a95a6c69abeaaf826dad17 Mon Sep 17 00:00:00 2001 +From f29840c3c49b3e5d1441e230900c9f18e47e8571 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Jun 2018 00:21:28 -0400 Subject: [PATCH] LivingEntity Hand Raised/Item Use API @@ -6,39 +6,43 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f67b4ca353..cda8151487 100644 +index 4455dc4891..8be1ba5269 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2646,14 +2646,17 @@ public abstract class EntityLiving extends Entity { - - } - -+ public ItemStack getActiveItem() { return cV(); } // Paper - OBFHELPER - public ItemStack cV() { +@@ -106,7 +106,7 @@ public abstract class EntityLiving extends Entity { + private float bI; + private int bJ; + private float bK; +- protected ItemStack activeItem; ++ public ItemStack activeItem; // Paper - public + protected int bu; + protected int bv; + private BlockPosition bL; +@@ -2653,10 +2653,12 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } -+ public int getItemUseRemainingTime() { return cW(); } // Paper - OBFHELPER - public int cW() { ++ public int getItemUseRemainingTime() { return cX(); } // Paper - OBFHELPER + public int cX() { return this.bu; } -+ public int getHandRaisedTime() { return cX(); } // Paper - OBFHELPER - public int cX() { - return this.isHandRaised() ? this.activeItem.k() - this.cW() : 0; ++ public int getHandRaisedTime() { return cY(); } // Paper - OBFHELPER + public int cY() { + return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 35ba95e0f5..0975181e06 100644 +index d7344809ec..e199d08377 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -540,5 +540,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -538,5 +538,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setShieldBlockingDelay(int delay) { getHandle().setShieldBlockingDelay(delay); } + + @Override + public ItemStack getActiveItem() { -+ return getHandle().getActiveItem().asBukkitMirror(); ++ return getHandle().activeItem.asBukkitMirror(); + } + + @Override diff --git a/Spigot-Server-Patches/0283-RangedEntity-API.patch b/Spigot-Server-Patches/0283-RangedEntity-API.patch index 4623d4a41f..1cc516ee45 100644 --- a/Spigot-Server-Patches/0283-RangedEntity-API.patch +++ b/Spigot-Server-Patches/0283-RangedEntity-API.patch @@ -1,4 +1,4 @@ -From a00c8433613cb510195c2a63ac60ce2f14c41a6b Mon Sep 17 00:00:00 2001 +From 57df4b5405ec6348656973b78db6d86cadb57dc0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 26 Jun 2018 22:00:49 -0400 Subject: [PATCH] RangedEntity API @@ -8,7 +8,7 @@ and to perform an attack. diff --git a/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java new file mode 100644 -index 000000000..696660b08 +index 0000000000..696660b089 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java @@ -0,0 +1,19 @@ @@ -32,7 +32,7 @@ index 000000000..696660b08 + } +} diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java -index 4fd69850f..7fe65b7c2 100644 +index 4fd69850fd..7fe65b7c24 100644 --- a/src/main/java/net/minecraft/server/IRangedEntity.java +++ b/src/main/java/net/minecraft/server/IRangedEntity.java @@ -2,7 +2,7 @@ package net.minecraft.server; @@ -46,7 +46,7 @@ index 4fd69850f..7fe65b7c2 100644 + void s(boolean flag); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java -index 2ec1af8be..f31d3eed3 100644 +index 2ec1af8be4..f31d3eed3a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java @@ -1,11 +1,12 @@ @@ -64,7 +64,7 @@ index 2ec1af8be..f31d3eed3 100644 public CraftIllusioner(CraftServer server, EntityIllagerIllusioner entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java -index 23ab78da1..3f94c5a92 100644 +index 23ab78da15..3f94c5a920 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -1,5 +1,6 @@ @@ -84,7 +84,7 @@ index 23ab78da1..3f94c5a92 100644 public CraftLlama(CraftServer server, EntityLlama entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java -index 4ed89615f..4fa5e84ea 100644 +index 4ed89615fd..4fa5e84ea4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -1,12 +1,13 @@ @@ -103,7 +103,7 @@ index 4ed89615f..4fa5e84ea 100644 public CraftSkeleton(CraftServer server, EntitySkeletonAbstract entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -index 0349f0a57..2e3d8fcdf 100644 +index 0349f0a574..2e3d8fcdfa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java @@ -1,11 +1,12 @@ @@ -121,7 +121,7 @@ index 0349f0a57..2e3d8fcdf 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java -index c08833cb7..f25998eb6 100644 +index c08833cb7a..f25998eb6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java @@ -1,11 +1,12 @@ @@ -139,7 +139,7 @@ index c08833cb7..f25998eb6 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java -index fad3db8af..b9bb3a0d1 100644 +index fad3db8af8..b9bb3a0d1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java @@ -1,11 +1,12 @@ diff --git a/Spigot-Server-Patches/0284-Add-SentientNPC-Interface-to-Entities.patch b/Spigot-Server-Patches/0284-Add-SentientNPC-Interface-to-Entities.patch index f4ec0220b7..694b373697 100644 --- a/Spigot-Server-Patches/0284-Add-SentientNPC-Interface-to-Entities.patch +++ b/Spigot-Server-Patches/0284-Add-SentientNPC-Interface-to-Entities.patch @@ -1,4 +1,4 @@ -From ac0823ffa12e8a2db3761180150b1eb95ce4f15b Mon Sep 17 00:00:00 2001 +From 30f3ac826503f83cca607b290996357ebd24e6a1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 1 Jul 2018 22:06:29 -0400 Subject: [PATCH] Add SentientNPC Interface to Entities @@ -14,7 +14,7 @@ This interface lets you identify NPC entities capable of sentience, and able to diff --git a/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java new file mode 100644 -index 000000000..a60ba1349 +index 0000000000..a60ba13495 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java @@ -0,0 +1,25 @@ @@ -44,7 +44,7 @@ index 000000000..a60ba1349 + +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java -index 086980e76..ccce080ab 100644 +index 086980e76d..ccce080ab8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java @@ -1,11 +1,12 @@ @@ -62,7 +62,7 @@ index 086980e76..ccce080ab 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java -index cc115cc36..3a4e6f0c7 100644 +index cc115cc368..3a4e6f0c7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java @@ -1,17 +1,19 @@ @@ -89,7 +89,7 @@ index cc115cc36..3a4e6f0c7 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java -index 09d42141f..30004e5e8 100644 +index 09d42141fb..30004e5e8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java @@ -1,16 +1,18 @@ @@ -124,7 +124,7 @@ index 09d42141f..30004e5e8 100644 @Override public EntityCreature getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java -index f374c7b88..9e6f523bf 100644 +index f374c7b880..9e6f523bf1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java @@ -1,10 +1,11 @@ @@ -141,7 +141,7 @@ index f374c7b88..9e6f523bf 100644 public CraftFlying(CraftServer server, EntityFlying entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java -index 6bf30c834..3768b9573 100644 +index 6bf30c834c..3768b9573a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0285-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-Server-Patches/0285-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch index a9ecbf09ff..3a050e078f 100644 --- a/Spigot-Server-Patches/0285-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ b/Spigot-Server-Patches/0285-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch @@ -1,4 +1,4 @@ -From 82b68d951b4bd0d4016c4ff31929c87fe6b7365c Mon Sep 17 00:00:00 2001 +From 808e9e3d527ba62ca052f7d2cfb327c189c39137 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 30 Jun 2018 05:45:39 +0200 Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the diff --git a/Spigot-Server-Patches/0286-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0286-Add-config-to-disable-ender-dragon-legacy-check.patch index e7b52d9c76..2b36102857 100644 --- a/Spigot-Server-Patches/0286-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0286-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -1,14 +1,14 @@ -From 0caefe772325cd5a57cffef2e691f1be25a4deee Mon Sep 17 00:00:00 2001 +From 15430aff83e4e6c4898c73d44039ce3e8ef05064 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 22 Jun 2018 10:38:31 -0500 Subject: [PATCH] Add config to disable ender dragon legacy check diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ef4bfb480..1607619bd 100644 +index ddb5ced79..270138804 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -413,4 +413,9 @@ public class PaperWorldConfig { +@@ -414,4 +414,9 @@ public class PaperWorldConfig { private void shieldBlockingDelay() { shieldBlockingDelay = getInt("game-mechanics.shield-blocking-delay", 5); } diff --git a/Spigot-Server-Patches/0287-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0287-Implement-World.getEntity-UUID-API.patch index d599c424dc..ffcab3a02e 100644 --- a/Spigot-Server-Patches/0287-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0287-Implement-World.getEntity-UUID-API.patch @@ -1,14 +1,14 @@ -From 4a50c881283ee28bd0e56a8072dfb5dfb0001b73 Mon Sep 17 00:00:00 2001 +From d5f1f0035b77ba250cb2f94108088f729b0ba670 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 3 Jul 2018 16:08:14 +0200 Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e8290759b..0f4a894eb 100644 +index 23f0d5cb7d..54a605f9b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -756,6 +756,14 @@ public class CraftWorld implements World { +@@ -752,6 +752,14 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0288-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0288-InventoryCloseEvent-Reason-API.patch index cbd24bee3e..f2581c3180 100644 --- a/Spigot-Server-Patches/0288-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0288-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From a4b348249773be2b2366d73f8e54d35aa39c2e21 Mon Sep 17 00:00:00 2001 +From 1aad30bce0b3ac8af14c4d614abcf473189ef3ee Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:56:23 -0400 Subject: [PATCH] InventoryCloseEvent Reason API @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f31524eb02..2612d4207f 100644 +index 7a797bef0d..7a7d656926 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -886,7 +886,7 @@ public class Chunk implements IChunkAccess { +@@ -883,7 +883,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -19,7 +19,7 @@ index f31524eb02..2612d4207f 100644 } } } -@@ -911,7 +911,7 @@ public class Chunk implements IChunkAccess { +@@ -908,7 +908,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -29,11 +29,11 @@ index f31524eb02..2612d4207f 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4aba5716ce..d84bb0e40c 100644 +index 738ac8570c..14a61f68e1 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -153,7 +153,7 @@ public abstract class EntityHuman extends EntityLiving { - this.df(); + this.dg(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); @@ -56,7 +56,7 @@ index 4aba5716ce..d84bb0e40c 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5db6e07640..99c638857b 100644 +index 7059fc1187..0c01f8dafa 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -343,7 +343,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -110,10 +110,10 @@ index 5db6e07640..99c638857b 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 067f7b9908..97b315bca0 100644 +index 7bf99cae1b..5ffc4fccd0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2038,7 +2038,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2040,7 +2040,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer()); if (this.player.isFrozen()) return; // CraftBukkit @@ -123,7 +123,7 @@ index 067f7b9908..97b315bca0 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 879780c5b1..907f0232bf 100644 +index 45e42e9989..7a2b219c67 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -422,7 +422,7 @@ public abstract class PlayerList { @@ -136,10 +136,10 @@ index 879780c5b1..907f0232bf 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 4b9ecb4a62..b602a5d1b9 100644 +index 6f1659b221..26b30a1503 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -402,8 +402,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -411,8 +411,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } public void closeInventory() { @@ -155,7 +155,7 @@ index 4b9ecb4a62..b602a5d1b9 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 60bc6d3316..b25980027b 100644 +index 8c1e497592..a10a78994f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -687,7 +687,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0289-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/0289-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index 0c7e5df307..608b330bc9 100644 --- a/Spigot-Server-Patches/0289-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/0289-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -1,4 +1,4 @@ -From b774b0ac70ae00b43fd54c2c65648d60e096175c Mon Sep 17 00:00:00 2001 +From a57ea7eda73f5bdf5359d585762275d4f7282b54 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 03:39:51 -0400 Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk @@ -10,7 +10,7 @@ to the object directly on the Entity/TileEntity object we can directly grab. Use that local value instead to reduce lookups in many hot places. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2612d4207..b3cdc0b7d 100644 +index 7a7d656926..b37fa3829b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -721,6 +721,7 @@ public class Chunk implements IChunkAccess { @@ -22,7 +22,7 @@ index 2612d4207..b3cdc0b7d 100644 this.a(entity, entity.af); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d8ce3efc9..35db0e184 100644 +index 00eb342f8c..127dcedc97 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1208,12 +1208,15 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/0290-Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/0290-Configurable-Bed-Search-Radius.patch index d9d0bed451..8c0cf4215d 100644 --- a/Spigot-Server-Patches/0290-Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/0290-Configurable-Bed-Search-Radius.patch @@ -1,4 +1,4 @@ -From a597b4290dec2a27e9682b460854fecab8a225a3 Mon Sep 17 00:00:00 2001 +From 27e79afaee379c27cfeebbbe409643abff6b530a Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:22:06 -0400 Subject: [PATCH] Configurable Bed Search Radius @@ -10,10 +10,10 @@ player at their bed should it of became obstructed. Defaults to vanilla 1. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1607619bd..692206127 100644 +index 270138804..7bd7aa0d9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -418,4 +418,15 @@ public class PaperWorldConfig { +@@ -419,4 +419,15 @@ public class PaperWorldConfig { private void scanForLegacyEnderDragon() { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/Spigot-Server-Patches/0291-Vex-getOwner-API.patch b/Spigot-Server-Patches/0291-Vex-getOwner-API.patch index 96597b48e4..8ce81b0fcd 100644 --- a/Spigot-Server-Patches/0291-Vex-getOwner-API.patch +++ b/Spigot-Server-Patches/0291-Vex-getOwner-API.patch @@ -1,4 +1,4 @@ -From d1b09605870a98731d5ea3f2cf15f20c60969243 Mon Sep 17 00:00:00 2001 +From 767ec9898c4a8360d40b39d18029d157a9e64ac7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:30:22 -0400 Subject: [PATCH] Vex#getOwner API @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getOwner API Get's the NPC that summoned this Vex diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 897d7c681..ba1109e03 100644 +index 80403473c8..36f8c315b5 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java @@ -86,6 +86,7 @@ public class EntityVex extends EntityMonster { @@ -18,7 +18,7 @@ index 897d7c681..ba1109e03 100644 return this.b; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java -index 787a41e01..5d5658136 100644 +index 787a41e015..5d5658136c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java @@ -1,5 +1,7 @@ diff --git a/Spigot-Server-Patches/0292-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0292-Refresh-player-inventory-when-cancelling-PlayerInter.patch index dc61bce635..e6a3abcec7 100644 --- a/Spigot-Server-Patches/0292-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0292-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -1,4 +1,4 @@ -From 82702cb25e3b6fb831782517c7c57c4733876eab Mon Sep 17 00:00:00 2001 +From 856d2898d092f8955c5403ef95c88dcfa07e8d28 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 13 Jul 2018 14:54:43 +0200 Subject: [PATCH] Refresh player inventory when cancelling @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 97b315bca..d9d11a531 100644 +index 5ffc4fccd0..a405cc0a2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1952,6 +1952,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1954,6 +1954,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } if (event.isCancelled()) { diff --git a/Spigot-Server-Patches/0293-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0293-Don-t-change-the-Entity-Random-seed-for-squids.patch index c9a9a9a545..e6bc230c25 100644 --- a/Spigot-Server-Patches/0293-Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/0293-Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -1,11 +1,11 @@ -From c7a2c715e0925f5129d329923893d2b3ec42c530 Mon Sep 17 00:00:00 2001 +From dfc6c7b5b887052a5c2911ee20bc8a473249a50b Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:05:00 -0400 Subject: [PATCH] Don't change the Entity Random seed for squids diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 70b251210..0114d585b 100644 +index 3099f6aa7a..2205932295 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -22,7 +22,7 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/Spigot-Server-Patches/0294-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0294-Re-add-vanilla-entity-warnings-for-duplicates.patch index c8ee179e69..d6c218bb35 100644 --- a/Spigot-Server-Patches/0294-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0294-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -1,4 +1,4 @@ -From 9f56f07c54c891e59a6eb024f9f5df8426c00a85 Mon Sep 17 00:00:00 2001 +From 4a2e8aceb015706daadd73f26286ba2baf3c9b32 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:08:05 -0400 Subject: [PATCH] Re-add vanilla entity warnings for duplicates @@ -8,7 +8,7 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d6d3ffa6f..2c5004e61 100644 +index 697296acd0..b048343b7c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -979,7 +979,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0296-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch b/Spigot-Server-Patches/0295-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch similarity index 92% rename from Spigot-Server-Patches/0296-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch rename to Spigot-Server-Patches/0295-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch index 16803aeb02..3d243189a5 100644 --- a/Spigot-Server-Patches/0296-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch +++ b/Spigot-Server-Patches/0295-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch @@ -1,4 +1,4 @@ -From d826de1e7aa6bc2cd8e10f847e3617cbc895084e Mon Sep 17 00:00:00 2001 +From 3780df5dee4adf98b8ab4468c605979f989d04e7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:23:00 -0400 Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for @@ -12,7 +12,7 @@ keep it vanilla in behavior a player may teleport away, and trigger instant despawn diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9dc86e90d..c03eaf1e4 100644 +index 14d122b22b..7b64ec27c3 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -617,6 +617,8 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0297-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/0296-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 93% rename from Spigot-Server-Patches/0297-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to Spigot-Server-Patches/0296-Avoid-item-merge-if-stack-size-above-max-stack-size.patch index f7e05ca483..3696adc13c 100644 --- a/Spigot-Server-Patches/0297-Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/0296-Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -1,4 +1,4 @@ -From 6e4c3841196ccf68344d2220c4e48186d0028e6f Mon Sep 17 00:00:00 2001 +From 7981e61b9a6dddd2e982f421b94e98e2d146eab2 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 16 Jul 2018 12:42:20 +0200 Subject: [PATCH] Avoid item merge if stack size above max stack size diff --git a/Spigot-Server-Patches/0298-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0297-Use-asynchronous-Log4j-2-loggers.patch similarity index 88% rename from Spigot-Server-Patches/0298-Use-asynchronous-Log4j-2-loggers.patch rename to Spigot-Server-Patches/0297-Use-asynchronous-Log4j-2-loggers.patch index 5d7823b370..a6dbd49039 100644 --- a/Spigot-Server-Patches/0298-Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/0297-Use-asynchronous-Log4j-2-loggers.patch @@ -1,14 +1,14 @@ -From 033fcb77bd332732f270f7a66f42cf2dfb3bc51e Mon Sep 17 00:00:00 2001 +From 7964f140f23edfbb3b70f1e70d785db5f5cdfec9 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 17 Jul 2018 16:42:17 +0200 Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index 8fd1e36283..0c4b0daf56 100644 +index a319cfe3b8..ddee1b0488 100644 --- a/pom.xml +++ b/pom.xml -@@ -103,6 +103,14 @@ +@@ -102,6 +102,14 @@ 2.8.1 diff --git a/Spigot-Server-Patches/0295-add-uuid-to-Entity.toString.patch b/Spigot-Server-Patches/0298-add-more-information-to-Entity.toString.patch similarity index 55% rename from Spigot-Server-Patches/0295-add-uuid-to-Entity.toString.patch rename to Spigot-Server-Patches/0298-add-more-information-to-Entity.toString.patch index 431a824b12..a14f71664a 100644 --- a/Spigot-Server-Patches/0295-add-uuid-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0298-add-more-information-to-Entity.toString.patch @@ -1,19 +1,20 @@ -From fac0d56990f254da4f1a4b51310eaf047c9cea13 Mon Sep 17 00:00:00 2001 +From ef1d00a30055a00851d00235596c71cc9b7a4777 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:13:28 -0400 -Subject: [PATCH] add uuid to Entity.toString() +Subject: [PATCH] add more information to Entity.toString() +UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ea42800ae..93c34a260 100644 +index efcc215ed3..5a003c8203 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2493,7 +2493,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2506,7 +2506,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { - return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); -+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); // Paper - add uuid ++ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0299-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0299-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch new file mode 100644 index 0000000000..a45f359601 --- /dev/null +++ b/Spigot-Server-Patches/0299-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -0,0 +1,88 @@ +From 92aaeae9ce1a4ceaf3e1e9ec95789677187ece51 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 08:25:40 -0400 +Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues + +Add -Ddebug.entities=true to your JVM flags to gain more information + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index a2101d44f9..f05545e357 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + protected CraftEntity bukkitEntity; + + EntityTrackerEntry tracker; // Paper ++ Throwable addedToWorldStack; // Paper - entity debug + public CraftEntity getBukkitEntity() { + if (bukkitEntity == null) { + bukkitEntity = CraftEntity.getEntity(world.getServer(), this); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index b048343b7c..747d99dbe6 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -53,6 +53,10 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private boolean Q; + + // CraftBukkit start ++ private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper ++ private static Throwable getAddToWorldStackTrace(Entity entity) { ++ return new Throwable(entity + " Added to world at " + new java.util.Date()); ++ } + public final int dimension; + + // Add env and gen to constructor +@@ -980,6 +984,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private boolean j(Entity entity) { + if (entity.dead) { + WorldServer.a.warn("Tried to add entity {} but it was marked as removed already: " + entity); // CraftBukkit // Paper ++ if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace(); + return false; + } else { + UUID uuid = entity.getUniqueID(); +@@ -991,8 +996,14 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.g.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.getName(entity1.P()), uuid.toString()); // CraftBukkit // Paper ++ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper + WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper ++ if (DEBUG_ENTITIES) { ++ if (entity1.addedToWorldStack != null) { ++ entity1.addedToWorldStack.printStackTrace(); ++ } ++ getAddToWorldStackTrace(entity).printStackTrace(); ++ } + return false; + } + +@@ -1009,7 +1020,25 @@ public class WorldServer extends World implements IAsyncTaskHandler { + protected void b(Entity entity) { + super.b(entity); + this.entitiesById.a(entity.getId(), entity); +- this.entitiesByUUID.put(entity.getUniqueID(), entity); ++ // Paper start ++ if (DEBUG_ENTITIES) { ++ entity.addedToWorldStack = getAddToWorldStackTrace(entity); ++ } ++ ++ Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); ++ if (old != null && old.getId() != entity.getId() && old.valid) { ++ Logger logger = LogManager.getLogger(); ++ logger.error("Overwrote an existing entity " + old + " with " + entity); ++ if (DEBUG_ENTITIES) { ++ if (old.addedToWorldStack != null) { ++ old.addedToWorldStack.printStackTrace(); ++ } else { ++ logger.error("Oddly, the old entity was not added to the world in the normal way. Plugins?"); ++ } ++ entity.addedToWorldStack.printStackTrace(); ++ } ++ } ++ // Paper end + Entity[] aentity = entity.bi(); + + if (aentity != null) { +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0299-EnderDragon-Events.patch b/Spigot-Server-Patches/0299-EnderDragon-Events.patch new file mode 100644 index 0000000000..00a1bb86c1 --- /dev/null +++ b/Spigot-Server-Patches/0299-EnderDragon-Events.patch @@ -0,0 +1,60 @@ +From a10cdd4797b779ff0853512f98b6e89cc1b1385d Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:51:27 -0500 +Subject: [PATCH] EnderDragon Events + + +diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +index b78d3fe50..ef8b0e765 100644 +--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java ++++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +@@ -63,7 +63,9 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded + this.d.setDuration(200); + this.d.setParticle(Particles.j); + this.d.a(new MobEffect(MobEffects.HARM)); ++ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.a.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.d.getBukkitEntity()).callEvent()) // Paper + this.a.world.addEntity(this.d); ++ else this.removeAreaEffect(); // Paper + } + + } +@@ -73,6 +75,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded + ++this.c; + } + ++ public void removeAreaEffect() { this.e(); } // Paper - OBFHELPER + public void e() { + if (this.d != null) { + this.d.die(); +diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java +index 9c158fd58..b4887d658 100644 +--- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java ++++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java +@@ -67,7 +67,9 @@ public class DragonControllerStrafe extends AbstractDragonController { + EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11); + + entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F); ++ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) a.getBukkitEntity(), (org.bukkit.entity.DragonFireball) entitydragonfireball.getBukkitEntity()).callEvent()) // Paper + this.a.world.addEntity(entitydragonfireball); ++ else entitydragonfireball.die(); // Paper + this.c = 0; + if (this.d != null) { + while (!this.d.b()) { +diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java +index 862ffc954..2b55cc68b 100644 +--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java ++++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java +@@ -39,8 +39,10 @@ public class EntityDragonFireball extends EntityFireball { + } + } + ++ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list, (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper + this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0); + this.world.addEntity(entityareaeffectcloud); ++ } else entityareaeffectcloud.die(); // Paper + this.die(); + } + +-- +2.11.0 + diff --git a/Spigot-Server-Patches/0300-PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/0300-PlayerElytraBoostEvent.patch new file mode 100644 index 0000000000..1254a6436a --- /dev/null +++ b/Spigot-Server-Patches/0300-PlayerElytraBoostEvent.patch @@ -0,0 +1,32 @@ +From 6bfd7bc02e47e3745fdbe5bd300fff5b02a63082 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:59:59 -0500 +Subject: [PATCH] PlayerElytraBoostEvent + + +diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java +index d4420e68f..82da8dd38 100644 +--- a/src/main/java/net/minecraft/server/ItemFireworks.java ++++ b/src/main/java/net/minecraft/server/ItemFireworks.java +@@ -35,9 +35,15 @@ public class ItemFireworks extends Item { + EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman); + + entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper +- world.addEntity(entityfireworks); +- if (!entityhuman.abilities.canInstantlyBuild) { +- itemstack.subtract(1); ++ // Paper start ++ com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Firework) entityfireworks.getBukkitEntity()); ++ if (event.callEvent() && world.addEntity(entityfireworks)) { ++ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { ++ itemstack.subtract(1); ++ } else ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ } else if (entityhuman instanceof EntityPlayer) { ++ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ // Paper end + } + } + +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0301-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0301-Duplicate-UUID-Resolve-Option.patch new file mode 100644 index 0000000000..e634f166ed --- /dev/null +++ b/Spigot-Server-Patches/0301-Duplicate-UUID-Resolve-Option.patch @@ -0,0 +1,224 @@ +From 3b96328cbca2cc941e8a10dfdc47f5970379ef8e Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 14:27:34 -0400 +Subject: [PATCH] Duplicate UUID Resolve Option + +Due to a bug in https://github.com/PaperMC/Paper/commit/2e29af3df05ec0a383f48be549d1c03200756d24 +which was added all the way back in March of 2016, it was unknown (potentially not at the time) +that an entity might actually change the seed of the random object. + +At some point, EntitySquid did start setting the seed. Due to this shared random, this caused +every entity to use a Random object with a predictable seed. + +This has caused entities to potentially generate with the same UUID.... + +Over the years, servers have had entities disappear, but no sign of trouble +because CraftBukkit removed the log lines indicating that something was wrong. + +We have fixed the root issue causing duplicate UUID's, however we now have chunk +files full of entities that have the same UUID as another entity! + +When these chunks load, the 2nd entity will not be added to the world correctly. + +If that chunk loads in a different order in the future, then it will reverse and the +missing one is now the one added to the world and not the other. This results in very +inconsistent entity behavior. + +This change allows you to recover any duplicate entity by generating a new UUID for it. +This also lets you delete them instead if you don't want to risk having new entities added to +the world that you previously did not see. + +But for those who are ok with leaving this inconsistent behavior, you may use WARN or NOTHING options. + +It is recommended you regenerate the entities, as these were legit entities, and deserve your love. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 7bd7aa0d94..5d9bed3f19 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -430,4 +430,40 @@ public class PaperWorldConfig { + log("Bed Search Radius: " + bedSearchRadius); + } + } ++ ++ public enum DuplicateUUIDMode { ++ REGEN, DELETE, NOTHING, WARN ++ } ++ public DuplicateUUIDMode duplicateUUIDMode = DuplicateUUIDMode.REGEN; ++ private void repairDuplicateUUID() { ++ String desiredMode = getString("duplicate-uuid-resolver", "regenerate").toLowerCase().trim(); ++ switch (desiredMode.toLowerCase()) { ++ case "regen": ++ case "regenerate": ++ duplicateUUIDMode = DuplicateUUIDMode.REGEN; ++ log("Duplicate UUID Resolve: Regenerate New UUID"); ++ break; ++ case "remove": ++ case "delete": ++ duplicateUUIDMode = DuplicateUUIDMode.DELETE; ++ log("Duplicate UUID Resolve: Delete Entity"); ++ break; ++ case "silent": ++ case "nothing": ++ duplicateUUIDMode = DuplicateUUIDMode.NOTHING; ++ logError("Duplicate UUID Resolve: Do Nothing (no logs) - Warning, may lose indication of bad things happening"); ++ logError("PaperMC Strongly discourages use of this setting! Triggering these messages means SOMETHING IS WRONG!"); ++ break; ++ case "log": ++ case "warn": ++ duplicateUUIDMode = DuplicateUUIDMode.WARN; ++ log("Duplicate UUID Resolve: Warn (do nothing but log it happened, may be spammy)"); ++ break; ++ default: ++ duplicateUUIDMode = DuplicateUUIDMode.WARN; ++ logError("Warning: Invalidate duplicate-uuid-resolver config " + desiredMode + " - must be one of: regen, delete, nothing, warn"); ++ log("Duplicate UUID Resolve: Warn (do nothing but log it happened, may be spammy)"); ++ break; ++ } ++ } + } +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 3ac115ff65..ba2aeb432d 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -1,5 +1,10 @@ + package net.minecraft.server; + ++// Paper start ++import com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode; ++import java.util.HashMap; ++import java.util.UUID; ++// Paper end + import com.destroystokyo.paper.exception.ServerInternalException; + import com.google.common.collect.Maps; + import com.google.common.collect.Queues; +@@ -40,6 +45,7 @@ public class Chunk implements IChunkAccess { + public final World world; + public final Map heightMap; + public Long scheduledForUnload; // Paper - delay chunk unloads ++ private static final Logger logger = LogManager.getLogger(); // Paper + public final int locX; + public final int locZ; + private boolean m; +@@ -689,6 +695,7 @@ public class Chunk implements IChunkAccess { + if (i != this.locX || j != this.locZ) { + Chunk.e.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity); + entity.die(); ++ return; // Paper + } + + int k = MathHelper.floor(entity.locY / 16.0D); +@@ -865,6 +872,39 @@ public class Chunk implements IChunkAccess { + + for (int j = 0; j < i; ++j) { + List entityslice = aentityslice[j]; // Spigot ++ // Paper start ++ DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; ++ if (mode == DuplicateUUIDMode.WARN | mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN) { ++ Map thisChunk = new HashMap<>(); ++ for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { ++ Entity entity = iterator.next(); ++ if (entity.dead) continue; ++ Entity other = ((WorldServer) world).entitiesByUUID.get(entity.uniqueID); ++ if (other == null || other.dead || world.getEntityUnloadQueue().contains(other)) { ++ other = thisChunk.get(entity.uniqueID); ++ } ++ if (other != null && !other.dead) { ++ switch (mode) { ++ case REGEN: { ++ entity.setUUID(UUID.randomUUID()); ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", regenerated UUID for " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); ++ break; ++ } ++ case DELETE: { ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); ++ entity.die(); ++ iterator.remove(); ++ break; ++ } ++ default: ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", doing nothing to " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); ++ break; ++ } ++ } ++ thisChunk.put(entity.uniqueID, entity); ++ } ++ } ++ // Paper end + + this.world.a((Collection) entityslice); + } +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 4ea52f9c59..2217ca9737 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + }); + } + ++ public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER + public void a(UUID uuid) { + this.uniqueID = uuid; + this.au = this.uniqueID.toString(); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 127dcedc97..5ee7cdc79c 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -72,7 +72,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + }; + // Spigot end +- protected final Set g = Sets.newHashSet(); // Paper ++ protected final Set g = Sets.newHashSet(); public Set getEntityUnloadQueue() { return g; };// Paper - OBFHELPER + //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list + public final List tileEntityListTick = Lists.newArrayList(); + private final List c = Lists.newArrayList(); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 747d99dbe6..7a9f28421b 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -40,7 +40,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private final MinecraftServer server; + public EntityTracker tracker; + private final PlayerChunkMap manager; +- private final Map entitiesByUUID = Maps.newHashMap(); ++ public final Map entitiesByUUID = Maps.newHashMap(); // Paper + public boolean savingDisabled; + private boolean K; + private int emptyTime; +@@ -996,14 +996,17 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.g.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +- WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper +- WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper +- if (DEBUG_ENTITIES) { +- if (entity1.addedToWorldStack != null) { +- entity1.addedToWorldStack.printStackTrace(); ++ if (entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { ++ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper ++ WorldServer.a.error("Duplicate entity {} will not be added to the world. See paper.yml duplicate-uuid-resolver and set this to either regen, delete or nothing to get rid of this message", entity); // Paper ++ if (DEBUG_ENTITIES) { ++ if (entity1.addedToWorldStack != null) { ++ entity1.addedToWorldStack.printStackTrace(); ++ } ++ getAddToWorldStackTrace(entity).printStackTrace(); + } +- getAddToWorldStackTrace(entity).printStackTrace(); + } ++ + return false; + } + +@@ -1026,7 +1029,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + } + + Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); +- if (old != null && old.getId() != entity.getId() && old.valid) { ++ if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { + Logger logger = LogManager.getLogger(); + logger.error("Overwrote an existing entity " + old + " with " + entity); + if (DEBUG_ENTITIES) { +-- +2.18.0 + diff --git a/removed/server/0023-Add-async-chunk-load-API.patch b/Spigot-Server-Patches/0302-Add-async-chunk-load-API.patch similarity index 75% rename from removed/server/0023-Add-async-chunk-load-API.patch rename to Spigot-Server-Patches/0302-Add-async-chunk-load-API.patch index 5992a89ad0..002b88c894 100644 --- a/removed/server/0023-Add-async-chunk-load-API.patch +++ b/Spigot-Server-Patches/0302-Add-async-chunk-load-API.patch @@ -1,26 +1,27 @@ -From cfeda276a4e161703f02b62d97e39a1ddd65193f Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Tue, 1 Mar 2016 23:19:01 -0600 +From a753c54e8811761c74b60be329b82c2fed32c769 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 16:55:04 -0400 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 +index 0f4a894ebb..995e02f1d2 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 { +@@ -156,6 +156,27 @@ 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() { ++ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); // TODO: Add back async variant ++ /*cps.getChunkAt(x, z, new Runnable() { + @Override + public void run() { + callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); + } -+ }); ++ });*/ + } + + public void getChunkAtAsync(Block block, ChunkLoadCallback callback) { diff --git a/removed/server/0292-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch b/Spigot-Server-Patches/0303-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch similarity index 58% rename from removed/server/0292-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch rename to Spigot-Server-Patches/0303-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch index 5c6925a575..0a0b84f850 100644 --- a/removed/server/0292-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch +++ b/Spigot-Server-Patches/0303-Configurable-Allowance-of-Permanent-Chunk-Loaders.patch @@ -1,4 +1,4 @@ -From b3c4cbe3e4019d14276d36954449d2d91825336a Mon Sep 17 00:00:00 2001 +From 1be6de780667fdfdb842f80bfa0730a70371895d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Apr 2018 11:21:48 -0400 Subject: [PATCH] Configurable Allowance of Permanent Chunk Loaders @@ -7,14 +7,13 @@ This disables the behavior that allows players to keep chunks permanently loaded by default and allows server operators to enable it if they wish. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5a2fbf7c7..99d681ef1 100644 +index ba6d5b7ff5..b9f5f49055 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -507,4 +507,10 @@ public class PaperWorldConfig { - private void disableSprintInterruptionOnAttack() { - disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); +@@ -466,4 +466,9 @@ public class PaperWorldConfig { + break; + } } -+ + public boolean allowPermaChunkLoaders = false; + private void allowPermaChunkLoaders() { + allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders); @@ -22,18 +21,18 @@ index 5a2fbf7c7..99d681ef1 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 55dada668..0eba3df57 100644 +index 7d77c5fb31..fd8430a68f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -148,7 +148,7 @@ public class ChunkProviderServer implements IChunkProvider { - } +@@ -111,7 +111,7 @@ public class ChunkProviderServer implements IChunkProvider { + Long2ObjectMap long2objectmap = this.chunks; - public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) { -- Chunk chunk = getLoadedChunkAt(i, j); -+ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders - ChunkRegionLoader loader = null; + synchronized (this.chunks) { +- Chunk chunk = this.getLoadedChunkAt(i, j); ++ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders - if (this.chunkLoader instanceof ChunkRegionLoader) { + return chunk != null ? chunk : this.loadChunkAt(i, j); + } -- 2.18.0 diff --git a/removed/server/0174-Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/0304-Speedup-BlockPos-by-fixing-inlining.patch similarity index 50% rename from removed/server/0174-Speedup-BlockPos-by-fixing-inlining.patch rename to Spigot-Server-Patches/0304-Speedup-BlockPos-by-fixing-inlining.patch index 82925800bb..b7cc0fd14b 100644 --- a/removed/server/0174-Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/0304-Speedup-BlockPos-by-fixing-inlining.patch @@ -1,4 +1,4 @@ -From 3492554953e265e90b7507d8085b7ee78ab418fc Mon Sep 17 00:00:00 2001 +From 6fe1ca8e8466247070481df3b515bba54cec603f Mon Sep 17 00:00:00 2001 From: Techcable Date: Wed, 30 Nov 2016 20:56:58 -0600 Subject: [PATCH] Speedup BlockPos by fixing inlining @@ -21,95 +21,113 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 679d5504e..8e737718e 100644 +index 58f8b4b72..98992513d 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -7,11 +7,12 @@ import javax.annotation.concurrent.Immutable; +@@ -7,22 +7,22 @@ import javax.annotation.concurrent.Immutable; public class BaseBlockPosition implements Comparable { public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); - private final int a; - private final int b; - private final int c; -- // Paper start -- public boolean isValidLocation() { -+ // Paper start - Make mutable and protected for MutableBlockPos and PooledBlockPos -+ protected int a; -+ protected int b; -+ protected int c; -+ -+ public final boolean isValidLocation() { - return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; + // Paper start ++ protected int x; ++ protected int y; ++ protected int z; + public boolean isValidLocation() { +- return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; ++ return x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000 && y >= 0 && y < 256; } public boolean isInvalidYLocation() { -@@ -49,17 +50,19 @@ public class BaseBlockPosition implements Comparable { +- return b < 0 || b >= 256; ++ return y < 0 || y >= 256; + } + // Paper end + + public BaseBlockPosition(int i, int j, int k) { +- this.a = i; +- this.b = j; +- this.c = k; ++ this.x = i; ++ this.y = j; ++ this.z = k; + } + + public BaseBlockPosition(double d0, double d1, double d2) { +@@ -49,17 +49,19 @@ public class BaseBlockPosition implements Comparable { return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); } - public int getX() { -+ // Paper start - Only allow a single implementation +- return this.a; ++ // Paper start + public final int getX() { - return this.a; ++ return this.x; } -- public int getY() { -+ public final int getY() { - return this.b; + public int getY() { +- return this.b; ++ return this.y; } -- public int getZ() { -+ public final int getZ() { - return this.c; + public int getZ() { +- return this.c; ++ return this.z; } + // Paper end public BaseBlockPosition d(BaseBlockPosition baseblockposition) { return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index b3c1f550c..6a0b3a62d 100644 +index 252e00e16..f769b178c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -211,19 +211,21 @@ public class BlockPosition extends BaseBlockPosition { - if (this.b == null) { - this.b = new BlockPosition.MutableBlockPosition(i, j, k); - return this.b; -- } else if (this.b.b == l && this.b.c == i1 && this.b.d == j1) { -+ // Paper start - b, c, d, refer to x, y, z, and as such, a, b, c of BaseBlockPosition -+ } else if (((BaseBlockPosition)this.b).a == l && ((BaseBlockPosition)this.b).b == i1 && ((BaseBlockPosition)this.b).c == j1) { - return (BlockPosition.MutableBlockPosition) this.endOfData(); - } else { -- if (this.b.b < l) { -- ++this.b.b; -- } else if (this.b.c < i1) { -- this.b.b = i; -- ++this.b.c; -- } else if (this.b.d < j1) { -- this.b.b = i; -- this.b.c = j; -- ++this.b.d; -+ if (((BaseBlockPosition) this.b).a < l) { -+ ++((BaseBlockPosition) this.b).a; -+ } else if (((BaseBlockPosition) this.b).b < i1) { -+ ((BaseBlockPosition) this.b).a = i; -+ ++((BaseBlockPosition) this.b).b; -+ } else if (((BaseBlockPosition) this.b).c < j1) { -+ ((BaseBlockPosition) this.b).a = i; -+ ((BaseBlockPosition) this.b).b = j; -+ ++((BaseBlockPosition) this.b).c; - } +@@ -207,18 +207,20 @@ public class BlockPosition extends BaseBlockPosition { + if (this.g == null) { + this.g = new BlockPosition.MutableBlockPosition(i, j, k); + return this.g; +- } else if (this.g.b == l && this.g.c == i1 && this.g.d == j1) { ++ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { // Paper + return (BlockPosition.MutableBlockPosition) this.endOfData(); + } else { +- if (this.g.b < l) { +- ++this.g.b; +- } else if (this.g.c < i1) { +- this.g.b = i; // Paper - Readd line removed by the decompiler +- ++this.g.c; +- } else if (this.g.d < j1) { +- this.g.b = i; // Paper - Readd line removed by the decompiler +- this.g.c = j; // Paper - Readd line removed by the decompiler +- ++this.g.d; ++ // Paper start - use xyz ++ if (this.g.x < l) { ++ ++this.g.x; ++ } else if (this.g.y < i1) { ++ this.g.x = i; // Paper - Readd line removed by the decompiler ++ ++this.g.y; ++ } else if (this.g.z < j1) { ++ this.g.x = i; // Paper - Readd line removed by the decompiler ++ this.g.y = j; // Paper - Readd line removed by the decompiler ++ ++this.g.z; + // Paper end - - return this.b; } -@@ -338,6 +340,8 @@ public class BlockPosition extends BaseBlockPosition { + + return this.g; +@@ -338,10 +340,12 @@ public class BlockPosition extends BaseBlockPosition { public static class MutableBlockPosition extends BlockPosition { -+ // Paper start - Remove variables ++ // Paper start - comment out + /* protected int b; protected int c; protected int d; +- // Paper start ++ + @Override + public boolean isValidLocation() { + return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256; @@ -350,6 +354,7 @@ public class BlockPosition extends BaseBlockPosition { public boolean isInvalidYLocation() { return c < 0 || c >= 256; @@ -118,64 +136,71 @@ index b3c1f550c..6a0b3a62d 100644 // Paper end public MutableBlockPosition() { -@@ -362,9 +367,11 @@ public class BlockPosition extends BaseBlockPosition { +@@ -361,10 +366,13 @@ public class BlockPosition extends BaseBlockPosition { + } public MutableBlockPosition(int i, int j, int k) { - super(0, 0, 0); -- this.b = i; -- this.c = j; +- super(0, 0, 0); ++ // Paper start ++ super(i, j, k); ++ /* + this.b = i; + this.c = j; - this.d = k; -+ // Paper start - Modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).b = j; -+ ((BaseBlockPosition) this).c = k; ++ this.d = k;*/ + // Paper end } public BlockPosition a(double d0, double d1, double d2) { -@@ -383,6 +390,8 @@ public class BlockPosition extends BaseBlockPosition { +@@ -383,6 +391,8 @@ public class BlockPosition extends BaseBlockPosition { return super.a(enumblockrotation).h(); } -+ // Paper start - Use superclass methods + /* ++ // Paper start - use parent getters public int getX() { return this.b; } -@@ -394,12 +403,16 @@ public class BlockPosition extends BaseBlockPosition { +@@ -393,13 +403,16 @@ public class BlockPosition extends BaseBlockPosition { + public int getZ() { return this.d; - } -+ */ +- } ++ }*/ + // Paper end - public void setValues(int x, int y, int z) { c(x, y, z); } // Paper - OBFHELPER + public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return c(i, j, k);} // Paper - OBFHELPER public BlockPosition.MutableBlockPosition c(int i, int j, int k) { - this.b = i; - this.c = j; - this.d = k; -+ // Paper start - Modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).b = j; -+ ((BaseBlockPosition) this).c = k; ++ // Paper start - use xyz ++ this.x = i; ++ this.y = j; ++ this.z = k; + // Paper end return this; } -@@ -416,11 +429,11 @@ public class BlockPosition extends BaseBlockPosition { +@@ -417,15 +430,15 @@ public class BlockPosition extends BaseBlockPosition { } public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { - return this.c(this.b + enumdirection.getAdjacentX() * i, this.c + enumdirection.getAdjacentY() * i, this.d + enumdirection.getAdjacentZ() * i); -+ return this.c(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); // Paper - USE THE BLEEPING GETTERS ++ return this.c(x + enumdirection.getAdjacentX() * i, y + enumdirection.getAdjacentY() * i, z + enumdirection.getAdjacentZ() * i); // Paper - use xyz + } + + public BlockPosition.MutableBlockPosition d(int i, int j, int k) { +- return this.c(this.b + i, this.c + j, this.d + k); ++ return this.c(x + i, y + j, z + k); // Paper - use xyz } public void p(int i) { - this.c = i; -+ ((BaseBlockPosition) this).b = i; // Paper - Modify base variable ++ this.y = i; // Paper change to y } public BlockPosition h() { -- -2.18.0 +2.16.1.windows.1 diff --git a/Spigot-Server-Patches/0305-Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/0305-Don-t-save-Proto-Chunks.patch new file mode 100644 index 0000000000..a9273c1ef9 --- /dev/null +++ b/Spigot-Server-Patches/0305-Don-t-save-Proto-Chunks.patch @@ -0,0 +1,37 @@ +From 29f7275b4762c83996dee6cd72fa71af7adc0f81 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 22 Jul 2018 21:21:41 -0400 +Subject: [PATCH] Don't save Proto Chunks + +These chunks are unfinished, and waste cpu time saving these unfinished chunks. +the loadChunk method refuses to acknoledge they exists, and will restart +a new chunk generation process to begin with, so saving them serves no benefit. + +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index 5fd0c0cf50..43348a627f 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -282,6 +282,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + + public synchronized void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict { ++ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks + // Spigot end + world.checkSession(); + +diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +index 501565dd5d..7b30687530 100644 +--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java ++++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +@@ -23,7 +23,7 @@ public class ChunkTaskScheduler extends Scheduler +Date: Mon, 23 Jul 2018 13:08:19 -0400 +Subject: [PATCH] Optimize RegistryID.c() + +This is a frequent hotspot for world loading/saving. + +diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java +index bde5714dd6..a01cda9d81 100644 +--- a/src/main/java/net/minecraft/server/RegistryID.java ++++ b/src/main/java/net/minecraft/server/RegistryID.java +@@ -14,12 +14,14 @@ public class RegistryID implements Registry { // Paper - decompile fix + private K[] d; + private int e; + private int f; ++ private java.util.BitSet usedIds; // Paper + + public RegistryID(int i) { + i = (int) ((float) i / 0.8F); + this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; + this.d = (K[]) (new Object[i]); // Paper - decompile fix ++ this.usedIds = new java.util.BitSet(); // Paper + } + + public int getId(@Nullable K k0) { +@@ -43,9 +45,14 @@ public class RegistryID implements Registry { // Paper - decompile fix + } + + private int c() { ++ // Paper start ++ /* + while (this.e < this.d.length && this.d[this.e] != null) { + ++this.e; + } ++ */ ++ this.e = this.usedIds.nextClearBit(0); ++ // Paper end + + return this.e; + } +@@ -59,6 +66,7 @@ public class RegistryID implements Registry { // Paper - decompile fix + this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.e = 0; + this.f = 0; ++ this.usedIds.clear(); // Paper + + for (int j = 0; j < aobject.length; ++j) { + if (aobject[j] != null) { +@@ -84,6 +92,7 @@ public class RegistryID implements Registry { // Paper - decompile fix + this.b[k] = k0; + this.c[k] = i; + this.d[i] = k0; ++ this.usedIds.set(i); // Paper + ++this.f; + if (i == this.e) { + ++this.e; +@@ -148,6 +157,7 @@ public class RegistryID implements Registry { // Paper - decompile fix + Arrays.fill(this.d, (Object) null); + this.e = 0; + this.f = 0; ++ this.usedIds.clear(); // Paper + } + + public int b() { +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0307-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0307-Option-to-prevent-armor-stands-from-doing-entity-loo.patch new file mode 100644 index 0000000000..c8f9f70135 --- /dev/null +++ b/Spigot-Server-Patches/0307-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -0,0 +1,52 @@ +From 51044d9a361f21f02b6c9fadb0a9d9d5e37d636c Mon Sep 17 00:00:00 2001 +From: Hugo Manrique +Date: Mon, 23 Jul 2018 12:57:39 +0200 +Subject: [PATCH] Option to prevent armor stands from doing entity lookups + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index b9f5f49055..aa95372e69 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -350,6 +350,11 @@ public class PaperWorldConfig { + } + } + ++ public boolean armorStandEntityLookups = true; ++ private void armorStandEntityLookups() { ++ armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); ++ } ++ + public int maxCollisionsPerEntity; + private void maxEntityCollision() { + maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 127dcedc97..72e22c09ba 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -11,6 +11,7 @@ import java.util.Iterator; + import java.util.List; + import java.util.Random; + import java.util.UUID; ++ + import java.util.function.Function; + import java.util.function.Predicate; + import java.util.function.Supplier; +@@ -1562,6 +1563,14 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + } + ++ // Paper start - Prevent armor stands from doing entity lookups ++ @Override ++ public boolean getCubes(@Nullable Entity entity, AxisAlignedBB axisAlignedBB) { ++ if (entity instanceof EntityArmorStand && !entity.world.paperConfig.armorStandEntityLookups) return false; ++ return GeneratorAccess.super.getCubes(entity, axisAlignedBB); ++ } ++ // Paper end ++ + public boolean a(AxisAlignedBB axisalignedbb) { + int i = MathHelper.floor(axisalignedbb.a); + int j = MathHelper.f(axisalignedbb.d); +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0308-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0308-Vanished-players-don-t-have-rights.patch new file mode 100644 index 0000000000..2df9b513f2 --- /dev/null +++ b/Spigot-Server-Patches/0308-Vanished-players-don-t-have-rights.patch @@ -0,0 +1,129 @@ +From 56fc9a41a74bf432c9c846abb6fd7568eb3d4e8e Mon Sep 17 00:00:00 2001 +From: Hugo Manrique +Date: Mon, 23 Jul 2018 14:22:26 +0200 +Subject: [PATCH] Vanished players don't have rights + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 9f2a23d693..e657778469 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -92,7 +92,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + private static int entityCount; + private final EntityTypes g; public EntityTypes getEntityType() { return g; } // Paper - OBFHELPER + private int id; +- public boolean j; ++ public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER + public final List passengers; + protected int k; + private Entity ax; +diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java +index c8f305e6d6..b57f6efb3a 100644 +--- a/src/main/java/net/minecraft/server/IBlockData.java ++++ b/src/main/java/net/minecraft/server/IBlockData.java +@@ -179,6 +179,7 @@ public interface IBlockData extends IBlockDataHolder { + return this.getBlock().a(this, iblockaccess, blockposition); + } + ++ default VoxelShape getBlockShape(IBlockAccess iblockaccess, BlockPosition blockposition) { return h(iblockaccess, blockposition); } // Paper - OBFHELPER + default VoxelShape h(IBlockAccess iblockaccess, BlockPosition blockposition) { + return this.getBlock().f(this, iblockaccess, blockposition); + } +diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java +index 1cecccef23..afc881d9af 100644 +--- a/src/main/java/net/minecraft/server/ItemBlock.java ++++ b/src/main/java/net/minecraft/server/ItemBlock.java +@@ -70,7 +70,8 @@ public class ItemBlock extends Item { + + protected boolean b(BlockActionContext blockactioncontext, IBlockData iblockdata) { + // CraftBukkit start - store default return +- boolean defaultReturn = iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()) && blockactioncontext.getWorld().a(iblockdata, blockactioncontext.getClickPosition()); ++ final World world = blockactioncontext.getWorld(); // Paper ++ boolean defaultReturn = iblockdata.canPlace(world, blockactioncontext.getClickPosition()) && world.a(iblockdata, blockactioncontext.getClickPosition()) && world.checkNoVisiblePlayerCollisions(blockactioncontext.getEntity(), iblockdata.getBlockShape(world, blockactioncontext.getClickPosition())); // Paper - Use our entity search + + BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), CraftBlockData.fromData(iblockdata), defaultReturn); + blockactioncontext.getWorld().getServer().getPluginManager().callEvent(event); +diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java +index 53c9f21887..71e4084320 100644 +--- a/src/main/java/net/minecraft/server/VoxelShape.java ++++ b/src/main/java/net/minecraft/server/VoxelShape.java +@@ -22,6 +22,7 @@ public abstract class VoxelShape { + return this.a(enumdirection_enumaxis, this.a.b(enumdirection_enumaxis)); + } + ++ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER + public AxisAlignedBB a() { + if (this.b()) { + throw new UnsupportedOperationException("No bounds for empty shape."); +@@ -40,6 +41,7 @@ public abstract class VoxelShape { + + protected abstract DoubleList a(EnumDirection.EnumAxis enumdirection_enumaxis); + ++ public boolean isEmpty() { return b(); } // Paper - OBFHELPER + public boolean b() { + return this.a.a(); + } +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 72e22c09ba..6d80e55c19 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -1545,6 +1545,37 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + } + ++ // Paper start - Based on method below ++ /** ++ * @param entity causing the action ex. block placer ++ * @param voxelshape area to search within ++ * @return if there are no visible players colliding ++ */ ++ public boolean checkNoVisiblePlayerCollisions(@Nullable Entity entity, VoxelShape voxelshape) { ++ if (voxelshape.isEmpty()) { ++ return true; ++ } else { ++ List list = this.getEntities((Entity) null, voxelshape.getBounds()); ++ ++ for (int i = 0; i < list.size(); ++i) { ++ Entity entity1 = (Entity) list.get(i); ++ ++ if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) { ++ if (!((EntityPlayer) entity).getBukkitEntity().canSee(((EntityPlayer) entity1).getBukkitEntity())) { ++ continue; ++ } ++ } ++ ++ if (!entity1.dead && entity1.blocksEntitySpawning()) { ++ return false; ++ } ++ } ++ ++ return true; ++ } ++ } ++ // Paper end ++ + public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { + if (voxelshape.b()) { + return true; +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index cf398cd250..140ddae0d7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -804,6 +804,14 @@ public class CraftEventFactory { + Projectile projectile = (Projectile) entity.getBukkitEntity(); + org.bukkit.entity.Entity collided = position.entity.getBukkitEntity(); + com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); ++ ++ if (projectile.getShooter() instanceof Player && collided instanceof Player) { ++ if (!((Player) projectile.getShooter()).canSee((Player) collided)) { ++ event.setCancelled(true); ++ return event; ++ } ++ } ++ + Bukkit.getPluginManager().callEvent(event); + return event; + } +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0309-Thread-Safe-Iteration-of-Chunk-Scheduler.patch b/Spigot-Server-Patches/0309-Thread-Safe-Iteration-of-Chunk-Scheduler.patch new file mode 100644 index 0000000000..7b38d60df0 --- /dev/null +++ b/Spigot-Server-Patches/0309-Thread-Safe-Iteration-of-Chunk-Scheduler.patch @@ -0,0 +1,47 @@ +From e03f8b9d7954cb8b1b292d87e3945393e19fb521 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 19:13:06 -0400 +Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler + + +diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +index 7629e0d054..5ee8bedf34 100644 +--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java ++++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +@@ -1,8 +1,10 @@ + package net.minecraft.server; + ++import com.google.common.collect.Lists; + import it.unimi.dsi.fastutil.longs.Long2ObjectMap; + import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; + import java.io.IOException; ++import java.util.ArrayList; + import java.util.EnumMap; + import java.util.Map; + import java.util.function.Consumer; +@@ -85,7 +87,13 @@ public class ChunkTaskScheduler extends Scheduler { ++ // Paper start ++ ArrayList list; ++ synchronized (this.g) { ++ list = Lists.newArrayList(this.g.values()); ++ } ++ list.forEach((scheduler_a) -> { ++ // Paper end + ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); + + if (protochunk.h() && protochunk.i().d() == ChunkStatus.Type.PROTOCHUNK) { +@@ -93,6 +101,7 @@ public class ChunkTaskScheduler extends Scheduler +Date: Mon, 23 Jul 2018 22:18:31 -0400 +Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it + saves + + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 95c6812d7d..aa75cc4205 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -714,6 +714,7 @@ public class Chunk implements IChunkAccess { + entity.ag = this.locZ; + this.entitySlices[k].add(entity); + // Paper start ++ this.markDirty(); + if (entity instanceof EntityItem) { + itemCounts[k]++; + } else if (entity instanceof IInventory) { +@@ -745,6 +746,7 @@ public class Chunk implements IChunkAccess { + if (!this.entitySlices[i].remove(entity)) { + return; + } ++ this.markDirty(); + if (entity instanceof EntityItem) { + itemCounts[i]--; + } else if (entity instanceof IInventory) { +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0311-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0311-Add-some-Debug-to-Chunk-Entity-slices.patch new file mode 100644 index 0000000000..fdcdcca7ca --- /dev/null +++ b/Spigot-Server-Patches/0311-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -0,0 +1,77 @@ +From 56148e925de0b60c171955575e92691cf2fb5457 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 22:44:23 -0400 +Subject: [PATCH] Add some Debug to Chunk Entity slices + +If we detect unexpected state, log and try to recover + +This should hopefully avoid duplicate entities ever being created +if the entity was to end up in 2 different chunk slices + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index aa75cc4205..56a74c6062 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -712,8 +712,33 @@ public class Chunk implements IChunkAccess { + entity.ae = this.locX; + entity.af = k; + entity.ag = this.locZ; +- this.entitySlices[k].add(entity); ++ + // Paper start ++ List entitySlice = this.entitySlices[k]; ++ boolean inThis = entitySlice.contains(entity); ++ if (entity.entitySlice != null || inThis) { ++ if (entity.entitySlice == entitySlice || inThis) { ++ LogManager.getLogger().warn(entity + " was already in this chunk section! Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ new Throwable().printStackTrace(); ++ return; ++ } else { ++ LogManager.getLogger().warn(entity + " is still in another ChunkSection! Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ ++ Chunk chunk = entity.getCurrentChunk(); ++ if (chunk != null) { ++ if (chunk != this) { ++ LogManager.getLogger().warn(entity + " was in another chunk at that! " + chunk.locX + "," + chunk.locZ); ++ } ++ chunk.removeEntity(entity); ++ } else { ++ removeEntity(entity); ++ } ++ new Throwable().printStackTrace(); ++ } ++ } ++ entity.entitySlice = entitySlice; ++ entitySlice.add(entity); ++ + this.markDirty(); + if (entity instanceof EntityItem) { + itemCounts[k]++; +@@ -746,6 +771,12 @@ public class Chunk implements IChunkAccess { + if (!this.entitySlices[i].remove(entity)) { + return; + } ++ if (entitySlices[i] == entity.entitySlice) { ++ entity.entitySlice = null; ++ } else { ++ LogManager.getLogger().warn(entity + " was removed from a entitySlice we did not expect. Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ new Throwable().printStackTrace(); ++ } + this.markDirty(); + if (entity instanceof EntityItem) { + itemCounts[i]--; +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index e657778469..85358902ff 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -63,6 +63,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + } + }; ++ Object entitySlice = null; + // Paper end + static boolean isLevelAtLeast(NBTTagCompound tag, int level) { + return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0312-Optimize-Region-File-Cache.patch b/Spigot-Server-Patches/0312-Optimize-Region-File-Cache.patch new file mode 100644 index 0000000000..f5bb01387f --- /dev/null +++ b/Spigot-Server-Patches/0312-Optimize-Region-File-Cache.patch @@ -0,0 +1,67 @@ +From fb53e1fd3777d4bde51f4ac9a6e8fa0e623cd074 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 23:40:04 -0400 +Subject: [PATCH] Optimize Region File Cache + +CraftBukkit added synchronization to read and write methods. This adds +much more contention on this object for accessing region files, as +the entire read and write of NBT data is now a blocking operation. + +This causes issues when something then simply needs to check if a chunk exists +on the main thread, causing a block... + +However, this synchronization was unnecessary, because there is already +enough synchronization done to keep things safe + +1) Obtaining a Region File: Those methods are still static synchronized. + Meaning we can safely obtain a Region File concurrently. + +2) RegionFile data access: Methods reading and manipulating data from + a region file are also marked synchronized, ensuring that no 2 processes + are reading or writing data at the same time. + +3) Checking a region file for chunkExists: getOffset is also synchronized + ensuring that even if a chunk is currently being written, it will be safe. + +By removing these synchronizations, we reduce the locking to only +when data is being write or read. + +GZIP compression and NBT Buffer creation will no longer be part of the +synchronized context, reducing lock times. + +Ultimately: This brings us back to Vanilla, which has had no indication of region file loss. + +diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java +index 3b8d01ea1a..609d6c3550 100644 +--- a/src/main/java/net/minecraft/server/RegionFileCache.java ++++ b/src/main/java/net/minecraft/server/RegionFileCache.java +@@ -97,7 +97,7 @@ public class RegionFileCache { + + @Nullable + // CraftBukkit start - call sites hoisted for synchronization +- public static synchronized NBTTagCompound read(File file, int i, int j) throws IOException { ++ public static NBTTagCompound read(File file, int i, int j) throws IOException { // Paper - remove synchronization + RegionFile regionfile = a(file, i, j); + + DataInputStream datainputstream = regionfile.a(i & 31, j & 31); +@@ -110,7 +110,7 @@ public class RegionFileCache { + } + + @Nullable +- public static synchronized void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { ++ public static void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { // Paper - remove synchronization + RegionFile regionfile = a(file, i, j); + + DataOutputStream dataoutputstream = regionfile.c(i & 31, j & 31); +@@ -119,7 +119,7 @@ public class RegionFileCache { + } + // CraftBukkit end + +- public static synchronized boolean chunkExists(File file, int i, int j) { ++ public static boolean chunkExists(File file, int i, int j) { // Paper - remove synchronization + RegionFile regionfile = b(file, i, j); + + return regionfile != null ? regionfile.d(i & 31, j & 31) : false; +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0313-repair-bad-rcon.ip-settings-temporarily.patch b/Spigot-Server-Patches/0313-repair-bad-rcon.ip-settings-temporarily.patch new file mode 100644 index 0000000000..21ec718fe9 --- /dev/null +++ b/Spigot-Server-Patches/0313-repair-bad-rcon.ip-settings-temporarily.patch @@ -0,0 +1,24 @@ +From 59f7266c560b61d7e1e15e304a92282d3548b1b0 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 25 Jul 2018 01:21:05 -0400 +Subject: [PATCH] repair bad rcon.ip settings temporarily + +accidently missed mapping change, and we defaulted rcon.ip to the server.properties file path + +clean up values for people, drop this patch after like 2 weeks. + +diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java +index c237f239f3..1319b3b916 100644 +--- a/src/main/java/net/minecraft/server/RemoteControlListener.java ++++ b/src/main/java/net/minecraft/server/RemoteControlListener.java +@@ -25,6 +25,7 @@ public class RemoteControlListener extends RemoteConnectionThread { + this.h = iminecraftserver.a("rcon.port", 0); + this.l = iminecraftserver.a("rcon.password", ""); + this.j = iminecraftserver.a("rcon.ip", ((DedicatedServer) iminecraftserver).getServerIp()); // Paper ++ if (this.j.equals(iminecraftserver.d_())) this.j = ((DedicatedServer) iminecraftserver).getServerIp(); // Paper - temporary - remove this after like 2 weeks - repair bad settings + this.i = iminecraftserver.f(); + if (0 == this.h) { + this.h = this.i + 10; +-- +2.18.0 + diff --git a/Spigot-Server-Patches/0314-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0314-Prevent-Saving-Bad-entities-to-chunks.patch new file mode 100644 index 0000000000..2acd863922 --- /dev/null +++ b/Spigot-Server-Patches/0314-Prevent-Saving-Bad-entities-to-chunks.patch @@ -0,0 +1,87 @@ +From 95116432cfa374f39797e4e998f50223478d15c5 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 26 Jul 2018 00:11:12 -0400 +Subject: [PATCH] Prevent Saving Bad entities to chunks + +See https://github.com/PaperMC/Paper/issues/1223 + +Minecraft is saving invalid entities to the chunk files. + +Avoid saving bad data, and also make improvements to handle +loading these chunks. Any invalid entity will be instant killed, +so lets avoid adding it to the world... + +This lets us be safer about the dupe UUID resolver too, as now +we can ignore instant killed entities and avoid risk of duplicating +an invalid entity. + +This should reduce log occurrences of dupe uuid messages. + +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index a97e024ec4..bd52bf6561 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -561,11 +561,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + + Iterator iterator; + ++ java.util.List toUpdate = new java.util.ArrayList<>(); // Paper + for (int j = 0; j < chunk.getEntitySlices().length; ++j) { + iterator = chunk.getEntitySlices()[j].iterator(); + + while (iterator.hasNext()) { + Entity entity = (Entity) iterator.next(); ++ // Paper start ++ if ((int)Math.floor(entity.locX) >> 4 != chunk.locX || (int)Math.floor(entity.locZ) >> 4 != chunk.locZ) { ++ LogManager.getLogger().warn(entity + " is not in this chunk, skipping save. This a bug fix to a vanilla bug. Do not report this to PaperMC please."); ++ toUpdate.add(entity); ++ continue; ++ } ++ if (entity.dead) { ++ continue; ++ } ++ // Paper end + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + + if (entity.d(nbttagcompound1)) { +@@ -574,6 +585,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + } + } ++ // Paper start - move entities to the correct chunk ++ for (Entity entity : toUpdate) { ++ world.entityJoinedWorld(entity, false); ++ } ++ // Paper end + + nbttagcompound.set("Entities", nbttaglist1); + NBTTagList nbttaglist2 = new NBTTagList(); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index a66770e241..1f58042125 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -1053,7 +1053,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + + this.getChunkAt(i, j).a(entity); +- this.entityList.add(entity); ++ if (!entity.dead) this.entityList.add(entity); // Paper - don't add dead entities, chunk registration may of killed it + this.b(entity); + return true; + } +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 7a9f28421b..b57e1ff364 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -992,7 +992,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + if (this.entitiesByUUID.containsKey(uuid)) { + Entity entity1 = (Entity) this.entitiesByUUID.get(uuid); + +- if (this.g.contains(entity1)) { ++ if (this.g.contains(entity1) || entity1.dead) { // Paper - overwrite the current dead one + this.g.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +-- +2.18.0 + diff --git a/paper b/paper index 24bc958b55..f80040c8f6 100755 --- a/paper +++ b/paper @@ -99,7 +99,7 @@ case "$1" in "e" | "edit") case "$2" in "s" | "server") - export LAST_EDIT="$basedir/Paper-Server" + export PAPER_LAST_EDIT="$basedir/Paper-Server" cd "$basedir/Paper-Server" ( set -e @@ -110,7 +110,7 @@ case "$1" in ) ;; "a" | "api") - export LAST_EDIT="$basedir/Paper-API" + export PAPER_LAST_EDIT="$basedir/Paper-API" cd "$basedir/Paper-API" ( set -e @@ -121,8 +121,8 @@ case "$1" in ) ;; "c" | "continue") - cd "$LAST_EDIT" - unset LAST_EDIT + cd "$PAPER_LAST_EDIT" + unset PAPER_LAST_EDIT ( set -e diff --git a/removed/server/0001-Async-Chunk-Load.patch b/removed/server/0001-Async-Chunk-Load.patch new file mode 100644 index 0000000000..80bfcf68f1 --- /dev/null +++ b/removed/server/0001-Async-Chunk-Load.patch @@ -0,0 +1,564 @@ +From c47e8c9505057b7a6f429a5c36065be1c783cfda Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 26 Jul 2018 01:28:00 -0400 +Subject: [PATCH] Async Chunk Load + +Current unfinished, not working progress +--- + .../minecraft/server/ChunkProviderServer.java | 118 +++++++++++++++--- + .../minecraft/server/ChunkRegionLoader.java | 14 ++- + .../java/net/minecraft/server/MCUtil.java | 35 ++++-- + .../net/minecraft/server/MinecraftServer.java | 1 + + .../net/minecraft/server/PlayerChunk.java | 14 ++- + .../org/bukkit/craftbukkit/CraftWorld.java | 10 +- + .../craftbukkit/chunkio/ChunkIOProvider.java | 42 +++++-- + .../craftbukkit/chunkio/QueuedChunk.java | 8 ++ + .../util/AsynchronousExecutor.java | 6 +- + 9 files changed, 191 insertions(+), 57 deletions(-) + +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 0e0c7b1abe..e72f43e2c8 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -108,13 +108,33 @@ public class ChunkProviderServer implements IChunkProvider { + + @Nullable + public Chunk getOrLoadChunkAt(int i, int j) { +- Long2ObjectMap long2objectmap = this.chunks; +- +- synchronized (this.chunks) { +- Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders ++ // Paper start ++ return getOrLoadChunkAt(i, j, null); ++ } ++ public Chunk getOrLoadChunkAt(int i, int j, Runnable runnable) { ++ // Paper - remove synchronized ++ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders ++ if (!this.chunkLoader.chunkExists(i, j)) { ++ return null; ++ } ++ long key = ChunkCoordIntPair.asLong(i, j); ++ synchronized (pendingGenerates) { ++ if (pendingGenerates.containsKey(key)) { ++ return null; // let getChunkAt handle it ++ } ++ } + +- return chunk != null ? chunk : this.loadChunkAt(i, j); ++ if (chunk == null && runnable != null) { ++ ChunkIOExecutor.queueChunkLoad(world, (ChunkRegionLoader) this.chunkLoader, this, i, j, runnable); ++ return null; ++ } ++ if (chunk == null) { ++ chunk = ChunkIOExecutor.syncChunkLoad(world, (ChunkRegionLoader) chunkLoader, this, i, j); + } ++ if (chunk != null && runnable != null) { ++ runnable.run(); ++ } ++ return chunk; + } + + // CraftBukkit start +@@ -123,20 +143,74 @@ public class ChunkProviderServer implements IChunkProvider { + } + // CraftBukkit end + ++ // Paper sart ++ private final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap> pendingGenerates = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(); ++ public CompletableFuture generateChunk(int i, int j) { // Incase something else calls this ++ return generateChunk(i, j, null); ++ } ++ ++ private CompletableFuture postChunkgenMain(ProtoChunk proto) { ++ CompletableFuture pending = new CompletableFuture<>(); ++ MCUtil.ensureChunkMain(() -> { ++ try { ++ pending.complete(this.finishChunkgen(proto)); ++ } catch (Exception e) { ++ pending.completeExceptionally(e); ++ } ++ }); ++ return pending; ++ } ++ public CompletableFuture generateChunk(int i, int j, Consumer consumer) { ++ long key = ChunkCoordIntPair.asLong(i, j); ++ CompletableFuture pending; ++ boolean generate = false; ++ synchronized (pendingGenerates) { ++ pending = pendingGenerates.get(key); ++ if (pending == null) { ++ pending = new CompletableFuture<>(); ++ pendingGenerates.put(key, pending); ++ generate = true; ++ } ++ } ++ if (generate) { ++ this.generateChunk0(i, j).thenApply(chunk -> { ++ synchronized (pendingGenerates) { ++ pendingGenerates.remove(key); ++ } ++ return chunk; ++ }).thenAccept(pending::complete); ++ } ++ ++ if (consumer != null) { ++ pending.thenAccept(chunk -> MCUtil.ensureMain(() -> consumer.accept(chunk))); ++ } ++ return pending; ++ } ++ + public Chunk getChunkAt(int i, int j) { +- Chunk chunk = this.getOrLoadChunkAt(i, j); ++ return getChunkAt(i, j, null, true); ++ } ++ public Chunk getChunkAt(int i, int j, Runnable runnable) { ++ return getChunkAt(i, j, runnable, true); ++ } ++ public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) { ++ // Paper end ++ //calling into self and blocking? ++ Chunk chunk = this.getOrLoadChunkAt(i, j, runnable); + + if (chunk != null) { + return chunk; +- } else { ++ } else if (generate) { + try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { +- ; // Spigot +- chunk = (Chunk) this.generateChunk(i, j).get(); +- return chunk; +- } catch (ExecutionException | InterruptedException interruptedexception) { ++ // Paper start ++ CompletableFuture pending = generateChunk(i, j, runnable != null ? unused -> runnable.run() : null); ++ return runnable != null ? null : MCUtil.processChunkQueueWhileWaiting(pending); ++ } catch (Exception interruptedexception) { ++ // Paper end + throw this.a(i, j, (Throwable) interruptedexception); + } + } ++ return null; // Paper + } + + public IChunkAccess d(int i, int j) { +@@ -160,7 +234,7 @@ public class ChunkProviderServer implements IChunkProvider { + if (chunk != null) { + consumer.accept(chunk); + } else { +- this.g.a(chunkcoordintpair).thenApply(this::a).thenAccept(consumer); ++ this.g.a(chunkcoordintpair).thenApply(proto -> postChunkgenMain(proto).thenAccept(consumer)); // Paper + } + } + +@@ -168,11 +242,13 @@ public class ChunkProviderServer implements IChunkProvider { + } + + // CraftBukkit start +- public CompletableFuture generateChunk(int i, int j) { +- return this.generateChunk(i, j, false); ++ // Paper start - change name, make private ++ private CompletableFuture generateChunk0(int i, int j) { ++ return this.generateChunk0(i, j, false); + } + +- public CompletableFuture generateChunk(int i, int j, boolean force) { ++ private CompletableFuture generateChunk0(int i, int j, boolean force) { ++ // Paper end + this.g.b(); + + ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); +@@ -183,7 +259,11 @@ public class ChunkProviderServer implements IChunkProvider { + // CraftBukkit end + CompletableFuture completablefuture = this.g.c(); // CraftBukkit - decompile error + +- return completablefuture.thenApply(this::a); ++ // Paper start ++ CompletableFuture pending = new CompletableFuture<>(); ++ completablefuture.thenApply(proto -> postChunkgenMain(proto).thenAccept(pending::complete)); ++ return pending; ++ // Paper end + } + + private ReportedException a(int i, int j, Throwable throwable) { +@@ -196,7 +276,7 @@ public class ChunkProviderServer implements IChunkProvider { + return new ReportedException(crashreport); + } + +- private Chunk a(IChunkAccess ichunkaccess) { ++ private Chunk finishChunkgen(IChunkAccess ichunkaccess) { // Paper - rename method - Anything that accesses this should ensure it goes through process to ensure it is on main thread + ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos(); + int i = chunkcoordintpair.x; + int j = chunkcoordintpair.z; +@@ -204,7 +284,7 @@ public class ChunkProviderServer implements IChunkProvider { + Long2ObjectMap long2objectmap = this.chunks; + Chunk chunk; + +- synchronized (this.chunks) { ++ //synchronized (this.chunks) { // Paper + Chunk chunk1 = (Chunk) this.chunks.get(k); + + if (chunk1 != null) { +@@ -222,7 +302,7 @@ public class ChunkProviderServer implements IChunkProvider { + } + + this.chunks.put(k, chunk); +- } ++ //} // Paper + + chunk.addEntities(); + return chunk; +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index bd52bf6561..e4447ecf58 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -62,8 +62,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + + @Nullable +- private synchronized NBTTagCompound a(GeneratorAccess generatoraccess, int i, int j) throws IOException { +- NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(this.b.get(new ChunkCoordIntPair(i, j))); // Spigot ++ // Paper start - remove synchronized, manually sync on the map ++ private NBTTagCompound a(GeneratorAccess generatoraccess, int i, int j) throws IOException { ++ Supplier supplier; ++ synchronized (this) { ++ supplier = this.b.get(new ChunkCoordIntPair(i, j)); ++ } ++ NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(supplier); // Spigot ++ // Paper end + + return nbttagcompound != null ? nbttagcompound : this.a(generatoraccess.o().getDimensionManager(), generatoraccess.s_(), i, j, generatoraccess); // CraftBukkit + } +@@ -71,7 +77,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + // CraftBukkit start + private boolean check(ChunkProviderServer cps, int x, int z) throws IOException { + if (cps != null) { +- com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread"); ++ //com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread"); // Paper + if (cps.isLoaded(x, z)) { + return true; + } +@@ -162,7 +168,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + return null; + } + +- public synchronized Object[] loadChunk(GeneratorAccess generatoraccess, int i, int j, Consumer consumer) throws IOException { ++ public Object[] loadChunk(GeneratorAccess generatoraccess, int i, int j, Consumer consumer) throws IOException { // Paper - remove synchronize + // CraftBukkit end + NBTTagCompound nbttagcompound = this.a(generatoraccess, i, j); + +diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java +index 80927de08b..d936709b47 100644 +--- a/src/main/java/net/minecraft/server/MCUtil.java ++++ b/src/main/java/net/minecraft/server/MCUtil.java +@@ -7,6 +7,7 @@ import com.mojang.authlib.GameProfile; + import org.apache.commons.lang.exception.ExceptionUtils; + import org.bukkit.Location; + import org.bukkit.craftbukkit.CraftWorld; ++import org.bukkit.craftbukkit.chunkio.ChunkIOExecutor; + import org.bukkit.craftbukkit.util.Waitable; + import org.spigotmc.AsyncCatcher; + +@@ -14,13 +15,13 @@ import javax.annotation.Nonnull; + import javax.annotation.Nullable; + import java.util.Queue; + import java.util.concurrent.CompletableFuture; ++import java.util.concurrent.ConcurrentLinkedQueue; + import java.util.concurrent.ExecutionException; + import java.util.concurrent.Executor; + import java.util.concurrent.Executors; + import java.util.concurrent.TimeUnit; + import java.util.concurrent.TimeoutException; + import java.util.function.Supplier; +-import java.util.regex.Pattern; + + public final class MCUtil { + private static final Executor asyncExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("Paper Async Task Handler Thread - %1$d").build()); +@@ -76,10 +77,14 @@ public final class MCUtil { + MinecraftServer.getServer().postToMainThread(new DelayedRunnable(ticks, runnable)); + } + +- public static void processQueue() { ++ ++ private static final Queue chunkMainQueue = new ConcurrentLinkedQueue<>(); ++ public static void processChunkMainQueue() { ++ if (!isMainThread()) { ++ return; ++ } + Runnable runnable; +- Queue processQueue = getProcessQueue(); +- while ((runnable = processQueue.poll()) != null) { ++ while ((runnable = chunkMainQueue.poll()) != null) { + try { + runnable.run(); + } catch (Exception e) { +@@ -87,14 +92,15 @@ public final class MCUtil { + } + } + } +- public static T processQueueWhileWaiting(CompletableFuture future) { ++ public static T processChunkQueueWhileWaiting(CompletableFuture future) { + try { + if (isMainThread()) { + while (!future.isDone()) { + try { +- return future.get(1, TimeUnit.MILLISECONDS); ++ return future.get(10000, TimeUnit.NANOSECONDS); + } catch (TimeoutException ignored) { +- processQueue(); ++ processChunkMainQueue(); ++ ChunkIOExecutor.tick(); + } + } + } +@@ -103,6 +109,13 @@ public final class MCUtil { + throw new RuntimeException(e); + } + } ++ public static void ensureChunkMain(Runnable run) { ++ if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) { ++ chunkMainQueue.add(run); ++ } else { ++ run.run(); ++ } ++ } + + public static void ensureMain(Runnable run) { + ensureMain(null, run); +@@ -118,16 +131,12 @@ public final class MCUtil { + if (reason != null) { + new IllegalStateException("Asynchronous " + reason + "!").printStackTrace(); + } +- getProcessQueue().add(run); ++ MinecraftServer.getServer().processQueue.add(run); + return; + } + run.run(); + } + +- private static Queue getProcessQueue() { +- return MinecraftServer.getServer().processQueue; +- } +- + public static T ensureMain(Supplier run) { + return ensureMain(null, run); + } +@@ -149,7 +158,7 @@ public final class MCUtil { + return run.get(); + } + }; +- getProcessQueue().add(wait); ++ MinecraftServer.getServer().processQueue.add(wait); + try { + return wait.get(); + } catch (InterruptedException | ExecutionException e) { +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 90b1871196..390ecb4093 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -996,6 +996,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + // CraftBukkit start + // Run tasks that are waiting on processing + MinecraftTimings.processQueueTimer.startTiming(); // Spigot ++ MCUtil.processChunkMainQueue(); // Paper + while (!processQueue.isEmpty()) { + processQueue.remove().run(); + } +diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java +index fcd9f5491f..4c67e7d0cf 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunk.java ++++ b/src/main/java/net/minecraft/server/PlayerChunk.java +@@ -49,7 +49,8 @@ public class PlayerChunk { + public PlayerChunk(PlayerChunkMap playerchunkmap, int i, int j) { + this.playerChunkMap = playerchunkmap; + this.location = new ChunkCoordIntPair(i, j); +- this.chunk = playerchunkmap.getWorld().getChunkProviderServer().getOrLoadChunkAt(i, j); ++ loadInProgress = true; // Paper ++ this.chunk = playerchunkmap.getWorld().getChunkProviderServer().getOrLoadChunkAt(i, j, loadedRunnable); // Paper + this.chunkExists = this.chunk != null || ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper + markChunkUsed(); // Paper - delay chunk unloads + } +@@ -82,6 +83,7 @@ public class PlayerChunk { + + this.c.remove(entityplayer); + if (this.c.isEmpty()) { ++ if (!this.done) ChunkIOExecutor.dropQueuedChunkLoad(this.playerChunkMap.getWorld(), this.location.x, this.location.z, this.loadedRunnable); // Paper + this.playerChunkMap.b(this); + } + +@@ -92,12 +94,14 @@ public class PlayerChunk { + if (this.chunk != null) { + return true; + } else { +- if (flag) { +- this.chunk = this.playerChunkMap.getWorld().getChunkProviderServer().getChunkAt(this.location.x, this.location.z); +- } else { +- this.chunk = this.playerChunkMap.getWorld().getChunkProviderServer().getOrLoadChunkAt(this.location.x, this.location.z); ++ // Paper start ++ if (!loadInProgress) { ++ loadInProgress = true; ++ this.chunk = playerChunkMap.getWorld().getChunkProviderServer().getChunkAt(this.location.x, this.location.z, loadedRunnable, flag); + markChunkUsed(); // Paper - delay chunk unloads + } ++ // Paper end ++ + + return this.chunk != null; + } +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index f4dc7e4ac6..c1324515af 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -159,13 +159,7 @@ 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(); +- callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); // TODO: Add back async variant +- /*cps.getChunkAt(x, z, new Runnable() { +- @Override +- public void run() { +- callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); +- } +- });*/ ++ cps.getChunkAt(x, z, () -> callback.onLoad(cps.getChunkAt(x, z).bukkitChunk)); + } + + public void getChunkAtAsync(Block block, ChunkLoadCallback callback) { +@@ -266,7 +260,7 @@ public class CraftWorld implements World { + + net.minecraft.server.Chunk chunk = null; + +- chunk = Futures.getUnchecked(world.getChunkProviderServer().generateChunk(x, z, true)); ++ chunk = MCUtil.processChunkQueueWhileWaiting(world.getChunkProviderServer().generateChunk(x, z)); // Paper + PlayerChunk playerChunk = world.getPlayerChunkMap().getChunk(x, z); + if (playerChunk != null) { + playerChunk.chunk = chunk; +diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +index 2bbd5a7e2a..40b86c4334 100644 +--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java ++++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +@@ -6,11 +6,15 @@ import co.aikar.timings.Timing; + import net.minecraft.server.Chunk; + import net.minecraft.server.ChunkCoordIntPair; + import net.minecraft.server.ChunkRegionLoader; ++import net.minecraft.server.MCUtil; ++import net.minecraft.server.MinecraftServer; + import net.minecraft.server.NBTTagCompound; + + import org.bukkit.Server; + import org.bukkit.craftbukkit.util.AsynchronousExecutor; + ++import java.util.concurrent.CompletableFuture; ++import java.util.concurrent.ExecutionException; + import java.util.concurrent.atomic.AtomicInteger; + + class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider { +@@ -21,13 +25,21 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider {}); +- ++ + if (data != null) { + queuedChunk.compound = (NBTTagCompound) data[1]; + return (Chunk) data[0]; ++ } else { ++ // Paper start ++ CompletableFuture pending = new CompletableFuture<>(); ++ MCUtil.ensureChunkMain(() -> { ++ System.out.println("GENERATING SEMI ASYNC" + queuedChunk); ++ queuedChunk.provider.generateChunk(queuedChunk.x, queuedChunk.z).thenApply(pending::complete); ++ }); ++ MCUtil.processChunkQueueWhileWaiting(pending); ++ return null; // We still need to return null so the code below doesn't use result which is already in the world now ++ // Paper end + } +- +- return null; + } catch (IOException ex) { + throw new RuntimeException(ex); + } +@@ -35,12 +47,28 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider {}); ++ if (data != null && data[0] != null) { ++ System.out.println("LOADED AFTER NULL" + queuedChunk); ++ queuedChunk.compound = (NBTTagCompound) data[1]; ++ chunk = (Chunk) data[0]; ++ } else { ++ System.out.println("GENERATING" + queuedChunk); ++ // Ok failed again, generate ++ MCUtil.processChunkQueueWhileWaiting(queuedChunk.provider.generateChunk(queuedChunk.x, queuedChunk.z, null)); ++ return; ++ } ++ } catch (IOException ex) { ++ throw new RuntimeException(ex); ++ } + } +- try (Timing ignored = queuedChunk.provider.world.timings.chunkIOStage2.startTimingIfSync()) { // Paper + + queuedChunk.loader.loadEntities(queuedChunk.compound.getCompound("Level"), chunk); + chunk.setLastSaved(queuedChunk.provider.world.getTime()); +diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/QueuedChunk.java b/src/main/java/org/bukkit/craftbukkit/chunkio/QueuedChunk.java +index 842d424f6a..c8f4db79f7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/chunkio/QueuedChunk.java ++++ b/src/main/java/org/bukkit/craftbukkit/chunkio/QueuedChunk.java +@@ -35,4 +35,12 @@ class QueuedChunk { + + return false; + } ++ ++ @Override ++ public String toString() { ++ return "QueuedChunk{" + ++ "x=" + x + ++ ", z=" + z + ++ '}'; ++ } + } +diff --git a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +index cf1258c559..b18c27060e 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +@@ -10,8 +10,10 @@ import java.util.concurrent.LinkedBlockingQueue; + import java.util.concurrent.ThreadFactory; + import java.util.concurrent.ThreadPoolExecutor; + import java.util.concurrent.TimeUnit; ++import java.util.concurrent.TimeoutException; + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + ++import net.minecraft.server.MCUtil; + import org.apache.commons.lang.Validate; + + /** +@@ -129,7 +131,8 @@ public final class AsynchronousExecutor { + // We are the first into the lock + while (state != STAGE_1_COMPLETE) { + try { +- this.wait(); ++ this.wait(0, 10000); // Paper ++ MCUtil.processChunkMainQueue(); // Paper + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new RuntimeException("Unable to handle interruption on " + parameter, e); +@@ -185,6 +188,7 @@ public final class AsynchronousExecutor { + final P parameter = this.parameter; + final T object = this.object; + ++ MCUtil.processChunkMainQueue(); // We may have an async chunk gen ready to be added to main first + provider.callStage2(parameter, object); + for (C callback : callbacks) { + if (callback == this) { +-- +2.18.0 + diff --git a/removed/server/0080-Custom-replacement-for-eaten-items.patch b/removed/server/0080-Custom-replacement-for-eaten-items.patch deleted file mode 100644 index 04bc9b376a..0000000000 --- a/removed/server/0080-Custom-replacement-for-eaten-items.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6aca1eb30fa703436f9e195e2a3b17c38c223f15 Mon Sep 17 00:00:00 2001 -From: Jedediah Smith -Date: Sun, 21 Jun 2015 15:07:20 -0400 -Subject: [PATCH] Custom replacement for eaten items - - -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2aaeac324..7e2cc66d7 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2377,12 +2377,13 @@ public abstract class EntityLiving extends Entity { - - protected void v() { - if (!this.activeItem.isEmpty() && this.isHandRaised()) { -+ PlayerItemConsumeEvent event = null; // Paper - this.b(this.activeItem, 16); - // CraftBukkit start - fire PlayerItemConsumeEvent - ItemStack itemstack; - if (this instanceof EntityPlayer) { - org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.activeItem); -- PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem); -+ event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem); // Paper - world.getServer().getPluginManager().callEvent(event); - - if (event.isCancelled()) { -@@ -2397,9 +2398,21 @@ public abstract class EntityLiving extends Entity { - itemstack = this.activeItem.a(this.world, this); - } - -+ // Paper start - save the default replacement item and change it if necessary -+ final ItemStack defaultReplacement = itemstack; -+ if (event != null && event.getReplacement() != null) { -+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); -+ } -+ // Paper end -+ - this.a(this.cH(), itemstack); - // CraftBukkit end - this.cN(); -+ -+ // Paper start - if the replacement is anything but the default, update the client inventory -+ if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { -+ ((EntityPlayer) this).getBukkitEntity().updateInventory(); -+ } - } - - } --- -2.18.0 - diff --git a/removed/server/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch b/removed/server/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch deleted file mode 100644 index a10fc9b891..0000000000 --- a/removed/server/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b61b569f426f29ca36a9b769f868e62d552645ec Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 12 May 2016 01:55:17 -0400 -Subject: [PATCH] Do not mark chunks as active for neighbor updates - -Fixes chunk unload issues - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1e78fc625..ba3ee64f8 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1044,25 +1044,25 @@ public class Chunk { - // CraftBukkit end - world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper - world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper -- Chunk chunk = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ - 1); -- Chunk chunk1 = ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ); -- Chunk chunk2 = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ + 1); -- Chunk chunk3 = ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ); -+ Chunk chunk = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX, this.locZ - 1); // Paper -+ Chunk chunk1 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ); // Paper -+ Chunk chunk2 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX, this.locZ + 1); // Paper -+ Chunk chunk3 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ); // Paper - -- if (chunk1 != null && chunk2 != null && ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ + 1) != null) { -+ if (chunk1 != null && chunk2 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ + 1) != null) { // Paper - this.a(chunkgenerator); - } - -- if (chunk3 != null && chunk2 != null && ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ + 1) != null) { -+ if (chunk3 != null && chunk2 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ + 1) != null) { // Paper - chunk3.a(chunkgenerator); - } - -- if (chunk != null && chunk1 != null && ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ - 1) != null) { -+ if (chunk != null && chunk1 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ - 1) != null) { // Paper - chunk.a(chunkgenerator); - } - - if (chunk != null && chunk3 != null) { -- Chunk chunk4 = ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ - 1); -+ Chunk chunk4 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ - 1); // Paper - - if (chunk4 != null) { - chunk4.a(chunkgenerator); --- -2.18.0 - diff --git a/removed/server/0177-Vanished-players-don-t-have-rights.patch b/removed/server/0177-Vanished-players-don-t-have-rights.patch deleted file mode 100644 index b886675d17..0000000000 --- a/removed/server/0177-Vanished-players-don-t-have-rights.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 570c45e9491173c215cae1bd4ff5ff9b9b8b1fa0 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Fri, 16 Dec 2016 22:10:35 -0600 -Subject: [PATCH] Vanished players don't have rights - - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f71528b5f..b13830e87 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -68,7 +68,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper - private static double f = 1.0D; - private static int entityCount; - private int id; -- public boolean i; -+ public boolean i; public boolean blocksEntitySpawning() { return i; } // Paper - OBFHELPER - public final List passengers; - protected int j; - private Entity au;public void setVehicle(Entity entity) { this.au = entity; } // Paper // OBFHELPER -diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -index 60149c1ca..a5730d1c7 100644 ---- a/src/main/java/net/minecraft/server/ItemBlock.java -+++ b/src/main/java/net/minecraft/server/ItemBlock.java -@@ -20,7 +20,7 @@ public class ItemBlock extends Item { - - ItemStack itemstack = entityhuman.b(enumhand); - -- if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, (Entity) null)) { -+ if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, entityhuman)) { // Paper - Pass entityhuman instead of null - int i = this.filterData(itemstack.getData()); - IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d7bf8378e..424b956e8 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -1805,6 +1805,33 @@ public abstract class World implements IBlockAccess { - return this.a(axisalignedbb, (Entity) null); - } - -+ // Paper start - Based on method below -+ /** -+ * @param axisalignedbb area to search within -+ * @param entity causing the action ex. block placer -+ * @return if there are no visible players colliding -+ */ -+ public boolean checkNoVisiblePlayerCollisions(AxisAlignedBB axisalignedbb, @Nullable Entity entity) { -+ List list = this.getEntities((Entity) null, axisalignedbb); -+ -+ for (int i = 0; i < list.size(); ++i) { -+ Entity entity1 = (Entity) list.get(i); -+ -+ if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) { -+ if (!((EntityPlayer) entity).getBukkitEntity().canSee(((EntityPlayer) entity1).getBukkitEntity())) { -+ continue; -+ } -+ } -+ -+ if (!entity1.dead && entity1.blocksEntitySpawning()) { -+ return false; -+ } -+ } -+ -+ return true; -+ } -+ // Paper end -+ - public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) { - List list = this.getEntities((Entity) null, axisalignedbb); - -@@ -2695,7 +2722,7 @@ public abstract class World implements IBlockAccess { - AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition); - - // CraftBukkit start - store default return -- boolean defaultReturn = axisalignedbb != Block.k && !this.a(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection)); -+ boolean defaultReturn = axisalignedbb != Block.k && !this.checkNoVisiblePlayerCollisions(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection)); // Paper - Use our entity search - BlockCanBuildEvent event = new BlockCanBuildEvent(this.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftMagicNumbers.getId(block), defaultReturn); - this.getServer().getPluginManager().callEvent(event); - -diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 06a277b3b..5f816e44f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -810,6 +810,13 @@ public class CraftEventFactory { - Projectile projectile = (Projectile) entity.getBukkitEntity(); - org.bukkit.entity.Entity collided = position.entity.getBukkitEntity(); - com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); -+ -+ if (projectile.getShooter() instanceof Player && collided instanceof Player) { -+ if (!((Player) projectile.getShooter()).canSee((Player) collided)) { -+ event.setCancelled(true); -+ } -+ } -+ - Bukkit.getPluginManager().callEvent(event); - return event; - } --- -2.18.0 - diff --git a/removed/server/0183-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/removed/server/0183-Option-to-prevent-armor-stands-from-doing-entity-loo.patch deleted file mode 100644 index c127bbc613..0000000000 --- a/removed/server/0183-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a3aaaa3233ac457ef6bc4c1373429c28bc66524a Mon Sep 17 00:00:00 2001 -From: kashike -Date: Wed, 21 Dec 2016 11:52:04 -0600 -Subject: [PATCH] Option to prevent armor stands from doing entity lookups - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2ba3bcb8e..5f06d4e5e 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -408,4 +408,9 @@ public class PaperWorldConfig { - log("Treasure Maps will return already discovered locations"); - } - } -+ -+ public boolean armorStandEntityLookups = true; -+ private void armorStandEntityLookups() { -+ armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); -+ } - } -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 424b956e8..b85c55168 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -1335,6 +1335,7 @@ public abstract class World implements IBlockAccess { - - this.a(entity, axisalignedbb, false, arraylist); - if (entity != null) { -+ if (entity instanceof EntityArmorStand && !entity.world.paperConfig.armorStandEntityLookups) return arraylist; // Paper - List list = this.getEntities(entity, axisalignedbb.g(0.25D)); - - for (int i = 0; i < list.size(); ++i) { --- -2.18.0 - diff --git a/removed/server/0197-Assign-the-World-in-WorldGenStronghold.patch b/removed/server/0197-Assign-the-World-in-WorldGenStronghold.patch deleted file mode 100644 index 84286abc84..0000000000 --- a/removed/server/0197-Assign-the-World-in-WorldGenStronghold.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 9d2c2c0c6e0763a163a8a52d4e8323e853c19cb1 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Sat, 14 Jan 2017 01:22:07 -0600 -Subject: [PATCH] Assign the World in WorldGenStronghold - - -diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java -index c93754704..a3b958e01 100644 ---- a/src/main/java/net/minecraft/server/WorldGenStronghold.java -+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java -@@ -56,6 +56,7 @@ public class WorldGenStronghold extends StructureGenerator { - } - - public BlockPosition getNearestGeneratedFeature(World world, BlockPosition blockposition, boolean flag) { -+ this.g = world; // Paper - if (!this.b) { - this.c(); - this.b = true; --- -2.18.0 - diff --git a/removed/server/0231-MC-94186-Fix-dragon-egg-falling-in-lazy-chunks.patch b/removed/server/0231-MC-94186-Fix-dragon-egg-falling-in-lazy-chunks.patch deleted file mode 100644 index 12db003ae5..0000000000 --- a/removed/server/0231-MC-94186-Fix-dragon-egg-falling-in-lazy-chunks.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ddb5420fbc247f84c5d4877b77716179535385ba Mon Sep 17 00:00:00 2001 -From: Brokkonaut -Date: Fri, 11 Aug 2017 03:29:26 +0200 -Subject: [PATCH] MC-94186 Fix dragon egg falling in lazy chunks - -Fixes falling dragon eggs in lazy chunks fall to the block below the last empty block and replacing that block with them. - -See also https://bugs.mojang.com/browse/MC-94186 - -diff --git a/src/main/java/net/minecraft/server/BlockDragonEgg.java b/src/main/java/net/minecraft/server/BlockDragonEgg.java -index ce186f825..291342c90 100644 ---- a/src/main/java/net/minecraft/server/BlockDragonEgg.java -+++ b/src/main/java/net/minecraft/server/BlockDragonEgg.java -@@ -44,7 +44,7 @@ public class BlockDragonEgg extends Block { - } - - if (blockposition1.getY() > 0) { -- world.setTypeAndData(blockposition1, this.getBlockData(), 2); -+ world.setTypeAndData(blockposition1.up(), this.getBlockData(), 2); // Paper - } - } - --- -2.18.0 - diff --git a/removed/server/0248-Improve-Structures-Checking.patch b/removed/server/0248-Improve-Structures-Checking.patch deleted file mode 100644 index 69966591d1..0000000000 --- a/removed/server/0248-Improve-Structures-Checking.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 13d727f38a8615e821d1794176154b34780c0c19 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 11 Nov 2017 17:57:39 -0500 -Subject: [PATCH] Improve Structures Checking - -Improves performance by keying every chunk thats part of a structure to a hashmap -instead of only the first one. - -This allows us to avoid iterating the entire structures value set to see -if a block position is inside of a structure. - -This should have pretty decent performance improvement to any standard world -that has been around for a whilewith lots of structures due to ineffeciencies -in how MC stores structures (even unloaded chunks has structured data loaded) - -diff --git a/src/main/java/net/minecraft/server/StructureBoundingBox.java b/src/main/java/net/minecraft/server/StructureBoundingBox.java -index db419cd99..d9329bd42 100644 ---- a/src/main/java/net/minecraft/server/StructureBoundingBox.java -+++ b/src/main/java/net/minecraft/server/StructureBoundingBox.java -@@ -4,12 +4,14 @@ import com.google.common.base.MoreObjects; - - public class StructureBoundingBox { - -- public int a; -- public int b; -- public int c; -- public int d; -- public int e; -- public int f; -+ public int a; // Paper - If changes, verify low/high getters -+ public int b; // Paper - If changes, verify low/high getters -+ public int c; // Paper - If changes, verify low/high getters -+ public int d; // Paper - If changes, verify low/high getters -+ public int e; // Paper - If changes, verify low/high getters -+ public int f; // Paper - If changes, verify low/high getters -+ public BaseBlockPosition getLowPosition() { return new BaseBlockPosition(a, b, c); } // Paper -+ public BaseBlockPosition getHighPosition() { return new BaseBlockPosition(d, e, f); } // Paper - - public StructureBoundingBox() {} - -@@ -114,6 +116,7 @@ public class StructureBoundingBox { - this.f += k; - } - -+ public boolean contains(BaseBlockPosition baseblockposition) { return b(baseblockposition); } // Paper - OBFHELPER - public boolean b(BaseBlockPosition baseblockposition) { - return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e; - } -diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index e8263baa4..f4dfba8f3 100644 ---- a/src/main/java/net/minecraft/server/StructureGenerator.java -+++ b/src/main/java/net/minecraft/server/StructureGenerator.java -@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap; - import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; - import it.unimi.dsi.fastutil.objects.ObjectIterator; - import java.util.Iterator; -+import java.util.List; - import java.util.Random; - import javax.annotation.Nullable; - -@@ -14,6 +15,7 @@ public abstract class StructureGenerator extends WorldGenBase { - private final Timing timing = MinecraftTimings.getStructureTiming(this); // Paper - private PersistentStructure a; - protected Long2ObjectMap c = new Long2ObjectOpenHashMap(1024); -+ protected Long2ObjectMap allStructures = new Long2ObjectOpenHashMap(1024); // Paper - Holds ref to structures for every chunk its part of, where as the one above this only holds the vanilla oriented ones. - - public StructureGenerator() {} - -@@ -29,6 +31,7 @@ public abstract class StructureGenerator extends WorldGenBase { - if (this.a(i, j)) { - StructureStart structurestart = this.b(i, j); - -+ populateStructure(structurestart); // Paper - this.c.put(ChunkCoordIntPair.a(i, j), structurestart); - if (structurestart.a()) { - this.a(i, j, structurestart); -@@ -106,6 +109,19 @@ public abstract class StructureGenerator extends WorldGenBase { - - @Nullable - protected StructureStart c(BlockPosition blockposition) { -+ // Paper start - replace method -+ StructureStart structureStart = allStructures.get(ChunkCoordIntPair.asLong(blockposition)); -+ if (structureStart != null && structureStart.isSizeable() && structureStart.getBoundingBox().contains(blockposition)) { -+ List structurePieces = structureStart.getStructurePieces(); -+ for (StructurePiece piece : structurePieces) { -+ if (piece.getBoundingBox().contains(blockposition)) { -+ return structureStart; -+ } -+ } -+ } -+ -+ return null; -+ /* - ObjectIterator objectiterator = this.c.values().iterator(); - - while (objectiterator.hasNext()) { -@@ -125,11 +141,16 @@ public abstract class StructureGenerator extends WorldGenBase { - } - - return null; -+ */ - } - - public boolean a(World world, BlockPosition blockposition) { - if (this.g == null) return false; // Paper - this.a(world); -+ // Paper start - Replace method -+ StructureStart structureStart = this.allStructures.get(ChunkCoordIntPair.asLong(blockposition)); -+ return structureStart != null && structureStart.isSizeable() && structureStart.getBoundingBox().contains(blockposition); -+ /* // comment out rest - ObjectIterator objectiterator = this.c.values().iterator(); - - StructureStart structurestart; -@@ -142,7 +163,7 @@ public abstract class StructureGenerator extends WorldGenBase { - structurestart = (StructureStart) objectiterator.next(); - } while (!structurestart.a() || !structurestart.b().b((BaseBlockPosition) blockposition)); - -- return true; -+ return true;*/ // Paper end - } - - @Nullable -@@ -177,6 +198,7 @@ public abstract class StructureGenerator extends WorldGenBase { - StructureStart structurestart = WorldGenFactory.a(nbttagcompound1, world); - - if (structurestart != null) { -+ populateStructure(structurestart); // Paper - this.c.put(ChunkCoordIntPair.a(i, j), structurestart); - } - } -@@ -187,6 +209,27 @@ public abstract class StructureGenerator extends WorldGenBase { - - } - -+ // Paper start -+ private void populateStructure(StructureStart structurestart) { -+ for (StructurePiece piece : structurestart.getStructurePieces()) { -+ populateStructure(structurestart, piece.getBoundingBox()); -+ } -+ populateStructure(structurestart, structurestart.getBoundingBox()); -+ } -+ private void populateStructure(StructureStart structurestart, StructureBoundingBox bb) { -+ if (bb == null) { -+ return; -+ } -+ final BaseBlockPosition low = bb.getLowPosition(); -+ final BaseBlockPosition high = bb.getHighPosition(); -+ for (int x = low.getX() >> 4, maxX = high.getX() >> 4; x <= maxX; x++) { -+ for (int z = low.getZ() >> 4, maxZ = high.getZ() >> 4; z <= maxZ; z++) { -+ allStructures.put(ChunkCoordIntPair.asLong(x, z), structurestart); -+ } -+ } -+ } -+ // Paper end -+ - private void a(int i, int j, StructureStart structurestart) { - this.a.a(structurestart.a(i, j), i, j); - this.a.c(); -diff --git a/src/main/java/net/minecraft/server/StructurePiece.java b/src/main/java/net/minecraft/server/StructurePiece.java -index 93903bc67..fcc13f811 100644 ---- a/src/main/java/net/minecraft/server/StructurePiece.java -+++ b/src/main/java/net/minecraft/server/StructurePiece.java -@@ -53,6 +53,7 @@ public abstract class StructurePiece { - - public abstract boolean a(World world, Random random, StructureBoundingBox structureboundingbox); - -+ public StructureBoundingBox getBoundingBox() { return d(); } // Paper - OBFHELPER - public StructureBoundingBox d() { - return this.l; - } -diff --git a/src/main/java/net/minecraft/server/StructureStart.java b/src/main/java/net/minecraft/server/StructureStart.java -index b6abc74e0..f9bb953d0 100644 ---- a/src/main/java/net/minecraft/server/StructureStart.java -+++ b/src/main/java/net/minecraft/server/StructureStart.java -@@ -19,10 +19,12 @@ public abstract class StructureStart { - this.d = j; - } - -+ public StructureBoundingBox getBoundingBox() { return b(); } // Paper - OBFHELPER - public StructureBoundingBox b() { - return this.b; - } - -+ public List getStructurePieces() { return c(); } // Paper - OBFHELPER - public List c() { - return this.a; - } -@@ -137,7 +139,7 @@ public abstract class StructureStart { - - } - -- public boolean a() { -+ public boolean isSizeable() { return a(); } public boolean a() { // Paper - OBFHELPER - return true; - } - --- -2.18.0 - diff --git a/removed/server/0305-Optimize-Hoppers.patch b/removed/server/0305-Optimize-Hoppers.patch new file mode 100644 index 0000000000..d0356bca0f --- /dev/null +++ b/removed/server/0305-Optimize-Hoppers.patch @@ -0,0 +1,287 @@ +From 3b1cd8419e873319c05fbb282e828bfd9e6b9bd7 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 27 Apr 2016 22:09:52 -0400 +Subject: [PATCH] Optimize Hoppers + +* Removes unnecessary extra calls to .update() that are very expensive +* Lots of itemstack cloning removed. Only clone if the item is actually moved +* Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items. + However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on. +* Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory +* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index b9f5f49055..a8470e6e76 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -399,6 +399,15 @@ public class PaperWorldConfig { + squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); + } + ++ public boolean cooldownHopperWhenFull = true; ++ public boolean disableHopperMoveEvents = false; ++ private void hopperOptimizations() { ++ cooldownHopperWhenFull = getBoolean("hopper.cooldown-when-full", cooldownHopperWhenFull); ++ log("Cooldown Hoppers when Full: " + (cooldownHopperWhenFull ? "enabled" : "disabled")); ++ disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); ++ log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); ++ } ++ + public boolean disableSprintInterruptionOnAttack; + private void disableSprintInterruptionOnAttack() { + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 66b637326a..f9a7bde0b6 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -1022,6 +1022,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + + if (true || i == 0 || this.getAllowNether()) { // CraftBukkit + WorldServer worldserver = this.worlds.get(i); ++ TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper + + this.methodProfiler.a(() -> { + return worldserver.getWorldData().getName(); +diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java +index 3e9b357c87..db78274a8c 100644 +--- a/src/main/java/net/minecraft/server/TileEntity.java ++++ b/src/main/java/net/minecraft/server/TileEntity.java +@@ -49,6 +49,7 @@ public abstract class TileEntity implements KeyedObject { + public void setCurrentChunk(Chunk chunk) { + this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; + } ++ static boolean IGNORE_TILE_UPDATES = false; + // Paper end + + @Nullable +@@ -121,6 +122,7 @@ public abstract class TileEntity implements KeyedObject { + + public void update() { + if (this.world != null) { ++ if (IGNORE_TILE_UPDATES) return; // Paper + this.f = this.world.getType(this.position); + this.world.b(this.position, this); + if (!this.f.isAir()) { +diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java +index bb41d4780f..9e7a91fe48 100644 +--- a/src/main/java/net/minecraft/server/TileEntityHopper.java ++++ b/src/main/java/net/minecraft/server/TileEntityHopper.java +@@ -190,6 +190,154 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + return false; + } + ++ // Paper start - Optimize Hoppers ++ private static boolean skipPullModeEventFire = false; ++ private static boolean skipPushModeEventFire = false; ++ static boolean skipHopperEvents = false; ++ ++ private boolean hopperPush(IInventory iinventory, EnumDirection enumdirection) { ++ skipPushModeEventFire = skipHopperEvents; ++ boolean foundItem = false; ++ for (int i = 0; i < this.getSize(); ++i) { ++ if (!this.getItem(i).isEmpty()) { ++ foundItem = true; ++ ItemStack origItemStack = this.getItem(i); ++ ItemStack itemstack = origItemStack; ++ ++ final int origCount = origItemStack.getCount(); ++ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); ++ origItemStack.setCount(moved); ++ ++ // We only need to fire the event once to give protection plugins a chance to cancel this event ++ // Because nothing uses getItem, every event call should end up the same result. ++ if (!skipPushModeEventFire) { ++ itemstack = callPushMoveEvent(iinventory, itemstack); ++ if (itemstack == null) { // cancelled ++ origItemStack.setCount(origCount); ++ return false; ++ } ++ } ++ final ItemStack itemstack2 = addItem(this, iinventory, itemstack, enumdirection); ++ final int remaining = itemstack2.getCount(); ++ if (remaining != moved) { ++ origItemStack = origItemStack.cloneItemStack(); ++ origItemStack.setCount(origCount - moved + remaining); ++ this.setItem(i, origItemStack); ++ iinventory.update(); ++ return true; ++ } ++ origItemStack.setCount(origCount); ++ } ++ } ++ if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown ++ this.setCooldown(world.spigotConfig.hopperTransfer); ++ } ++ return false; ++ } ++ ++ private static boolean hopperPull(IHopper ihopper, IInventory iinventory, int i) { ++ ItemStack origItemStack = iinventory.getItem(i); ++ ItemStack itemstack = origItemStack; ++ final int origCount = origItemStack.getCount(); ++ final World world = ihopper.getWorld(); ++ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); ++ itemstack.setCount(moved); ++ ++ if (!skipPullModeEventFire) { ++ itemstack = callPullMoveEvent(ihopper, iinventory, itemstack); ++ if (itemstack == null) { // cancelled ++ origItemStack.setCount(origCount); ++ // Drastically improve performance by returning true. ++ // No plugin could of relied on the behavior of false as the other call ++ // site for IMIE did not exhibit the same behavior ++ return true; ++ } ++ } ++ ++ final ItemStack itemstack2 = addItem(iinventory, ihopper, itemstack, null); ++ final int remaining = itemstack2.getCount(); ++ if (remaining != moved) { ++ origItemStack = origItemStack.cloneItemStack(); ++ origItemStack.setCount(origCount - moved + remaining); ++ IGNORE_TILE_UPDATES = true; ++ iinventory.setItem(i, origItemStack); ++ IGNORE_TILE_UPDATES = false; ++ iinventory.update(); ++ return true; ++ } ++ origItemStack.setCount(origCount); ++ ++ if (world.paperConfig.cooldownHopperWhenFull) { ++ cooldownHopper(ihopper); ++ } ++ ++ return false; ++ } ++ ++ private ItemStack callPushMoveEvent(IInventory iinventory, ItemStack itemstack) { ++ Inventory destinationInventory = getInventory(iinventory); ++ InventoryMoveItemEvent event = new InventoryMoveItemEvent(this.getOwner(false).getInventory(), ++ CraftItemStack.asCraftMirror(itemstack), destinationInventory, true); ++ boolean result = event.callEvent(); ++ if (!event.calledGetItem && !event.calledSetItem) { ++ skipPushModeEventFire = true; ++ } ++ if (!result) { ++ cooldownHopper(this); ++ return null; ++ } ++ ++ if (event.calledSetItem) { ++ return CraftItemStack.asNMSCopy(event.getItem()); ++ } else { ++ return itemstack; ++ } ++ } ++ ++ private static ItemStack callPullMoveEvent(IHopper hopper, IInventory iinventory, ItemStack itemstack) { ++ Inventory sourceInventory = getInventory(iinventory); ++ Inventory destination = getInventory(hopper); ++ ++ InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, ++ // Mirror is safe as we no plugins ever use this item ++ CraftItemStack.asCraftMirror(itemstack), destination, false); ++ boolean result = event.callEvent(); ++ if (!event.calledGetItem && !event.calledSetItem) { ++ skipPullModeEventFire = true; ++ } ++ if (!result) { ++ cooldownHopper(hopper); ++ return null; ++ } ++ ++ if (event.calledSetItem) { ++ return CraftItemStack.asNMSCopy(event.getItem()); ++ } else { ++ return itemstack; ++ } ++ } ++ ++ private static Inventory getInventory(IInventory iinventory) { ++ Inventory sourceInventory;// Have to special case large chests as they work oddly ++ if (iinventory instanceof InventoryLargeChest) { ++ sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory); ++ } else if (iinventory instanceof TileEntity) { ++ sourceInventory = ((TileEntity) iinventory).getOwner(false).getInventory(); ++ } else { ++ sourceInventory = iinventory.getOwner().getInventory(); ++ } ++ return sourceInventory; ++ } ++ ++ private static void cooldownHopper(IHopper hopper) { ++ if (hopper instanceof TileEntityHopper) { ++ ((TileEntityHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer); ++ } else if (hopper instanceof EntityMinecartHopper) { ++ ((EntityMinecartHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer / 2); ++ } ++ } ++ ++ // Paper end + private boolean s() { + IInventory iinventory = this.D(); + +@@ -201,6 +349,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + if (this.a(iinventory, enumdirection)) { + return false; + } else { ++ return hopperPush(iinventory, enumdirection); /* // Paper - disable rest + for (int i = 0; i < this.getSize(); ++i) { + if (!this.getItem(i).isEmpty()) { + ItemStack itemstack = this.getItem(i).cloneItemStack(); +@@ -242,7 +391,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + } + +- return false; ++ return false;*/ // Paper - end commenting out replaced block for Hopper Optimizations + } + } + } +@@ -313,6 +462,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + if (b(iinventory, enumdirection)) { + return false; + } ++ skipPullModeEventFire = skipHopperEvents; // Paper + + if (iinventory instanceof IWorldInventory) { + IWorldInventory iworldinventory = (IWorldInventory) iinventory; +@@ -355,6 +505,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + ItemStack itemstack = iinventory.getItem(i); + + if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { ++ return hopperPull(ihopper, iinventory, i); /* // Paper - disable rest + ItemStack itemstack1 = itemstack.cloneItemStack(); + // ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.splitStack(i, 1), (EnumDirection) null); + // CraftBukkit start - Call event on collection of items from inventories into the hopper +@@ -395,7 +546,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + + itemstack1.subtract(origCount - itemstack2.getCount()); // Spigot +- iinventory.setItem(i, itemstack1); ++ iinventory.setItem(i, itemstack1);*/ // Paper - end commenting out replaced block for Hopper Optimizations + } + + return false; +@@ -404,7 +555,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + public static boolean a(IInventory iinventory, EntityItem entityitem) { + boolean flag = false; + // CraftBukkit start +- InventoryPickupItemEvent event = new InventoryPickupItemEvent(iinventory.getOwner().getInventory(), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); ++ InventoryPickupItemEvent event = new InventoryPickupItemEvent(getInventory(iinventory), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); // Paper - use getInventory() to avoid snapshot creation + entityitem.world.getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) { + return false; +@@ -458,7 +609,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + boolean flag1 = iinventory1.P_(); + + if (itemstack1.isEmpty()) { ++ IGNORE_TILE_UPDATES = true; // Paper + iinventory1.setItem(i, itemstack); ++ IGNORE_TILE_UPDATES = false; // Paper + itemstack = ItemStack.a; + flag = true; + } else if (a(itemstack1, itemstack)) { +-- +2.18.0 + diff --git a/scripts/decompile.sh b/scripts/decompile.sh index f2c1754fdd..2018259c37 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -6,9 +6,9 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) +windows="$([[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]] && echo "true" || echo "false")" decompiledir="$workdir/Minecraft/$minecraftversion" classdir="$decompiledir/classes" - echo "Extracting NMS classes..." if [ ! -d "$classdir" ]; then mkdir -p "$classdir" @@ -30,4 +30,13 @@ if [ ! -d "$decompiledir/net/minecraft/server" ]; then exit 1 fi fi + +# set a symlink to current +currentlink="$workdir/Minecraft/current" +if ([ ! -e "$currentlink" ] || [ -L "$currentlink" ]) && [ "$windows" == "false" ]; then + echo "Pointing $currentlink to $minecraftversion" + rm -rf "$currentlink" + ln -sfn "$minecraftversion" "$currentlink" +fi + ) diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 255d8b25f4..9217d06df0 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -69,8 +69,14 @@ for f in $files; do fi done -import NBTList -import NBTBase +# Temporarily add new NMS dev imports here before you run paper patch +# but after you have paper rb'd your changes, remove the line from this file before committing. +# we do not need any lines added to this file + +# import FileName + + + set -e cd "$workdir/Spigot/Spigot-Server/" diff --git a/work/BuildData b/work/BuildData index a5effc6142..351106b633 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit a5effc614208d06202688a775f25d7b820b36d47 +Subproject commit 351106b6336fc52f6acf94aabd34ac54fc772432 diff --git a/work/Bukkit b/work/Bukkit index ac92f0355a..47e3d2954d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit ac92f0355a7bf319d51b78837f8e7a3889b6c549 +Subproject commit 47e3d2954d0dd279c93524baec241b76acaef7c7 diff --git a/work/CraftBukkit b/work/CraftBukkit index 7c0f69e449..e3c21decb0 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 7c0f69e449b94547f95daa5c09407dd3f4a6fd52 +Subproject commit e3c21decb0bff39ec2e4bb3c95a6554ea3755609 diff --git a/work/Spigot b/work/Spigot index 751edf9136..69774b3e44 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 751edf9136cc98e37842b9dc43d4d119452c5433 +Subproject commit 69774b3e4419d3213023b46dc791214bd39f48d6