diff --git a/Spigot-API-Patches/0003-Timings-v2.patch b/Spigot-API-Patches/0003-Timings-v2.patch index 3458e6d33..3ac8b2930 100644 --- a/Spigot-API-Patches/0003-Timings-v2.patch +++ b/Spigot-API-Patches/0003-Timings-v2.patch @@ -1,4 +1,4 @@ -From 3bdfef7c20a6506b0a133f7de68973203f1612ba Mon Sep 17 00:00:00 2001 +From 678d7b0f1eb35e8840a18bad357dd56f9357baa8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 -index 000000000..98079dc0c +index 00000000..98079dc0 --- /dev/null +++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java @@ -0,0 +1,82 @@ @@ -94,7 +94,7 @@ index 000000000..98079dc0c +} diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java new file mode 100644 -index 000000000..8c43e2061 +index 00000000..8c43e206 --- /dev/null +++ b/src/main/java/co/aikar/timings/NullTimingHandler.java @@ -0,0 +1,61 @@ @@ -161,7 +161,7 @@ index 000000000..8c43e2061 +} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 -index 000000000..feddcdbd4 +index 00000000..feddcdbd --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +1,81 @@ @@ -248,7 +248,7 @@ index 000000000..feddcdbd4 +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java new file mode 100644 -index 000000000..b2260104c +index 00000000..b2260104 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timing.java @@ -0,0 +1,76 @@ @@ -330,7 +330,7 @@ index 000000000..b2260104c +} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 -index 000000000..f222d6b7d +index 00000000..f222d6b7 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingData.java @@ -0,0 +1,120 @@ @@ -456,7 +456,7 @@ index 000000000..f222d6b7d +} diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 -index 000000000..521c985e6 +index 00000000..521c985e --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHandler.java @@ -0,0 +1,200 @@ @@ -662,7 +662,7 @@ index 000000000..521c985e6 +} diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java new file mode 100644 -index 000000000..28d0954a3 +index 00000000..28d0954a --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +1,345 @@ @@ -1013,7 +1013,7 @@ index 000000000..28d0954a3 +} diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java new file mode 100644 -index 000000000..0e114eb32 +index 00000000..0e114eb3 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -0,0 +1,55 @@ @@ -1074,7 +1074,7 @@ index 000000000..0e114eb32 +} diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java new file mode 100644 -index 000000000..a7f1f44d7 +index 00000000..a7f1f44d --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -0,0 +1,106 @@ @@ -1186,7 +1186,7 @@ index 000000000..a7f1f44d7 +} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java new file mode 100644 -index 000000000..f907649ba +index 00000000..f907649b --- /dev/null +++ b/src/main/java/co/aikar/timings/Timings.java @@ -0,0 +1,284 @@ @@ -1476,7 +1476,7 @@ index 000000000..f907649ba +} diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java new file mode 100644 -index 000000000..56b10e898 +index 00000000..56b10e89 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsCommand.java @@ -0,0 +1,119 @@ @@ -1601,7 +1601,7 @@ index 000000000..56b10e898 +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 000000000..df7f42595 +index 00000000..df7f4259 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -0,0 +1,342 @@ @@ -1949,7 +1949,7 @@ index 000000000..df7f42595 +} diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java new file mode 100644 -index 000000000..f63e7033c +index 00000000..f63e7033 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsManager.java @@ -0,0 +1,187 @@ @@ -2142,7 +2142,7 @@ index 000000000..f63e7033c +} diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java new file mode 100644 -index 000000000..e7c389c05 +index 00000000..e7c389c0 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsReportListener.java @@ -0,0 +1,72 @@ @@ -2220,7 +2220,7 @@ index 000000000..e7c389c05 +} diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java new file mode 100644 -index 000000000..5edaba128 +index 00000000..5edaba12 --- /dev/null +++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java @@ -0,0 +1,51 @@ @@ -2277,7 +2277,7 @@ index 000000000..5edaba128 +} diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java new file mode 100644 -index 000000000..23ac07f2c +index 00000000..23ac07f2 --- /dev/null +++ b/src/main/java/co/aikar/util/Counter.java @@ -0,0 +1,35 @@ @@ -2318,7 +2318,7 @@ index 000000000..23ac07f2c +} diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java new file mode 100644 -index 000000000..962749750 +index 00000000..96274975 --- /dev/null +++ b/src/main/java/co/aikar/util/JSONUtil.java @@ -0,0 +1,129 @@ @@ -2453,7 +2453,7 @@ index 000000000..962749750 +} diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java new file mode 100644 -index 000000000..24eae4bea +index 00000000..24eae4be --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingIntMap.java @@ -0,0 +1,71 @@ @@ -2530,7 +2530,7 @@ index 000000000..24eae4bea +} diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java new file mode 100644 -index 000000000..9a4f9dca8 +index 00000000..9a4f9dca --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingMap.java @@ -0,0 +1,339 @@ @@ -2875,7 +2875,7 @@ index 000000000..9a4f9dca8 +} diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java new file mode 100644 -index 000000000..df592d855 +index 00000000..df592d85 --- /dev/null +++ b/src/main/java/co/aikar/util/MRUMapCache.java @@ -0,0 +1,102 @@ @@ -2982,7 +2982,7 @@ index 000000000..df592d855 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 2ce174401..7fdd1a084 100644 +index 2ce17440..7fdd1a08 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -568,7 +568,6 @@ public final class Bukkit { @@ -2994,7 +2994,7 @@ index 2ce174401..7fdd1a084 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 63392d5e7..0e7a81c88 100644 +index 63392d5e..0e7a81c8 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1150,12 +1150,27 @@ public interface Server extends PluginMessageRecipient { @@ -3028,7 +3028,7 @@ index 63392d5e7..0e7a81c88 100644 * diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java new file mode 100644 -index 000000000..fd452bce4 +index 00000000..fd452bce --- /dev/null +++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java @@ -0,0 +1,18 @@ @@ -3051,7 +3051,7 @@ index 000000000..fd452bce4 + } +} diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4c931f186..4a479627d 100644 +index 4c931f18..4a479627 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -33,7 +33,8 @@ public abstract class Command { @@ -3081,7 +3081,7 @@ index 4c931f186..4a479627d 100644 return true; } diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -index 502578837..9c80f4640 100644 +index 50257883..9c80f464 100644 --- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java +++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java @@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command { @@ -3104,7 +3104,7 @@ index 502578837..9c80f4640 100644 } diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java new file mode 100644 -index 000000000..5527e7c86 +index 00000000..5527e7c8 --- /dev/null +++ b/src/main/java/org/bukkit/command/MessageCommandSender.java @@ -0,0 +1,105 @@ @@ -3214,7 +3214,7 @@ index 000000000..5527e7c86 + +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index d9183db2f..43e52a77a 100644 +index d9183db2..43e52a77 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -29,7 +29,7 @@ public class SimpleCommandMap implements CommandMap { @@ -3249,7 +3249,7 @@ index d9183db2f..43e52a77a 100644 // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java deleted file mode 100644 -index bba914d7f..000000000 +index bba914d7..00000000 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ /dev/null @@ -1,253 +0,0 @@ @@ -3507,7 +3507,7 @@ index bba914d7f..000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5054276ff..0993f31b1 100644 +index 5054276f..0993f31b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1575,6 +1575,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3523,7 +3523,7 @@ index 5054276ff..0993f31b1 100644 @Override diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 8b130abb7..80c152ba9 100644 +index 8b130abb..80c152ba 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -293,7 +293,6 @@ public final class SimplePluginManager implements PluginManager { @@ -3580,10 +3580,10 @@ index 8b130abb7..80c152ba9 100644 } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 113b899cc..81b428222 100644 +index 2d4c75ab..54594546 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -40,7 +40,6 @@ import org.bukkit.plugin.PluginLoader; +@@ -41,7 +41,6 @@ import org.bukkit.plugin.PluginLoader; import org.bukkit.plugin.RegisteredListener; import org.bukkit.plugin.TimedRegisteredListener; import org.bukkit.plugin.UnknownDependencyException; @@ -3591,15 +3591,15 @@ index 113b899cc..81b428222 100644 import org.yaml.snakeyaml.error.YAMLException; /** -@@ -51,7 +50,6 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -52,7 +51,6 @@ public final class JavaPluginLoader implements PluginLoader { private final Pattern[] fileFilters = new Pattern[] { Pattern.compile("\\.jar$"), }; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot + private final Map> classes = new ConcurrentHashMap>(); private final List loaders = new CopyOnWriteArrayList(); - public static final CustomTimingsHandler pluginParentTimer = new CustomTimingsHandler("** Plugins"); // Spigot /** * This class was not meant to be constructed explicitly -@@ -291,26 +289,20 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -292,26 +290,20 @@ public final class JavaPluginLoader implements PluginLoader { } } @@ -3629,7 +3629,7 @@ index 113b899cc..81b428222 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index af8af8ef0..44093af29 100644 +index 7a8abe75..bc33ff33 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -23,7 +23,8 @@ import org.bukkit.plugin.PluginDescriptionFile; @@ -3640,10 +3640,10 @@ index af8af8ef0..44093af29 100644 +public final class PluginClassLoader extends URLClassLoader { // Spigot + public JavaPlugin getPlugin() { return plugin; } // Spigot private final JavaPluginLoader loader; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot + private final Map> classes = new ConcurrentHashMap>(); private final PluginDescriptionFile description; diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java -index 5ca863b36..048047067 100644 +index 5ca863b3..04804706 100644 --- a/src/main/java/org/bukkit/util/CachedServerIcon.java +++ b/src/main/java/org/bukkit/util/CachedServerIcon.java @@ -12,4 +12,6 @@ import org.bukkit.event.server.ServerListPingEvent; @@ -3655,7 +3655,7 @@ index 5ca863b36..048047067 100644 + public String getData(); // Spigot +} diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -index 8d982974e..e9f76006e 100644 +index 8d982974..e9f76006 100644 --- a/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java @@ -1,165 +1,105 @@ @@ -3907,5 +3907,5 @@ index 8d982974e..e9f76006e 100644 + } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch b/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch index a4d680788..3a2ee3bbf 100644 --- a/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch +++ b/Spigot-API-Patches/0008-Add-PlayerLocaleChangeEvent.patch @@ -1,4 +1,4 @@ -From cb532e30452b3b3a7143ce5764711c2bf41e92cf Mon Sep 17 00:00:00 2001 +From 6a8a468f3a3b613765b95dea08c1a426bf7cc379 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.20.1 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 9080a66e6..7c0829906 100644 --- a/Spigot-API-Patches/0009-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0009-Add-player-view-distance-API.patch @@ -1,11 +1,11 @@ -From 61bfc392c8504daea86a2eb450c57e4975dec044 Mon Sep 17 00:00:00 2001 +From 34e2633d0c24e40216010eaa456af3b549302069 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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a631529df..4208b0d2c 100644 +index a631529d..4208b0d2 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1492,6 +1492,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -30,5 +30,5 @@ index a631529df..4208b0d2c 100644 public class Spigot extends Entity.Spigot { -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch index bd4ae59d0..0ed3a135b 100644 --- a/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch +++ b/Spigot-API-Patches/0012-Automatically-disable-plugins-that-fail-to-load.patch @@ -1,14 +1,14 @@ -From 9a230e904d502c69610fe0507d3bbaabc19cd059 Mon Sep 17 00:00:00 2001 +From b45f9dba0fc2d0d9839d30d4724b86047a8a9e2a 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/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 81b42822..3af99b5b 100644 +index 54594546..bf972302 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -331,6 +331,10 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -332,6 +332,10 @@ public final class JavaPluginLoader implements PluginLoader { jPlugin.setEnabled(true); } catch (Throwable ex) { server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex); @@ -20,5 +20,5 @@ index 81b42822..3af99b5b 100644 // Perhaps abort here, rather than continue going, but as it stands, -- -2.18.0 +2.20.1 diff --git a/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch index 45000fe33..e017a276b 100644 --- a/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch @@ -1,4 +1,4 @@ -From f027f34cf88ec478b2d4a18131f4ded8915efd06 Mon Sep 17 00:00:00 2001 +From 8782eb89fab27baa72cbe2b29684a49efadbd5af 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 b5cc156cd..310c30bb6 100644 +index f9fbc40a..1d42d42a 100644 --- a/pom.xml +++ b/pom.xml @@ -109,6 +109,17 @@ @@ -29,7 +29,7 @@ index b5cc156cd..310c30bb6 100644 diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java new file mode 100644 -index 000000000..9ff99e3b3 +index 00000000..9ff99e3b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java @@ -0,0 +1,40 @@ @@ -75,7 +75,7 @@ index 000000000..9ff99e3b3 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java new file mode 100644 -index 000000000..f60f01005 +index 00000000..f60f0100 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java @@ -0,0 +1,39 @@ @@ -120,7 +120,7 @@ index 000000000..f60f01005 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java new file mode 100644 -index 000000000..140cf0ad3 +index 00000000..140cf0ad --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java @@ -0,0 +1,44 @@ @@ -170,7 +170,7 @@ index 000000000..140cf0ad3 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java new file mode 100644 -index 000000000..6941d9fbf +index 00000000..6941d9fb --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java @@ -0,0 +1,32 @@ @@ -208,7 +208,7 @@ index 000000000..6941d9fbf +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java new file mode 100644 -index 000000000..1473ff8cd +index 00000000..1473ff8c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java @@ -0,0 +1,63 @@ @@ -277,7 +277,7 @@ index 000000000..1473ff8cd +} diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java new file mode 100644 -index 000000000..62acbf821 +index 00000000..62acbf82 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java @@ -0,0 +1,33 @@ @@ -315,7 +315,7 @@ index 000000000..62acbf821 + } +} diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java -index 3b2c99ea7..b45b6c1c3 100644 +index 3b2c99ea..b45b6c1c 100644 --- a/src/main/java/org/bukkit/plugin/EventExecutor.java +++ b/src/main/java/org/bukkit/plugin/EventExecutor.java @@ -4,9 +4,81 @@ import org.bukkit.event.Event; @@ -401,10 +401,10 @@ index 3b2c99ea7..b45b6c1c3 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 3af99b5bd..72d506d1f 100644 +index bf972302..77207f14 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -289,20 +289,7 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -290,20 +290,7 @@ public final class JavaPluginLoader implements PluginLoader { } } @@ -427,5 +427,5 @@ index 3af99b5bd..72d506d1f 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch b/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch index 3056f2b0b..fa8250cdb 100644 --- a/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch +++ b/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch @@ -1,14 +1,14 @@ -From 5639eb8d022329ed99bb9f92f8dbe416d5e4f377 Mon Sep 17 00:00:00 2001 +From e711715c7ddc2a309bbcb0156ab188fb95fddd32 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/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java -index 99814eee..34dde443 100644 +index b74d5f9d..99a44006 100644 --- a/src/main/java/org/bukkit/entity/Arrow.java +++ b/src/main/java/org/bukkit/entity/Arrow.java -@@ -108,4 +108,38 @@ public interface Arrow extends Projectile { +@@ -144,4 +144,38 @@ public interface Arrow extends Projectile { @Override Spigot spigot(); // Spigot end @@ -48,5 +48,5 @@ index 99814eee..34dde443 100644 + // Paper end } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0044-Fireworks-API-s.patch b/Spigot-API-Patches/0044-Fireworks-API-s.patch index 432fb3820..fc4c068cb 100644 --- a/Spigot-API-Patches/0044-Fireworks-API-s.patch +++ b/Spigot-API-Patches/0044-Fireworks-API-s.patch @@ -1,4 +1,4 @@ -From 8e86bdb38a51cea9f5b62c820732617366fce895 Mon Sep 17 00:00:00 2001 +From e1ee48a404bc7e7c82193a91cc6fa36b1b46c364 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 01:18:55 -0500 Subject: [PATCH] Fireworks API's @@ -34,5 +34,5 @@ index b8a8c075..8c087bb7 100644 + // Paper end } -- -2.18.0 +2.20.1 diff --git a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch index 7d3b61012..f4da5a198 100644 --- a/Spigot-API-Patches/0049-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 8b39d39d06c4539f1826da9a4309c0503679928e Mon Sep 17 00:00:00 2001 +From 606a3a3606a8406779eb08b91508a22920ed284b 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 @@ -58,5 +58,5 @@ index 2abe1208..c660c178 100644 } return completions; -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch index cad5541a6..222f54d8a 100644 --- a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch @@ -1,4 +1,4 @@ -From a33b574c104eaa05eebba870a7d61b1a5876d5ed Mon Sep 17 00:00:00 2001 +From 06cac40ce638d8f3f57fdb32b3e2a6d377800ac4 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 @@ -21,10 +21,10 @@ index 43239f84..fe8d3468 100644 */ @Deprecated diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 04573ec2..0750d64c 100644 +index 6ce38e03..e66caa41 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1570,6 +1570,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1603,6 +1603,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -32,7 +32,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, Location location, int count, T data); -@@ -1585,6 +1586,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1618,6 +1619,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -40,7 +40,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, double x, double y, double z, int count, T data); -@@ -1634,6 +1636,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1667,6 +1669,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -48,7 +48,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data); -@@ -1653,6 +1656,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1686,6 +1689,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -56,7 +56,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data); -@@ -1708,6 +1712,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1741,6 +1745,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -64,7 +64,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data); -@@ -1729,6 +1734,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1762,6 +1767,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -72,7 +72,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data); -@@ -1751,6 +1757,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1784,6 +1790,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings @@ -80,7 +80,7 @@ index 04573ec2..0750d64c 100644 */ public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force); -@@ -1775,6 +1782,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1808,6 +1815,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings diff --git a/Spigot-API-Patches/0067-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 index 40e39b534..fc1f31302 100644 --- a/Spigot-API-Patches/0067-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 62be624eee349e6f2381582d772249d57a485fc7 Mon Sep 17 00:00:00 2001 +From 5e6d3bf1e2743a13eb1876f0513dc3f92bacdccb 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 @@ -14,7 +14,7 @@ parent of the plugin logger to avoid this. diff --git a/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java new file mode 100644 -index 000000000..d052b2f55 +index 00000000..d052b2f5 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java @@ -0,0 +1,39 @@ @@ -58,7 +58,7 @@ index 000000000..d052b2f55 + +} diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index a81dae439..15f22ade2 100644 +index a81dae43..15f22ade 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -42,7 +42,7 @@ public abstract class JavaPlugin extends PluginBase { @@ -85,7 +85,7 @@ index a81dae439..15f22ade2 100644 /** diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 44093af29..ab79b71bf 100644 +index bc33ff33..213f6234 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -36,6 +36,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot @@ -94,9 +94,9 @@ index 44093af29..ab79b71bf 100644 private IllegalStateException pluginState; + private java.util.logging.Logger logger; // Paper - add field - // Spigot Start - static -@@ -73,6 +74,8 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot + static { + ClassLoader.registerAsParallelCapable(); +@@ -53,6 +54,8 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot this.manifest = jar.getManifest(); this.url = file.toURI().toURL(); @@ -105,7 +105,7 @@ index 44093af29..ab79b71bf 100644 try { Class jarClass; try { -@@ -189,6 +192,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot +@@ -169,6 +172,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot pluginState = new IllegalStateException("Initial initialization"); this.pluginInit = javaPlugin; @@ -114,5 +114,5 @@ index 44093af29..ab79b71bf 100644 } } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch index 6c7cef9d5..1b1066ecb 100644 --- a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From ee7e882548af6130d040e4a16132a155e44be107 Mon Sep 17 00:00:00 2001 +From af0861873204100e974bd6b187f72c398de472c9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:28:55 -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/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5f3e085e3..1e349066d 100644 +index 5f3e085e..1e349066 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -38,5 +38,5 @@ index 5f3e085e3..1e349066d 100644 // Spigot start -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch b/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch index 7162e1bcb..d10a29d15 100644 --- a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch @@ -1,4 +1,4 @@ -From 8ddad2ac0889f686038b73a4b10aaf8a3a6333fc Mon Sep 17 00:00:00 2001 +From e1d2e8f216b7fda9a9c87aa3540e2b73307a19d7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 01:39:28 -0400 Subject: [PATCH] getPlayerUniqueId API @@ -57,5 +57,5 @@ index 9e7bc162..b8076fc3 100644 * Gets the plugin manager for interfacing with plugins. * -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch b/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch index af5d9d3ee..a648c31fb 100644 --- a/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch +++ b/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From e730e57eded25def56fa85f4d51aa44cbcc5a135 Mon Sep 17 00:00:00 2001 +From 3866b0ae220a8374b807898691fa739df7b004f8 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 @@ -29,5 +29,5 @@ index 517d1523..ffda9f6a 100644 + } -- -2.18.0 +2.20.1 diff --git a/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch index 2d0dee11c..8de27f66d 100644 --- a/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch @@ -1,4 +1,4 @@ -From 0ccef7fd8a50d98175e9cac5f171ee4d12d037f3 Mon Sep 17 00:00:00 2001 +From 5daba95426cb5d3ab09db50d25acc35aac87bcf0 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 @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 849ad2cb..99fbf327 100644 +index e66caa41..d9010176 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -2,6 +2,8 @@ package org.bukkit; @@ -18,7 +18,7 @@ index 849ad2cb..99fbf327 100644 import java.util.Collection; import java.util.HashMap; import java.util.List; -@@ -447,6 +449,238 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -480,6 +482,238 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public Collection getEntitiesByClasses(Class... classes); @@ -258,5 +258,5 @@ index 849ad2cb..99fbf327 100644 * Get a list of all players in this World * -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch index b0482bdf0..3f4729989 100644 --- a/Spigot-API-Patches/0097-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 2e6605a41302606cb9c28be3fa9d967d67dfd437 Mon Sep 17 00:00:00 2001 +From 56c0296c4c259c68f03a2e35acc9e39501046e95 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 @@ -452,10 +452,10 @@ index 4d0acaf5..827aa00c 100644 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 3cc161de..c9b3ff76 100644 +index d9010176..379fd2fa 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1970,7 +1970,57 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2003,7 +2003,57 @@ public interface World extends PluginMessageRecipient, Metadatable { * the type of this depends on {@link Particle#getDataType()} * @param Type */ diff --git a/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch b/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch index ea2526b57..d6fe94f5e 100644 --- a/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch +++ b/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch @@ -1,4 +1,4 @@ -From 58698c7b920454d0f0171be3ff53e4df1471dc44 Mon Sep 17 00:00:00 2001 +From c5d36c89c26360428075ecd830da4f65b2c2de11 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 @@ -7,7 +7,7 @@ This should close more memory leaks from /reload and disabling plugins, by closing the class loader and the jar file. diff --git a/src/main/java/org/bukkit/plugin/PluginLoader.java b/src/main/java/org/bukkit/plugin/PluginLoader.java -index e7981a1d9..d34756f15 100644 +index e7981a1d..d34756f1 100644 --- a/src/main/java/org/bukkit/plugin/PluginLoader.java +++ b/src/main/java/org/bukkit/plugin/PluginLoader.java @@ -73,4 +73,19 @@ public interface PluginLoader { @@ -31,7 +31,7 @@ index e7981a1d9..d34756f15 100644 + // Paper end - close Classloader on disable } diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java -index e5638d560..b72d5a9bc 100644 +index e5638d56..b72d5a9b 100644 --- a/src/main/java/org/bukkit/plugin/PluginManager.java +++ b/src/main/java/org/bukkit/plugin/PluginManager.java @@ -154,6 +154,18 @@ public interface PluginManager { @@ -54,7 +54,7 @@ index e5638d560..b72d5a9bc 100644 * Gets a {@link Permission} from its fully qualified name * diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index bd0588a20..cb2b0b9cb 100644 +index bd0588a2..cb2b0b9c 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -412,17 +412,29 @@ public final class SimplePluginManager implements PluginManager { @@ -100,10 +100,10 @@ index bd0588a20..cb2b0b9cb 100644 lookupNames.clear(); HandlerList.unregisterAll(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 72d506d1f..3411a365c 100644 +index 77207f14..c7782e7d 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -319,7 +319,7 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -320,7 +320,7 @@ public final class JavaPluginLoader implements PluginLoader { } catch (Throwable ex) { server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex); // Paper start - Disable plugins that fail to load @@ -112,7 +112,7 @@ index 72d506d1f..3411a365c 100644 return; // Paper end } -@@ -330,7 +330,13 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -331,7 +331,13 @@ public final class JavaPluginLoader implements PluginLoader { } } @@ -126,7 +126,7 @@ index 72d506d1f..3411a365c 100644 Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader"); if (plugin.isEnabled()) { -@@ -357,6 +363,16 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -358,6 +364,16 @@ public final class JavaPluginLoader implements PluginLoader { for (String name : names) { removeClass(name); } @@ -144,5 +144,5 @@ index 72d506d1f..3411a365c 100644 } } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0112-Expand-Explosions-API.patch b/Spigot-API-Patches/0112-Expand-Explosions-API.patch index cf84bcbec..969cc8aa0 100644 --- a/Spigot-API-Patches/0112-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0112-Expand-Explosions-API.patch @@ -1,4 +1,4 @@ -From 73be070d77dd79f210bf045c6ec01bf2ecf72f18 Mon Sep 17 00:00:00 2001 +From 469a7079d60dae81be5b7752cd439756a62718b7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:24:42 -0500 Subject: [PATCH] Expand Explosions API @@ -98,10 +98,10 @@ index 162a76e8..056a4d6b 100644 @Override public boolean equals(Object obj) { diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 1f63eba8..e83b2ac7 100644 +index 379fd2fa..70e7c9e3 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1115,6 +1115,102 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1148,6 +1148,102 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public boolean createExplosion(Location loc, float power, boolean setFire); @@ -205,5 +205,5 @@ index 1f63eba8..e83b2ac7 100644 * Gets the {@link Environment} type of this world * -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0117-Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch similarity index 83% rename from Spigot-API-Patches/0117-Add-World.getEntity-UUID-API.patch rename to Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch index f1f88d529..f8c3ba04b 100644 --- a/Spigot-API-Patches/0117-Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch @@ -1,14 +1,14 @@ -From 596f70a064c3481f5197b4b17cd4126e9dd8799a Mon Sep 17 00:00:00 2001 +From 203c520625cc337506bde2c144f1dda95231a000 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/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e83b2ac7..7c700cc2 100644 +index 70e7c9e3..301d9418 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -705,6 +705,16 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -738,6 +738,16 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public Collection getNearbyEntities(Location location, double x, double y, double z); @@ -26,5 +26,5 @@ index e83b2ac7..7c700cc2 100644 * Returns a list of entities within a bounding box centered around a * Location. -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0116-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-API-Patches/0116-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch deleted file mode 100644 index 659ae1ae2..000000000 --- a/Spigot-API-Patches/0116-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2bf0516d4ec180c0bbd9f50c67f205a99b8c08ca 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 - projectile has hit - - -diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -index 35f4148bb..db105e764 100644 ---- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -@@ -12,6 +12,7 @@ public class ProjectileHitEvent extends EntityEvent { - private static final HandlerList handlers = new HandlerList(); - private final Entity hitEntity; - private final Block hitBlock; -+ private final org.bukkit.block.BlockFace hitBlockFace; // Paper - - public ProjectileHitEvent(final Projectile projectile) { - this(projectile, null, null); -@@ -26,9 +27,16 @@ public class ProjectileHitEvent extends EntityEvent { - } - - public ProjectileHitEvent(final Projectile projectile, Entity hitEntity, Block hitBlock) { -+ // Paper Start - Add a constructor that includes a BlockFace parameter -+ this(projectile, hitEntity, hitBlock, null); -+ } -+ -+ public ProjectileHitEvent(final Projectile projectile, Entity hitEntity, Block hitBlock, org.bukkit.block.BlockFace hitBlockFace) { -+ // Paper End - super(projectile); - this.hitEntity = hitEntity; - this.hitBlock = hitBlock; -+ this.hitBlockFace = hitBlockFace; // Paper - } - - @Override -@@ -45,6 +53,17 @@ public class ProjectileHitEvent extends EntityEvent { - return hitBlock; - } - -+ // Paper Start -+ /** -+ * Gets the face of the block that the projectile has hit. -+ * -+ * @return hit block face or else null -+ */ -+ public org.bukkit.block.BlockFace getHitBlockFace() { -+ return hitBlockFace; -+ } -+ // Paper End -+ - /** - * Gets the entity that was hit, if it was an entity that was hit. - * --- -2.18.0 - diff --git a/Spigot-API-Patches/0118-InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/0117-InventoryCloseEvent-Reason-API.patch similarity index 95% rename from Spigot-API-Patches/0118-InventoryCloseEvent-Reason-API.patch rename to Spigot-API-Patches/0117-InventoryCloseEvent-Reason-API.patch index ae04b1f78..60f307ad4 100644 --- a/Spigot-API-Patches/0118-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-API-Patches/0117-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From e555fe63f21a161afa93b949759f1a0ed9dbea57 Mon Sep 17 00:00:00 2001 +From 79b0b5b19b53d8ecf4eeeae5adbd66d271ce7fd1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:52:52 -0400 Subject: [PATCH] InventoryCloseEvent Reason API @@ -7,7 +7,7 @@ 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/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ca789867d..d4b3caebd 100644 +index ca789867..d4b3caeb 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -138,6 +138,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -27,7 +27,7 @@ index ca789867d..d4b3caebd 100644 * Returns the ItemStack currently in your hand, can be empty. * diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java -index 19889b278..e6e45b936 100644 +index 19889b27..e6e45b93 100644 --- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java +++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java @@ -11,8 +11,58 @@ import org.bukkit.inventory.InventoryView; @@ -90,5 +90,5 @@ index 19889b278..e6e45b936 100644 /** -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0119-Entity-getChunk-API.patch b/Spigot-API-Patches/0118-Entity-getChunk-API.patch similarity index 93% rename from Spigot-API-Patches/0119-Entity-getChunk-API.patch rename to Spigot-API-Patches/0118-Entity-getChunk-API.patch index 63d8b4793..04d3f8db3 100644 --- a/Spigot-API-Patches/0119-Entity-getChunk-API.patch +++ b/Spigot-API-Patches/0118-Entity-getChunk-API.patch @@ -1,4 +1,4 @@ -From f2dced1d9d8a844f6760f7d9c39a1c6d1837ff90 Mon Sep 17 00:00:00 2001 +From 24a392e31d55b9c82325f678c70eddee787ade76 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/0120-Vex-getSummoner-API.patch b/Spigot-API-Patches/0119-Vex-getSummoner-API.patch similarity index 86% rename from Spigot-API-Patches/0120-Vex-getSummoner-API.patch rename to Spigot-API-Patches/0119-Vex-getSummoner-API.patch index 1825b03e8..ecfb4ce43 100644 --- a/Spigot-API-Patches/0120-Vex-getSummoner-API.patch +++ b/Spigot-API-Patches/0119-Vex-getSummoner-API.patch @@ -1,4 +1,4 @@ -From d3bc8ae26091d52609c73bcd0e6d97f71724aa16 Mon Sep 17 00:00:00 2001 +From b1935b33977f5215db28c156d7f75428b14f6ff3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:29:21 -0400 Subject: [PATCH] Vex#getSummoner API @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getSummoner API Get's the Mob that summoned this Vex diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java -index a2f2fcaec..d395e405d 100644 +index a2f2fcae..d395e405 100644 --- a/src/main/java/org/bukkit/entity/Vex.java +++ b/src/main/java/org/bukkit/entity/Vex.java @@ -3,4 +3,10 @@ package org.bukkit.entity; @@ -22,5 +22,5 @@ index a2f2fcaec..d395e405d 100644 + +} -- -2.18.0 +2.20.1 diff --git a/Spigot-API-Patches/0121-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0120-Add-an-asterisk-to-legacy-API-plugins.patch similarity index 92% rename from Spigot-API-Patches/0121-Add-an-asterisk-to-legacy-API-plugins.patch rename to Spigot-API-Patches/0120-Add-an-asterisk-to-legacy-API-plugins.patch index f333704ea..9990ac31a 100644 --- a/Spigot-API-Patches/0121-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0120-Add-an-asterisk-to-legacy-API-plugins.patch @@ -1,4 +1,4 @@ -From 218ebb72abe3b026f00a6378ff1529e4e2210c0b Mon Sep 17 00:00:00 2001 +From 6a6db0639bc7f151df29e0df293006646abf49b1 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 @@ -7,7 +7,7 @@ Not here to name and shame, only so server admins can be aware of which plugins have and haven't been updated. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index a4aabfe7f..f462b631b 100644 +index a4aabfe7..f462b631 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -67,4 +67,10 @@ public interface UnsafeValues { @@ -22,7 +22,7 @@ index a4aabfe7f..f462b631b 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index b1d384e82..72c0c0bc6 100644 +index b1d384e8..72c0c0bc 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -38,7 +38,14 @@ public class PluginsCommand extends BukkitCommand { @@ -42,10 +42,10 @@ index b1d384e82..72c0c0bc6 100644 StringBuilder pluginList = new StringBuilder(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 3cff01b6b..2b9aad0a7 100644 +index c7782e7d..39f92d88 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -303,7 +303,14 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -304,7 +304,14 @@ public final class JavaPluginLoader implements PluginLoader { Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader"); if (!plugin.isEnabled()) { @@ -62,5 +62,5 @@ index 3cff01b6b..2b9aad0a7 100644 JavaPlugin jPlugin = (JavaPlugin) plugin; -- -2.18.0 +2.20.1 diff --git a/Spigot-API-Patches/0122-EnderDragon-Events.patch b/Spigot-API-Patches/0121-EnderDragon-Events.patch similarity index 97% rename from Spigot-API-Patches/0122-EnderDragon-Events.patch rename to Spigot-API-Patches/0121-EnderDragon-Events.patch index 8a6c83000..f3bdb9d00 100644 --- a/Spigot-API-Patches/0122-EnderDragon-Events.patch +++ b/Spigot-API-Patches/0121-EnderDragon-Events.patch @@ -1,4 +1,4 @@ -From 7388904ff97bc9690a82713c6d2dde88ae1551bc Mon Sep 17 00:00:00 2001 +From 64eef514b6ae25b70d6492dd9d96b6cdcdd3931f Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 21 Jul 2018 01:51:05 -0500 Subject: [PATCH] EnderDragon Events @@ -6,7 +6,7 @@ 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 000000000..ef2a8dab9 +index 00000000..ef2a8dab --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java @@ -0,0 +1,72 @@ @@ -84,7 +84,7 @@ index 000000000..ef2a8dab9 +} 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 000000000..d8c3ab330 +index 00000000..d8c3ab33 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java @@ -0,0 +1,56 @@ @@ -146,7 +146,7 @@ index 000000000..d8c3ab330 +} 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 000000000..aa70dda10 +index 00000000..aa70dda1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java @@ -0,0 +1,56 @@ @@ -207,5 +207,5 @@ index 000000000..aa70dda10 + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0123-PlayerLaunchProjectileEvent.patch b/Spigot-API-Patches/0122-PlayerLaunchProjectileEvent.patch similarity index 96% rename from Spigot-API-Patches/0123-PlayerLaunchProjectileEvent.patch rename to Spigot-API-Patches/0122-PlayerLaunchProjectileEvent.patch index 02ae05b6d..d39b2e983 100644 --- a/Spigot-API-Patches/0123-PlayerLaunchProjectileEvent.patch +++ b/Spigot-API-Patches/0122-PlayerLaunchProjectileEvent.patch @@ -1,4 +1,4 @@ -From e3f49113573e7c633b84682c11837436b0eb86c5 Mon Sep 17 00:00:00 2001 +From b36a6f13151c1fc128d1c0233f1bb4df1a7f6e76 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 21 Jul 2018 03:10:50 -0500 Subject: [PATCH] PlayerLaunchProjectileEvent @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java new file mode 100644 -index 000000000..d2b244a41 +index 00000000..d2b244a4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java @@ -0,0 +1,78 @@ @@ -89,5 +89,5 @@ index 000000000..d2b244a41 + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0124-PlayerElytraBoostEvent.patch b/Spigot-API-Patches/0123-PlayerElytraBoostEvent.patch similarity index 96% rename from Spigot-API-Patches/0124-PlayerElytraBoostEvent.patch rename to Spigot-API-Patches/0123-PlayerElytraBoostEvent.patch index 8aa5600c7..3aad2aec0 100644 --- a/Spigot-API-Patches/0124-PlayerElytraBoostEvent.patch +++ b/Spigot-API-Patches/0123-PlayerElytraBoostEvent.patch @@ -1,4 +1,4 @@ -From 38df31e7cde8343c5d9df88d292baf068a60b628 Mon Sep 17 00:00:00 2001 +From b25f41eb2d736563f05bf96f5fb27fa6eddfecd9 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 21 Jul 2018 01:59:53 -0500 Subject: [PATCH] PlayerElytraBoostEvent @@ -6,7 +6,7 @@ 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 000000000..cecb2182c +index 00000000..cecb2182 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java @@ -0,0 +1,80 @@ @@ -91,5 +91,5 @@ index 000000000..cecb2182c + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0125-EntityTransformedEvent.patch b/Spigot-API-Patches/0124-EntityTransformedEvent.patch similarity index 97% rename from Spigot-API-Patches/0125-EntityTransformedEvent.patch rename to Spigot-API-Patches/0124-EntityTransformedEvent.patch index cc5639281..dc081a7b5 100644 --- a/Spigot-API-Patches/0125-EntityTransformedEvent.patch +++ b/Spigot-API-Patches/0124-EntityTransformedEvent.patch @@ -1,4 +1,4 @@ -From 5209ff5cba1819570522bccc6319375b8c531146 Mon Sep 17 00:00:00 2001 +From 00607241674731c78d1bcb0da531d41e6cf92255 Mon Sep 17 00:00:00 2001 From: Anthony MacAllister Date: Thu, 26 Jul 2018 15:28:53 -0400 Subject: [PATCH] EntityTransformedEvent @@ -103,5 +103,5 @@ index 00000000..12194f1f + } +} -- -2.17.1 +2.20.1 diff --git a/Spigot-API-Patches/0126-Allow-disabling-armour-stand-ticking.patch b/Spigot-API-Patches/0125-Allow-disabling-armour-stand-ticking.patch similarity index 90% rename from Spigot-API-Patches/0126-Allow-disabling-armour-stand-ticking.patch rename to Spigot-API-Patches/0125-Allow-disabling-armour-stand-ticking.patch index 8a7ef74e6..065888707 100644 --- a/Spigot-API-Patches/0126-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-API-Patches/0125-Allow-disabling-armour-stand-ticking.patch @@ -1,11 +1,11 @@ -From d1d6a6e701f0046fcae6f5a937d66e7b0698cdc5 Mon Sep 17 00:00:00 2001 +From b3cef7931e7f7432927b1fefc8282c4b5e554045 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 15 Aug 2018 01:26:03 -0700 Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java -index 099da6ce1..859f166fb 100644 +index 099da6ce..859f166f 100644 --- a/src/main/java/org/bukkit/entity/ArmorStand.java +++ b/src/main/java/org/bukkit/entity/ArmorStand.java @@ -275,5 +275,21 @@ public interface ArmorStand extends LivingEntity { @@ -31,5 +31,5 @@ index 099da6ce1..859f166fb 100644 // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0127-SkeletonHorse-Additions.patch b/Spigot-API-Patches/0126-SkeletonHorse-Additions.patch similarity index 94% rename from Spigot-API-Patches/0127-SkeletonHorse-Additions.patch rename to Spigot-API-Patches/0126-SkeletonHorse-Additions.patch index c3c6bcf58..695571ad6 100644 --- a/Spigot-API-Patches/0127-SkeletonHorse-Additions.patch +++ b/Spigot-API-Patches/0126-SkeletonHorse-Additions.patch @@ -1,4 +1,4 @@ -From f7db1f306087584741afcbcc990658478a0c17b0 Mon Sep 17 00:00:00 2001 +From 691303b8d4cabb5dd2a8b0a2b4d1562a613934f1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 27 Jul 2018 22:36:17 -0500 Subject: [PATCH] SkeletonHorse Additions @@ -6,7 +6,7 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java new file mode 100644 -index 000000000..55bae018e +index 00000000..55bae018 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java @@ -0,0 +1,43 @@ @@ -54,7 +54,7 @@ index 000000000..55bae018e +} + diff --git a/src/main/java/org/bukkit/entity/SkeletonHorse.java b/src/main/java/org/bukkit/entity/SkeletonHorse.java -index b2c6b6a86..ba9983463 100644 +index b2c6b6a8..ba998346 100644 --- a/src/main/java/org/bukkit/entity/SkeletonHorse.java +++ b/src/main/java/org/bukkit/entity/SkeletonHorse.java @@ -3,4 +3,12 @@ package org.bukkit.entity; @@ -72,5 +72,5 @@ index b2c6b6a86..ba9983463 100644 + // Paper end +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0128-Expand-Location-Manipulation-API.patch b/Spigot-API-Patches/0127-Expand-Location-Manipulation-API.patch similarity index 95% rename from Spigot-API-Patches/0128-Expand-Location-Manipulation-API.patch rename to Spigot-API-Patches/0127-Expand-Location-Manipulation-API.patch index 6e06a1b13..84fc01b68 100644 --- a/Spigot-API-Patches/0128-Expand-Location-Manipulation-API.patch +++ b/Spigot-API-Patches/0127-Expand-Location-Manipulation-API.patch @@ -1,4 +1,4 @@ -From a05d7aa6619f01679e452a714e900a5c14f4ffdc Mon Sep 17 00:00:00 2001 +From df879ce4d5f270cd7b52d86948b8a4401a9d543d Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 25 Jul 2018 01:36:07 -0400 Subject: [PATCH] Expand Location Manipulation API @@ -6,7 +6,7 @@ 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 056a4d6bb..8dcb15fb8 100644 +index 056a4d6b..8dcb15fb 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 { @@ -62,5 +62,5 @@ index 056a4d6bb..8dcb15fb8 100644 * @return A new location where X/Y/Z are on the Block location (integer value of X/Y/Z) */ -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0129-Expand-ArmorStand-API.patch b/Spigot-API-Patches/0128-Expand-ArmorStand-API.patch similarity index 97% rename from Spigot-API-Patches/0129-Expand-ArmorStand-API.patch rename to Spigot-API-Patches/0128-Expand-ArmorStand-API.patch index 7ba2ff935..2712acfc3 100644 --- a/Spigot-API-Patches/0129-Expand-ArmorStand-API.patch +++ b/Spigot-API-Patches/0128-Expand-ArmorStand-API.patch @@ -1,4 +1,4 @@ -From a25458fced284f9f77b50f45aab28446751859de Mon Sep 17 00:00:00 2001 +From ee715356b1b15cf9d00a6761b77d10dbbc08b2e5 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Thu, 26 Jul 2018 02:22:44 -0400 Subject: [PATCH] Expand ArmorStand API @@ -8,7 +8,7 @@ Add the following: - Enable/Disable slot interactions diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java -index 859f166fb..eda4873d5 100644 +index 859f166f..eda4873d 100644 --- a/src/main/java/org/bukkit/entity/ArmorStand.java +++ b/src/main/java/org/bukkit/entity/ArmorStand.java @@ -1,5 +1,6 @@ @@ -115,5 +115,5 @@ index 859f166fb..eda4873d5 100644 // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0130-AnvilDamageEvent.patch b/Spigot-API-Patches/0129-AnvilDamageEvent.patch similarity index 97% rename from Spigot-API-Patches/0130-AnvilDamageEvent.patch rename to Spigot-API-Patches/0129-AnvilDamageEvent.patch index 7641b6bb6..329b2c004 100644 --- a/Spigot-API-Patches/0130-AnvilDamageEvent.patch +++ b/Spigot-API-Patches/0129-AnvilDamageEvent.patch @@ -1,4 +1,4 @@ -From b08e64c433d4014812d1c11d8ef43268f6804dcb Mon Sep 17 00:00:00 2001 +From 0f9d603a9e7c9ab64802df817318b11c73fc40e3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 20 Jul 2018 23:36:55 -0500 Subject: [PATCH] AnvilDamageEvent @@ -6,7 +6,7 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java new file mode 100644 -index 000000000..fd3c5c02e +index 00000000..fd3c5c02 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java @@ -0,0 +1,139 @@ @@ -150,5 +150,5 @@ index 000000000..fd3c5c02e + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0131-Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/0130-Remove-deadlock-risk-in-firing-async-events.patch similarity index 97% rename from Spigot-API-Patches/0131-Remove-deadlock-risk-in-firing-async-events.patch rename to Spigot-API-Patches/0130-Remove-deadlock-risk-in-firing-async-events.patch index b86f7628c..073a0ce81 100644 --- a/Spigot-API-Patches/0131-Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/0130-Remove-deadlock-risk-in-firing-async-events.patch @@ -1,4 +1,4 @@ -From 2c3530cf31446f0d52627710e8417518c98b3565 Mon Sep 17 00:00:00 2001 +From dabd3e4d0f10c1edbf09632a331af369251570b1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 00:32:05 -0400 Subject: [PATCH] Remove deadlock risk in firing async events @@ -16,7 +16,7 @@ which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index cb2b0b9cb..a7dd902fb 100644 +index cb2b0b9c..a7dd902f 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -385,7 +385,7 @@ public final class SimplePluginManager implements PluginManager { @@ -79,7 +79,7 @@ index cb2b0b9cb..a7dd902fb 100644 RegisteredListener[] listeners = handlers.getRegisteredListeners(); diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java -index 6b86128e1..56308c0c6 100644 +index 6b86128e..56308c0c 100644 --- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java +++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java @@ -19,7 +19,7 @@ public class PluginManagerTest { @@ -118,5 +118,5 @@ index 6b86128e1..56308c0c6 100644 @Test public void testAsyncUnlocked() throws InterruptedException { -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0132-Add-hand-to-bucket-events.patch b/Spigot-API-Patches/0131-Add-hand-to-bucket-events.patch similarity index 96% rename from Spigot-API-Patches/0132-Add-hand-to-bucket-events.patch rename to Spigot-API-Patches/0131-Add-hand-to-bucket-events.patch index 934e04ec6..5a3194b1c 100644 --- a/Spigot-API-Patches/0132-Add-hand-to-bucket-events.patch +++ b/Spigot-API-Patches/0131-Add-hand-to-bucket-events.patch @@ -1,11 +1,11 @@ -From 540ea528206d24ac317b8f88b0524917a54dc7ca Mon Sep 17 00:00:00 2001 +From ee92360b2c18d34c94f3e40c293fdc53ac681ba5 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Thu, 2 Aug 2018 08:44:20 -0500 Subject: [PATCH] Add hand to bucket events diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java -index 8fb121a91..7b9596f30 100644 +index 8fb121a9..7b9596f3 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java @@ -5,6 +5,7 @@ import org.bukkit.block.Block; @@ -30,7 +30,7 @@ index 8fb121a91..7b9596f30 100644 public HandlerList getHandlers() { return handlers; diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java -index 56584687f..3dbe428ba 100644 +index 56584687..3dbe428b 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java @@ -5,6 +5,7 @@ import org.bukkit.block.Block; @@ -82,7 +82,7 @@ index 56584687f..3dbe428ba 100644 return cancelled; } diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java -index 94e042a36..884b9240b 100644 +index 94e042a3..884b9240 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java @@ -5,6 +5,7 @@ import org.bukkit.block.Block; @@ -107,5 +107,5 @@ index 94e042a36..884b9240b 100644 public HandlerList getHandlers() { return handlers; -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0133-Add-TNTPrimeEvent.patch b/Spigot-API-Patches/0132-Add-TNTPrimeEvent.patch similarity index 97% rename from Spigot-API-Patches/0133-Add-TNTPrimeEvent.patch rename to Spigot-API-Patches/0132-Add-TNTPrimeEvent.patch index 3b9ac2679..d8920d9ed 100644 --- a/Spigot-API-Patches/0133-Add-TNTPrimeEvent.patch +++ b/Spigot-API-Patches/0132-Add-TNTPrimeEvent.patch @@ -1,4 +1,4 @@ -From 3d3caa8002d35ede44fd008d5b92ff4db850dfc6 Mon Sep 17 00:00:00 2001 +From 158e880fb788c001e8f0488860132577c9b0bdc9 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 15 Jul 2018 22:17:55 +0300 Subject: [PATCH] Add TNTPrimeEvent @@ -6,7 +6,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java new file mode 100644 -index 000000000..2ae8826bb +index 00000000..2ae8826b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java @@ -0,0 +1,108 @@ @@ -119,5 +119,5 @@ index 000000000..2ae8826bb + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0134-Provide-Chunk-Coordinates-as-a-Long-API.patch b/Spigot-API-Patches/0133-Provide-Chunk-Coordinates-as-a-Long-API.patch similarity index 94% rename from Spigot-API-Patches/0134-Provide-Chunk-Coordinates-as-a-Long-API.patch rename to Spigot-API-Patches/0133-Provide-Chunk-Coordinates-as-a-Long-API.patch index f824cc159..464b94f37 100644 --- a/Spigot-API-Patches/0134-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/Spigot-API-Patches/0133-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -1,4 +1,4 @@ -From e1702becffffcfef95443310f01d1b93dcd5e38f Mon Sep 17 00:00:00 2001 +From 29b931883c7086125b1f923b07f1282da12564f0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 4 Aug 2018 19:37:35 -0400 Subject: [PATCH] Provide Chunk Coordinates as a Long API @@ -7,7 +7,7 @@ Allows you to easily access the chunks X/z as a long, and a method to look up by the long key too. diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index 079b9feb..b347a3cc 100644 +index 441ed7ad..33cd0ea0 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java @@ -23,6 +23,32 @@ public interface Chunk { @@ -44,7 +44,7 @@ index 079b9feb..b347a3cc 100644 * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 7c700cc2..00d72565 100644 +index 301d9418..deabd400 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -139,6 +139,21 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -70,5 +70,5 @@ index 7c700cc2..00d72565 100644 * Checks if the specified {@link Chunk} is loaded * -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0135-Async-Chunks-API.patch b/Spigot-API-Patches/0134-Async-Chunks-API.patch similarity index 99% rename from Spigot-API-Patches/0135-Async-Chunks-API.patch rename to Spigot-API-Patches/0134-Async-Chunks-API.patch index d03502f25..e7b955562 100644 --- a/Spigot-API-Patches/0135-Async-Chunks-API.patch +++ b/Spigot-API-Patches/0134-Async-Chunks-API.patch @@ -1,4 +1,4 @@ -From bad3fe871eeaf7fe3ce39307f84193c264c833cb Mon Sep 17 00:00:00 2001 +From 950ee556b124e63be9df736c7a6297cdfa3030d7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 17:43:33 -0600 Subject: [PATCH] Async Chunks API @@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 00d72565..8e322cab 100644 +index deabd400..92688252 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -152,6 +152,352 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -365,7 +365,7 @@ index 00d72565..8e322cab 100644 /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index f94160bf..5ee57656 100644 +index 2dd7a03c..59787c47 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -135,6 +135,28 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -398,5 +398,5 @@ index f94160bf..5ee57656 100644 * Returns a list of entities within a bounding box centered around this * entity -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0136-Make-EnderDragon-extend-Mob.patch b/Spigot-API-Patches/0135-Make-EnderDragon-extend-Mob.patch similarity index 91% rename from Spigot-API-Patches/0136-Make-EnderDragon-extend-Mob.patch rename to Spigot-API-Patches/0135-Make-EnderDragon-extend-Mob.patch index 160500db9..f8089d415 100644 --- a/Spigot-API-Patches/0136-Make-EnderDragon-extend-Mob.patch +++ b/Spigot-API-Patches/0135-Make-EnderDragon-extend-Mob.patch @@ -1,4 +1,4 @@ -From acdfbc0be6e8f8c4802d06818ad3fc506bbd2924 Mon Sep 17 00:00:00 2001 +From 6361a0fad5e6fda97790f4f72d39cdda3b766fcb Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 10 Aug 2018 22:08:34 -0400 Subject: [PATCH] Make EnderDragon extend Mob @@ -18,5 +18,5 @@ index 7170d37a..3ba49208 100644 /** * Represents a phase or action that an Ender Dragon can perform. -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-API-Patches/0136-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 90% rename from Spigot-API-Patches/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-API-Patches/0136-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index d6fd00d91..87e3b6ef1 100644 --- a/Spigot-API-Patches/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/Spigot-API-Patches/0136-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -1,11 +1,11 @@ -From 137d156f83cec3d2648e58d9701643131e773877 Mon Sep 17 00:00:00 2001 +From c70c957d8f12e7449791fc452632a12e3b316800 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 15 Aug 2018 01:04:58 -0400 Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index b347a3ccf..8a8043351 100644 +index 33cd0ea0..35407d5e 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java @@ -93,12 +93,24 @@ public interface Chunk { @@ -35,5 +35,5 @@ index b347a3ccf..8a8043351 100644 /** * Checks if the chunk is loaded. -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0138-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch b/Spigot-API-Patches/0137-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch similarity index 90% rename from Spigot-API-Patches/0138-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch rename to Spigot-API-Patches/0137-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch index fb16a47ec..b9c90578e 100644 --- a/Spigot-API-Patches/0138-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch +++ b/Spigot-API-Patches/0137-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch @@ -1,11 +1,11 @@ -From db089bcf65dcc04d651a6f5a1efc594ffc0956eb Mon Sep 17 00:00:00 2001 +From 437e17e4c522a9e7f87441f3b44efc36166f8b53 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 15 Aug 2018 01:19:37 -0400 Subject: [PATCH] Don't use snapshots for Timings Tile Entity reports diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java -index c2c2fb83..769facd8 100644 +index 28d0954a..7ad9400a 100644 --- a/src/main/java/co/aikar/timings/TimingHistory.java +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -118,7 +118,7 @@ public class TimingHistory { @@ -18,5 +18,5 @@ index c2c2fb83..769facd8 100644 Bukkit.getLogger().warning("Null tileentity detected in chunk at position x: " + chunk.getX() + ", z: " + chunk.getZ()); continue; -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0139-Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/0138-Allow-Blocks-to-be-accessed-via-a-long-key.patch similarity index 97% rename from Spigot-API-Patches/0139-Allow-Blocks-to-be-accessed-via-a-long-key.patch rename to Spigot-API-Patches/0138-Allow-Blocks-to-be-accessed-via-a-long-key.patch index 79cf6331d..a01c2db57 100644 --- a/Spigot-API-Patches/0139-Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/0138-Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -1,4 +1,4 @@ -From 6c57e466396348da4e30c996c0d1f3b8555d5ea2 Mon Sep 17 00:00:00 2001 +From 10ce18ced17baa36f2ffe0e9a3604e314d20830f Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 14 Aug 2018 21:42:10 -0700 Subject: [PATCH] Allow Blocks to be accessed via a long key @@ -49,7 +49,7 @@ index 8dcb15fb..7e1ee875 100644 * @return A new location where X/Y/Z are the center of the block */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 6635285f..071a8490 100644 +index 92688252..1467debe 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -75,6 +75,37 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0140-Slime-Pathfinder-Events.patch b/Spigot-API-Patches/0139-Slime-Pathfinder-Events.patch similarity index 98% rename from Spigot-API-Patches/0140-Slime-Pathfinder-Events.patch rename to Spigot-API-Patches/0139-Slime-Pathfinder-Events.patch index c7dddfbeb..06a0592c0 100644 --- a/Spigot-API-Patches/0140-Slime-Pathfinder-Events.patch +++ b/Spigot-API-Patches/0139-Slime-Pathfinder-Events.patch @@ -1,4 +1,4 @@ -From 9525177fd2b2c81a4b586beaa0df3f4190c7fca8 Mon Sep 17 00:00:00 2001 +From 6c82e7b5c506dfd85e0f5d607c218966c035e06c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 08:18:27 -0500 Subject: [PATCH] Slime Pathfinder Events @@ -207,5 +207,5 @@ index 1119e26e..c4791f95 100644 + // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0141-isChunkGenerated-API.patch b/Spigot-API-Patches/0140-isChunkGenerated-API.patch similarity index 95% rename from Spigot-API-Patches/0141-isChunkGenerated-API.patch rename to Spigot-API-Patches/0140-isChunkGenerated-API.patch index fe508d8e3..250d8803f 100644 --- a/Spigot-API-Patches/0141-isChunkGenerated-API.patch +++ b/Spigot-API-Patches/0140-isChunkGenerated-API.patch @@ -1,4 +1,4 @@ -From f36153fbc7b8b55a0bb0529803d9e1fc60c14f36 Mon Sep 17 00:00:00 2001 +From 5bc40b8e037de01dacf424153054ac40301efefa Mon Sep 17 00:00:00 2001 From: cswhite2000 <18whitechristop@gmail.com> Date: Tue, 21 Aug 2018 19:39:46 -0700 Subject: [PATCH] isChunkGenerated API @@ -33,7 +33,7 @@ index 7e1ee875..9457832b 100644 /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index adace47c..de89122e 100644 +index 1467debe..668c9b7a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -184,6 +184,17 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -55,5 +55,5 @@ index adace47c..de89122e 100644 * This is the Legacy API before Java 8 was supported. Java 8 Consumer is provided, * as well as future support -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0142-Add-More-Creeper-API.patch b/Spigot-API-Patches/0141-Add-More-Creeper-API.patch similarity index 97% rename from Spigot-API-Patches/0142-Add-More-Creeper-API.patch rename to Spigot-API-Patches/0141-Add-More-Creeper-API.patch index 5ae32d881..4a91a8dcd 100644 --- a/Spigot-API-Patches/0142-Add-More-Creeper-API.patch +++ b/Spigot-API-Patches/0141-Add-More-Creeper-API.patch @@ -1,4 +1,4 @@ -From 9170ad8b1b11975233995f46a677b145286c471b Mon Sep 17 00:00:00 2001 +From eb0f960daf853e86b7b33d48033746b6fe4a0e4d Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 11:50:16 -0500 Subject: [PATCH] Add More Creeper API @@ -98,5 +98,5 @@ index f957d836..b9877fb8 100644 + // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0143-Add-PhantomPreSpawnEvent.patch b/Spigot-API-Patches/0142-Add-PhantomPreSpawnEvent.patch similarity index 96% rename from Spigot-API-Patches/0143-Add-PhantomPreSpawnEvent.patch rename to Spigot-API-Patches/0142-Add-PhantomPreSpawnEvent.patch index a5d9d3a42..aa2374255 100644 --- a/Spigot-API-Patches/0143-Add-PhantomPreSpawnEvent.patch +++ b/Spigot-API-Patches/0142-Add-PhantomPreSpawnEvent.patch @@ -1,4 +1,4 @@ -From db18095b2d1d5564f7b2395ed59f548b79e50e7c Mon Sep 17 00:00:00 2001 +From f5a1ce4f2c76ea0c0e04db4c4f8e292923864147 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 25 Aug 2018 19:56:42 -0500 Subject: [PATCH] Add PhantomPreSpawnEvent @@ -59,5 +59,5 @@ index 1a1044ed..65b703a2 100644 + // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0144-Add-source-block-to-BlockPhysicsEvent.patch b/Spigot-API-Patches/0143-Add-source-block-to-BlockPhysicsEvent.patch similarity index 95% rename from Spigot-API-Patches/0144-Add-source-block-to-BlockPhysicsEvent.patch rename to Spigot-API-Patches/0143-Add-source-block-to-BlockPhysicsEvent.patch index d5e201f60..43195c3a8 100644 --- a/Spigot-API-Patches/0144-Add-source-block-to-BlockPhysicsEvent.patch +++ b/Spigot-API-Patches/0143-Add-source-block-to-BlockPhysicsEvent.patch @@ -1,4 +1,4 @@ -From 488d14432be0bcc7e88db13e81a1e60de0789365 Mon Sep 17 00:00:00 2001 +From f6670ef133f3fce494c9f54045f6267657603349 Mon Sep 17 00:00:00 2001 From: Sotr Date: Thu, 23 Aug 2018 16:14:25 +0800 Subject: [PATCH] Add source block to BlockPhysicsEvent @@ -44,5 +44,5 @@ index 5e47eabe..9d9e4712 100644 /** -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0146-Inventory-removeItemAnySlot.patch b/Spigot-API-Patches/0144-Inventory-removeItemAnySlot.patch similarity index 96% rename from Spigot-API-Patches/0146-Inventory-removeItemAnySlot.patch rename to Spigot-API-Patches/0144-Inventory-removeItemAnySlot.patch index 5f0e4e1bf..12663f28c 100644 --- a/Spigot-API-Patches/0146-Inventory-removeItemAnySlot.patch +++ b/Spigot-API-Patches/0144-Inventory-removeItemAnySlot.patch @@ -1,4 +1,4 @@ -From 3f760c70899a4bd65a6c1489e7508f64b60b7339 Mon Sep 17 00:00:00 2001 +From 28b07fbe11475f6ab3ce856ba3aa93cb64bfc4c5 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 28 Aug 2018 23:04:06 -0400 Subject: [PATCH] Inventory#removeItemAnySlot @@ -43,5 +43,5 @@ index 2dbba001..ec58e972 100644 * Returns all ItemStacks from the inventory * -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0145-Add-Force-Loaded-Chunk-API.patch b/Spigot-API-Patches/0145-Add-Force-Loaded-Chunk-API.patch deleted file mode 100644 index 20e601856..000000000 --- a/Spigot-API-Patches/0145-Add-Force-Loaded-Chunk-API.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 14a1db13c30927e0e9b1b1b9540aab8f749b1df7 Mon Sep 17 00:00:00 2001 -From: willies952002 -Date: Wed, 29 Aug 2018 00:37:30 -0400 -Subject: [PATCH] Add Force-Loaded Chunk API - - -diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index 8a804335..4b9e0ca4 100644 ---- a/src/main/java/org/bukkit/Chunk.java -+++ b/src/main/java/org/bukkit/Chunk.java -@@ -168,4 +168,20 @@ public interface Chunk { - * @return true if slimes are able to spawn in this chunk - */ - boolean isSlimeChunk(); -+ -+ // Paper start - Force-Loaded Chunk API -+ /** -+ * Checks if the chunk is currently force-loaded -+ * -+ * @return true if the chunk is force-loaded, otherwise false -+ */ -+ boolean isForceLoaded(); -+ -+ /** -+ * Set's whether a chunk is force-loaded or not -+ * -+ * @param force whether or not to force load this chunk -+ */ -+ void setForceLoaded(boolean force); -+ // Paper end - } -diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index de89122e..aa28c452 100644 ---- a/src/main/java/org/bukkit/World.java -+++ b/src/main/java/org/bukkit/World.java -@@ -195,6 +195,16 @@ public interface World extends PluginMessageRecipient, Metadatable { - return isChunkGenerated((int) chunkKey, (int) (chunkKey >> 32)); - } - -+ /** -+ * Checks if a chunk is force-loaded. -+ * Note: This will only return true if the chunk is also generated -+ * -+ * @param x X-coordinate of the chunk -+ * @param z Z-coordinate of the chunk -+ * @return true if the chunk is force-loaded. otherwise false -+ */ -+ public boolean isChunkForceLoaded(int x, int z); -+ - /** - * This is the Legacy API before Java 8 was supported. Java 8 Consumer is provided, - * as well as future support --- -2.19.1 - diff --git a/Spigot-API-Patches/0147-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-API-Patches/0145-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 97% rename from Spigot-API-Patches/0147-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-API-Patches/0145-Add-ray-tracing-methods-to-LivingEntity.patch index 2625e29cb..641feb3a2 100644 --- a/Spigot-API-Patches/0147-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-API-Patches/0145-Add-ray-tracing-methods-to-LivingEntity.patch @@ -1,4 +1,4 @@ -From f7250d46b04c8d3ea217087c674301f006f92287 Mon Sep 17 00:00:00 2001 +From 797ddcb8d1d7aaa58ed9a7c7fb867158e932facc Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 3 Sep 2018 18:13:53 -0500 Subject: [PATCH] Add ray tracing methods to LivingEntity @@ -6,7 +6,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java new file mode 100644 -index 000000000..fe43d9557 +index 00000000..fe43d955 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java @@ -0,0 +1,50 @@ @@ -61,7 +61,7 @@ index 000000000..fe43d9557 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index e3bc04e1c..bd47e7209 100644 +index e3bc04e1..bd47e720 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -78,6 +78,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -143,5 +143,5 @@ index e3bc04e1c..bd47e7209 100644 * Gets the last two blocks along the living entity's line of sight. *

-- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0148-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch similarity index 92% rename from Spigot-API-Patches/0148-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch index a8b01c6ad..8f9701b39 100644 --- a/Spigot-API-Patches/0148-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch @@ -1,11 +1,11 @@ -From fa58997c542e7d960489559b70bc4219db6dbd5c Mon Sep 17 00:00:00 2001 +From 288d6642d635afea38e19dfd087b11ddd00224c5 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 4 Sep 2018 15:01:54 -0500 Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c9f027f99..7f6ae5d16 100644 +index c9f027f9..7f6ae5d1 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1907,6 +1907,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -36,5 +36,5 @@ index c9f027f99..7f6ae5d16 100644 // Spigot start -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0149-Improve-death-events.patch b/Spigot-API-Patches/0147-Improve-death-events.patch similarity index 98% rename from Spigot-API-Patches/0149-Improve-death-events.patch rename to Spigot-API-Patches/0147-Improve-death-events.patch index d86d43608..6229789f9 100644 --- a/Spigot-API-Patches/0149-Improve-death-events.patch +++ b/Spigot-API-Patches/0147-Improve-death-events.patch @@ -1,4 +1,4 @@ -From aef4c17d56b4333e03d4a071b0f3fd61a7c9bab8 Mon Sep 17 00:00:00 2001 +From 693483de100436c064845dd752f5f1ee987450fd Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:32:28 +0100 Subject: [PATCH] Improve death events @@ -173,5 +173,5 @@ index ab9e81fd..fef134c6 100644 + // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0150-Mob-Pathfinding-API.patch b/Spigot-API-Patches/0148-Mob-Pathfinding-API.patch similarity index 98% rename from Spigot-API-Patches/0150-Mob-Pathfinding-API.patch rename to Spigot-API-Patches/0148-Mob-Pathfinding-API.patch index 66c44cc67..6d6e50921 100644 --- a/Spigot-API-Patches/0150-Mob-Pathfinding-API.patch +++ b/Spigot-API-Patches/0148-Mob-Pathfinding-API.patch @@ -1,4 +1,4 @@ -From 8287fe3f64b74ccd77c5b7e26d4ac557be8d8998 Mon Sep 17 00:00:00 2001 +From e56639fa55ad0e1d2a489c71c999dfba9aafda53 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 12:39:06 -0400 Subject: [PATCH] Mob Pathfinding API @@ -13,7 +13,7 @@ You can use EntityPathfindEvent to cancel new pathfinds from overriding your cur diff --git a/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java new file mode 100644 -index 000000000..d6953b390 +index 00000000..d6953b39 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java @@ -0,0 +1,167 @@ @@ -185,7 +185,7 @@ index 000000000..d6953b390 + } +} diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java -index d029d34ea..48eddcd30 100644 +index d029d34e..48eddcd3 100644 --- a/src/main/java/org/bukkit/entity/Mob.java +++ b/src/main/java/org/bukkit/entity/Mob.java @@ -7,6 +7,14 @@ import org.bukkit.loot.Lootable; @@ -204,5 +204,5 @@ index d029d34ea..48eddcd30 100644 * Instructs this Mob to set the specified LivingEntity as its target. *

-- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0151-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/Spigot-API-Patches/0149-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch similarity index 98% rename from Spigot-API-Patches/0151-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch rename to Spigot-API-Patches/0149-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch index 95baa7bc0..42d3d22e5 100644 --- a/Spigot-API-Patches/0151-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch +++ b/Spigot-API-Patches/0149-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch @@ -1,4 +1,4 @@ -From ceef7057702a9be623ecad7664d826ab2516bd0e Mon Sep 17 00:00:00 2001 +From 830ac878de07dc95bcef19e838d0d5bf78986b47 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:35 +0300 Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values @@ -217,7 +217,7 @@ index fe8d3468..074769c1 100644 return key; } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index df51f3ca..e9f640fb 100644 +index 4d0351c4..03e3cfd4 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -82,13 +82,13 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { @@ -245,7 +245,7 @@ index df51f3ca..e9f640fb 100644 * Returns an empty map if none. * * @return An immutable copy of the enchantments -@@ -365,4 +365,83 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { +@@ -363,4 +363,83 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { Spigot spigot(); // Spigot end @@ -330,5 +330,5 @@ index df51f3ca..e9f640fb 100644 + // Paper end } -- -2.19.2 +2.20.1 diff --git a/Spigot-API-Patches/0152-Performance-Concurrency-Improvements-to-Permissions.patch b/Spigot-API-Patches/0150-Performance-Concurrency-Improvements-to-Permissions.patch similarity index 97% rename from Spigot-API-Patches/0152-Performance-Concurrency-Improvements-to-Permissions.patch rename to Spigot-API-Patches/0150-Performance-Concurrency-Improvements-to-Permissions.patch index 0ff1bd8d5..f92c8ed7c 100644 --- a/Spigot-API-Patches/0152-Performance-Concurrency-Improvements-to-Permissions.patch +++ b/Spigot-API-Patches/0150-Performance-Concurrency-Improvements-to-Permissions.patch @@ -1,4 +1,4 @@ -From 8cc83558c69d808807f58f7fd8986921a4bf285c Mon Sep 17 00:00:00 2001 +From 64ae4c1416201184004acc97e8973c304b5382e7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 13 Sep 2018 20:51:50 -0400 Subject: [PATCH] Performance & Concurrency Improvements to Permissions @@ -18,7 +18,7 @@ Optimized it to simply be a single get call cutting permission map lookups in half. diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java -index d4cb00a82..486f69f86 100644 +index d4cb00a8..486f69f8 100644 --- a/src/main/java/org/bukkit/permissions/PermissibleBase.java +++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java @@ -68,8 +68,11 @@ public class PermissibleBase implements Permissible { @@ -110,5 +110,5 @@ index d4cb00a82..486f69f86 100644 } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0153-Add-ItemStackRecipeChoice-Draft-API.patch b/Spigot-API-Patches/0151-Add-ItemStackRecipeChoice-Draft-API.patch similarity index 95% rename from Spigot-API-Patches/0153-Add-ItemStackRecipeChoice-Draft-API.patch rename to Spigot-API-Patches/0151-Add-ItemStackRecipeChoice-Draft-API.patch index 662134e0f..13b3969af 100644 --- a/Spigot-API-Patches/0153-Add-ItemStackRecipeChoice-Draft-API.patch +++ b/Spigot-API-Patches/0151-Add-ItemStackRecipeChoice-Draft-API.patch @@ -1,4 +1,4 @@ -From e76b659f5e22697dc759adffd8ed7d470cc020a2 Mon Sep 17 00:00:00 2001 +From b40f077ca0c583d5bd25b14c8ecd7e3eed96b4be Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 13 Sep 2018 21:39:26 -0400 Subject: [PATCH] Add ItemStackRecipeChoice Draft API @@ -9,7 +9,7 @@ Allows creating recipes that must match isSimilar to full item stack. diff --git a/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java b/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java new file mode 100644 -index 000000000..43e6576b1 +index 00000000..43e6576b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java @@ -0,0 +1,51 @@ @@ -65,5 +65,5 @@ index 000000000..43e6576b1 + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0154-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-API-Patches/0152-Implement-furnace-cook-speed-multiplier-API.patch similarity index 95% rename from Spigot-API-Patches/0154-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-API-Patches/0152-Implement-furnace-cook-speed-multiplier-API.patch index dfdffa0e9..16789a6e3 100644 --- a/Spigot-API-Patches/0154-Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-API-Patches/0152-Implement-furnace-cook-speed-multiplier-API.patch @@ -1,4 +1,4 @@ -From 85d81decb16af5bacff8ec75be26f94d1c81b5fa Mon Sep 17 00:00:00 2001 +From cb8dd2ae05fdc76057c79ecd8936954fd812a9e1 Mon Sep 17 00:00:00 2001 From: Tassu Date: Thu, 13 Sep 2018 08:45:01 +0300 Subject: [PATCH] Implement furnace cook speed multiplier API diff --git a/Spigot-API-Patches/0155-PreSpawnerSpawnEvent.patch b/Spigot-API-Patches/0153-PreSpawnerSpawnEvent.patch similarity index 94% rename from Spigot-API-Patches/0155-PreSpawnerSpawnEvent.patch rename to Spigot-API-Patches/0153-PreSpawnerSpawnEvent.patch index 98686617e..b6f76b601 100644 --- a/Spigot-API-Patches/0155-PreSpawnerSpawnEvent.patch +++ b/Spigot-API-Patches/0153-PreSpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From 32a60bd35059c35a3e7d359a37400769b93c6e31 Mon Sep 17 00:00:00 2001 +From 03de4ff3ffc69cd1597f223ab8154466131f3283 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 18 Sep 2018 23:50:10 +0100 Subject: [PATCH] PreSpawnerSpawnEvent @@ -10,7 +10,7 @@ spawners. diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java new file mode 100644 -index 000000000..d72212105 +index 00000000..d7221210 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java @@ -0,0 +1,27 @@ @@ -42,5 +42,5 @@ index 000000000..d72212105 + } +} -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0156-Remove-Precondition-on-name-for-AttributeModifier.patch b/Spigot-API-Patches/0154-Remove-Precondition-on-name-for-AttributeModifier.patch similarity index 91% rename from Spigot-API-Patches/0156-Remove-Precondition-on-name-for-AttributeModifier.patch rename to Spigot-API-Patches/0154-Remove-Precondition-on-name-for-AttributeModifier.patch index 62d770353..fdd506920 100644 --- a/Spigot-API-Patches/0156-Remove-Precondition-on-name-for-AttributeModifier.patch +++ b/Spigot-API-Patches/0154-Remove-Precondition-on-name-for-AttributeModifier.patch @@ -1,4 +1,4 @@ -From 7a42dca8e149969ed13cdae48a9cdf98262a3319 Mon Sep 17 00:00:00 2001 +From beb196480c0a50f244dfbc99d7d8f8f8f9123e03 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 22 Sep 2018 18:41:01 -0400 Subject: [PATCH] Remove Precondition on name for AttributeModifier @@ -6,7 +6,7 @@ Subject: [PATCH] Remove Precondition on name for AttributeModifier Vanilla allows empty names diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index 2bc9878ff..0943eee46 100644 +index 2bc9878f..0943eee4 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -30,10 +30,10 @@ public class AttributeModifier implements ConfigurationSerializable { @@ -23,5 +23,5 @@ index 2bc9878ff..0943eee46 100644 this.operation = operation; this.slot = slot; -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0157-Material-API-additions.patch b/Spigot-API-Patches/0155-Material-API-additions.patch similarity index 91% rename from Spigot-API-Patches/0157-Material-API-additions.patch rename to Spigot-API-Patches/0155-Material-API-additions.patch index 9b2cb930c..87f4ed92a 100644 --- a/Spigot-API-Patches/0157-Material-API-additions.patch +++ b/Spigot-API-Patches/0155-Material-API-additions.patch @@ -1,11 +1,11 @@ -From 36f2224286f0b66b0230f0ad4cfd914c603d8488 Mon Sep 17 00:00:00 2001 +From 9f8161e612c20011aefaab900ee328d011344ce7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 6 Oct 2018 21:14:29 -0400 Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 14cae61fb..393024343 100644 +index 14cae61f..39302434 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -72,6 +72,7 @@ import org.bukkit.material.MaterialData; @@ -40,5 +40,5 @@ index 14cae61fb..393024343 100644 * Do not use for any reason. * -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0158-Add-Material-Tags.patch b/Spigot-API-Patches/0156-Add-Material-Tags.patch similarity index 99% rename from Spigot-API-Patches/0158-Add-Material-Tags.patch rename to Spigot-API-Patches/0156-Add-Material-Tags.patch index 41fb6b7e6..687c19064 100644 --- a/Spigot-API-Patches/0158-Add-Material-Tags.patch +++ b/Spigot-API-Patches/0156-Add-Material-Tags.patch @@ -1,4 +1,4 @@ -From 340d4255fde17caa3dff4eed9f2c63aab197f877 Mon Sep 17 00:00:00 2001 +From add76949997b755d73d123817b65e0551d58f6b3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 17 Jul 2018 01:27:15 -0400 Subject: [PATCH] Add Material Tags @@ -8,7 +8,7 @@ are related to each other by a trait. diff --git a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java new file mode 100644 -index 000000000..b4f78e075 +index 00000000..b4f78e07 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java @@ -0,0 +1,139 @@ @@ -153,7 +153,7 @@ index 000000000..b4f78e075 +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 000000000..7a48445da +index 00000000..7a48445d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java @@ -0,0 +1,377 @@ @@ -536,7 +536,7 @@ index 000000000..7a48445da +} diff --git a/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java new file mode 100644 -index 000000000..328c51471 +index 00000000..328c5147 --- /dev/null +++ b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java @@ -0,0 +1,25 @@ @@ -566,7 +566,7 @@ index 000000000..328c51471 + } +} diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java -index 2d8403206..613675c3b 100644 +index 2d840320..613675c3 100644 --- a/src/test/java/org/bukkit/TestServer.java +++ b/src/test/java/org/bukkit/TestServer.java @@ -30,6 +30,16 @@ public class TestServer implements InvocationHandler { @@ -587,5 +587,5 @@ index 2d8403206..613675c3b 100644 Server.class.getMethod("getPluginManager"), new MethodHandler() { -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0159-Allow-setting-the-vex-s-summoner.patch b/Spigot-API-Patches/0157-Allow-setting-the-vex-s-summoner.patch similarity index 92% rename from Spigot-API-Patches/0159-Allow-setting-the-vex-s-summoner.patch rename to Spigot-API-Patches/0157-Allow-setting-the-vex-s-summoner.patch index 61d4d21d8..05d6b7a79 100644 --- a/Spigot-API-Patches/0159-Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-API-Patches/0157-Allow-setting-the-vex-s-summoner.patch @@ -1,4 +1,4 @@ -From 1b3e6a9e6dba9df96c4080e4bbcb5afe9466637c Mon Sep 17 00:00:00 2001 +From 58c627929f89adfa0b2353bd1d9e01984e462b03 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 21:47:09 -0500 Subject: [PATCH] Allow setting the vex's summoner @@ -30,5 +30,5 @@ index d395e405..78f0082e 100644 + // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0160-Add-LivingEntity-getTargetEntity.patch b/Spigot-API-Patches/0158-Add-LivingEntity-getTargetEntity.patch similarity index 96% rename from Spigot-API-Patches/0160-Add-LivingEntity-getTargetEntity.patch rename to Spigot-API-Patches/0158-Add-LivingEntity-getTargetEntity.patch index e158bdcd8..e5da342fc 100644 --- a/Spigot-API-Patches/0160-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-API-Patches/0158-Add-LivingEntity-getTargetEntity.patch @@ -1,4 +1,4 @@ -From 4b568e4b100ab191c511089dd45114dee7e1c7b8 Mon Sep 17 00:00:00 2001 +From c3cd722b840b3e0a65f7592c33897c9b9dee852c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 22 Sep 2018 00:32:53 -0500 Subject: [PATCH] Add LivingEntity#getTargetEntity @@ -6,7 +6,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java new file mode 100644 -index 000000000..5df8eed23 +index 00000000..5df8eed2 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java @@ -0,0 +1,35 @@ @@ -46,7 +46,7 @@ index 000000000..5df8eed23 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index bd47e7209..34a8fe3f7 100644 +index bd47e720..34a8fe3f 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -147,6 +147,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -101,5 +101,5 @@ index bd47e7209..34a8fe3f7 100644 /** -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0161-Add-sun-related-API.patch b/Spigot-API-Patches/0159-Add-sun-related-API.patch similarity index 88% rename from Spigot-API-Patches/0161-Add-sun-related-API.patch rename to Spigot-API-Patches/0159-Add-sun-related-API.patch index e3769fa25..dad102382 100644 --- a/Spigot-API-Patches/0161-Add-sun-related-API.patch +++ b/Spigot-API-Patches/0159-Add-sun-related-API.patch @@ -1,14 +1,14 @@ -From 09dee3bad3aecdc375e9059a0679536b3dc2a23b Mon Sep 17 00:00:00 2001 +From 57018093cd49e64641888299c3c0645fe7d157e3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:15 -0500 Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index aa28c452..27e58136 100644 +index 668c9b7a..67e062b8 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1423,6 +1423,16 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1446,6 +1446,16 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public void setFullTime(long time); @@ -44,5 +44,5 @@ index 48eddcd3..1b108a4a 100644 /** -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0162-Here-s-Johnny.patch b/Spigot-API-Patches/0160-Here-s-Johnny.patch similarity index 95% rename from Spigot-API-Patches/0162-Here-s-Johnny.patch rename to Spigot-API-Patches/0160-Here-s-Johnny.patch index d83d3767e..6ee7cb03b 100644 --- a/Spigot-API-Patches/0162-Here-s-Johnny.patch +++ b/Spigot-API-Patches/0160-Here-s-Johnny.patch @@ -1,4 +1,4 @@ -From 11cd00a4ed9f1c168842b3fe90c2a16c07241e1f Mon Sep 17 00:00:00 2001 +From ce30c5582810d5202d0a72af02321e2a0ee1420c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 01:37:16 -0500 Subject: [PATCH] Here's Johnny! @@ -41,5 +41,5 @@ index b8ea68a8..c5d9e76a 100644 + // Paper end +} -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0163-Turtle-API.patch b/Spigot-API-Patches/0161-Turtle-API.patch similarity index 97% rename from Spigot-API-Patches/0163-Turtle-API.patch rename to Spigot-API-Patches/0161-Turtle-API.patch index bda8d683c..cc9376d7c 100644 --- a/Spigot-API-Patches/0163-Turtle-API.patch +++ b/Spigot-API-Patches/0161-Turtle-API.patch @@ -1,4 +1,4 @@ -From 2b4c99b420dceb1f6c57d19416ba20d1eee8005b Mon Sep 17 00:00:00 2001 +From 853b766f604c2846ccace37753d58df97c8834b1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 28 Sep 2018 17:08:09 -0500 Subject: [PATCH] Turtle API @@ -6,7 +6,7 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java new file mode 100644 -index 000000000..11248ee93 +index 00000000..11248ee9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java @@ -0,0 +1,45 @@ @@ -57,7 +57,7 @@ index 000000000..11248ee93 +} diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java new file mode 100644 -index 000000000..7cb00f78d +index 00000000..7cb00f78 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java @@ -0,0 +1,81 @@ @@ -144,7 +144,7 @@ index 000000000..7cb00f78d +} diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java new file mode 100644 -index 000000000..5d53ee08b +index 00000000..5d53ee08 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java @@ -0,0 +1,57 @@ @@ -206,7 +206,7 @@ index 000000000..5d53ee08b + } +} diff --git a/src/main/java/org/bukkit/entity/Turtle.java b/src/main/java/org/bukkit/entity/Turtle.java -index 0a4cd2993..e547eead4 100644 +index 0a4cd299..e547eead 100644 --- a/src/main/java/org/bukkit/entity/Turtle.java +++ b/src/main/java/org/bukkit/entity/Turtle.java @@ -1,6 +1,53 @@ @@ -265,5 +265,5 @@ index 0a4cd2993..e547eead4 100644 + // Paper end +} -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0164-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-API-Patches/0162-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 95% rename from Spigot-API-Patches/0164-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-API-Patches/0162-Implement-getters-and-setters-for-EntityItem-owner-a.patch index 1a610ace9..50ba78c42 100644 --- a/Spigot-API-Patches/0164-Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ b/Spigot-API-Patches/0162-Implement-getters-and-setters-for-EntityItem-owner-a.patch @@ -1,4 +1,4 @@ -From 9848837a4d460976eaaa3643870f52c3f3ecc95c Mon Sep 17 00:00:00 2001 +From 2c380e9b76d24bea7deef42af4e95bcf6e3fec2a Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 20:54:13 -0500 Subject: [PATCH] Implement getters and setters for EntityItem owner and @@ -58,5 +58,5 @@ index 2e98e4f9..8049b36c 100644 // Paper end } -- -2.19.0 +2.20.1 diff --git a/Spigot-API-Patches/0165-Add-spectator-target-events.patch b/Spigot-API-Patches/0163-Add-spectator-target-events.patch similarity index 98% rename from Spigot-API-Patches/0165-Add-spectator-target-events.patch rename to Spigot-API-Patches/0163-Add-spectator-target-events.patch index 1a357fca7..8a5ba4bb8 100644 --- a/Spigot-API-Patches/0165-Add-spectator-target-events.patch +++ b/Spigot-API-Patches/0163-Add-spectator-target-events.patch @@ -1,4 +1,4 @@ -From 44a47707ed4cc9e39a4e054061e8b58c6eb02790 Mon Sep 17 00:00:00 2001 +From fb900dc1cd53f7634e16210beac32550300cfc85 Mon Sep 17 00:00:00 2001 From: Caleb Bassham Date: Fri, 28 Sep 2018 02:30:56 -0500 Subject: [PATCH] Add spectator target events @@ -131,5 +131,5 @@ index 00000000..ce23caaf + } +} -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0166-Add-more-Witch-API.patch b/Spigot-API-Patches/0164-Add-more-Witch-API.patch similarity index 92% rename from Spigot-API-Patches/0166-Add-more-Witch-API.patch rename to Spigot-API-Patches/0164-Add-more-Witch-API.patch index 4c7b4a9dc..597be7bd9 100644 --- a/Spigot-API-Patches/0166-Add-more-Witch-API.patch +++ b/Spigot-API-Patches/0164-Add-more-Witch-API.patch @@ -1,11 +1,11 @@ -From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001 +From 3df85d0e4c57460cf7644e4acd0a42ce53bd05f6 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 03:47:26 -0500 Subject: [PATCH] Add more Witch API diff --git a/src/main/java/org/bukkit/entity/Witch.java b/src/main/java/org/bukkit/entity/Witch.java -index 7ac07ac07ac0..7ac07ac07ac0 100644 +index 4b27f689..64ec8409 100644 --- a/src/main/java/org/bukkit/entity/Witch.java +++ b/src/main/java/org/bukkit/entity/Witch.java @@ -2,8 +2,42 @@ package org.bukkit.entity; @@ -53,5 +53,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 + // Paper end } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0167-Make-the-default-permission-message-configurable.patch b/Spigot-API-Patches/0165-Make-the-default-permission-message-configurable.patch similarity index 92% rename from Spigot-API-Patches/0167-Make-the-default-permission-message-configurable.patch rename to Spigot-API-Patches/0165-Make-the-default-permission-message-configurable.patch index a2d853da2..7c5aae107 100644 --- a/Spigot-API-Patches/0167-Make-the-default-permission-message-configurable.patch +++ b/Spigot-API-Patches/0165-Make-the-default-permission-message-configurable.patch @@ -1,11 +1,11 @@ -From f8b5db1f226e671fc1fd422e4723eb8eaa70eddc Mon Sep 17 00:00:00 2001 +From 7a729003770c77b436b94759d729f350a35ab14e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 19:44:54 +0000 Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 233a71540..22ca2900c 100644 +index 233a7154..22ca2900 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1463,6 +1463,14 @@ public final class Bukkit { @@ -24,7 +24,7 @@ index 233a71540..22ca2900c 100644 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b8076fc3f..9c78f18f6 100644 +index b8076fc3..9c78f18f 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1265,6 +1265,12 @@ public interface Server extends PluginMessageRecipient { @@ -41,7 +41,7 @@ index b8076fc3f..9c78f18f6 100644 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4a479627d..77171cd17 100644 +index 4a479627..77171cd1 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -180,7 +180,7 @@ public abstract class Command { @@ -54,5 +54,5 @@ index 4a479627d..77171cd17 100644 for (String line : permissionMessage.replace("", permission).split("\n")) { target.sendMessage(line); -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0168-Support-cancellation-supression-of-EntityDismount-Ve.patch b/Spigot-API-Patches/0166-Support-cancellation-supression-of-EntityDismount-Ve.patch similarity index 98% rename from Spigot-API-Patches/0168-Support-cancellation-supression-of-EntityDismount-Ve.patch rename to Spigot-API-Patches/0166-Support-cancellation-supression-of-EntityDismount-Ve.patch index 8c7d3734f..3a6a74d65 100644 --- a/Spigot-API-Patches/0168-Support-cancellation-supression-of-EntityDismount-Ve.patch +++ b/Spigot-API-Patches/0166-Support-cancellation-supression-of-EntityDismount-Ve.patch @@ -1,4 +1,4 @@ -From 9cc1d43c347c163357f283529d7fd0a9cefb5474 Mon Sep 17 00:00:00 2001 +From f09172180ea930533e2dfb629a6cd104ba613df4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 15:53:43 +0000 Subject: [PATCH] Support cancellation supression of EntityDismount/VehicleExit @@ -108,5 +108,5 @@ index 4110d3bb..555899ef 100644 public HandlerList getHandlers() { -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0169-Add-more-Zombie-API.patch b/Spigot-API-Patches/0167-Add-more-Zombie-API.patch similarity index 96% rename from Spigot-API-Patches/0169-Add-more-Zombie-API.patch rename to Spigot-API-Patches/0167-Add-more-Zombie-API.patch index 596bea2c5..ce97cf147 100644 --- a/Spigot-API-Patches/0169-Add-more-Zombie-API.patch +++ b/Spigot-API-Patches/0167-Add-more-Zombie-API.patch @@ -1,4 +1,4 @@ -From 8fc89f6aa5cd95b3b784cefd12a6e7e4bd4db165 Mon Sep 17 00:00:00 2001 +From 565b1a1d7031594461aa7fac5a6a63eb1ff7f803 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 04:29:51 -0500 Subject: [PATCH] Add more Zombie API @@ -65,5 +65,5 @@ index 48034198..615dd990 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-API-Patches/0170-Change-the-reserved-channel-check-to-be-sensible.patch b/Spigot-API-Patches/0168-Change-the-reserved-channel-check-to-be-sensible.patch similarity index 96% rename from Spigot-API-Patches/0170-Change-the-reserved-channel-check-to-be-sensible.patch rename to Spigot-API-Patches/0168-Change-the-reserved-channel-check-to-be-sensible.patch index 163a3a2b5..f0980e608 100644 --- a/Spigot-API-Patches/0170-Change-the-reserved-channel-check-to-be-sensible.patch +++ b/Spigot-API-Patches/0168-Change-the-reserved-channel-check-to-be-sensible.patch @@ -1,4 +1,4 @@ -From eb7842870179959eb5cec665ae4e51cda37da706 Mon Sep 17 00:00:00 2001 +From c607e328655c95d9773323d6c79c5e544ee27fe7 Mon Sep 17 00:00:00 2001 From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com> Date: Tue, 23 Oct 2018 19:32:55 +0300 Subject: [PATCH] Change the reserved channel check to be sensible @@ -33,5 +33,5 @@ index c15fa003..31ff2f61 100644 } -- -2.19.1 +2.20.1 diff --git a/Spigot-API-Patches/0171-Add-PlayerConnectionCloseEvent.patch b/Spigot-API-Patches/0169-Add-PlayerConnectionCloseEvent.patch similarity index 98% rename from Spigot-API-Patches/0171-Add-PlayerConnectionCloseEvent.patch rename to Spigot-API-Patches/0169-Add-PlayerConnectionCloseEvent.patch index d09d1436e..ee61a2913 100644 --- a/Spigot-API-Patches/0171-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-API-Patches/0169-Add-PlayerConnectionCloseEvent.patch @@ -1,4 +1,4 @@ -From c82f656c16764f1c42045bc102ad89c43d43a1db Mon Sep 17 00:00:00 2001 +From f0efe7dcddc56cd20983c541c42537f1d78f7b0b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 7 Oct 2018 12:05:06 -0700 Subject: [PATCH] Add PlayerConnectionCloseEvent @@ -129,5 +129,5 @@ index 00000000..80896bbf + } +} -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 7fb81f860..252df6020 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 4319757a25f8a0f330e9925ab19944eb2d4c337c Mon Sep 17 00:00:00 2001 +From ebaa3f2ecf523cfb023fba78355399fccb79a173 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 ccf92b011..f0fc37abf 100644 +index b423d5be5..713034015 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,11 @@ @@ -45,7 +45,7 @@ index ccf92b011..f0fc37abf 100644 ${project.version} compile -@@ -101,34 +100,22 @@ +@@ -95,34 +94,22 @@ @@ -91,7 +91,7 @@ index ccf92b011..f0fc37abf 100644 -@@ -138,11 +125,13 @@ +@@ -132,11 +119,13 @@ maven-jar-plugin 2.4 @@ -106,7 +106,7 @@ index ccf92b011..f0fc37abf 100644 ${maven.build.timestamp} Bukkit ${api.version} -@@ -182,20 +171,23 @@ +@@ -176,20 +165,23 @@ shade @@ -138,7 +138,7 @@ index ccf92b011..f0fc37abf 100644 org.bukkit.craftbukkit org.bukkit.craftbukkit.v${minecraft_version} -@@ -221,18 +213,6 @@ +@@ -215,18 +207,6 @@ org.apache.maven.plugins maven-compiler-plugin 3.7.0 @@ -171,5 +171,5 @@ index 93046379d..674096cab 100644 if (stream != null) { -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 9cd9a27ce..a1271f0d5 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From 1b71f76b3adb5f3ea991080df8180a1473da4e12 Mon Sep 17 00:00:00 2001 +From adc03c34bceae0b048f7b8fa4e32c9aa42eda25a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -511,7 +511,7 @@ index 000000000..a73865739 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index cdfd9a8fb..b5e5c385d 100644 +index 229c25338..197d116c6 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -192,6 +192,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -531,10 +531,10 @@ index cdfd9a8fb..b5e5c385d 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 f04e87c57..c93cab858 100644 +index 5289325a2..b1a4a6d70 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -133,9 +133,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { private static final DataWatcherObject aG = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject aH = DataWatcher.a(Entity.class, DataWatcherRegistry.i); public boolean inChunk; @@ -548,7 +548,7 @@ index f04e87c57..c93cab858 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 207bad41e..bcdc790ba 100644 +index ee16fac91..b8abd6363 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; @@ -561,7 +561,7 @@ index 207bad41e..bcdc790ba 100644 import java.util.function.Function; import java.util.stream.Stream; @@ -333,4 +335,10 @@ public class EntityTypes { - return new EntityTypes(this.a, this.b, this.c, this.d, type); + return new EntityTypes<>(this.a, this.b, this.c, this.d, type); } } + @@ -572,10 +572,10 @@ index 207bad41e..bcdc790ba 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 673764369..0920ef2d1 100644 +index 6ea9eaa1a..5531f5205 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -134,6 +134,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -130,6 +130,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc private int tickPosition; public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -584,7 +584,7 @@ index 673764369..0920ef2d1 100644 public final SpigotTimings.WorldTimingsHandler timings; // Spigot private boolean guardEntityList; // Spigot public static boolean haveWeSilencedAPhysicsCrash; -@@ -156,6 +158,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -152,6 +154,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc protected World(IDataManager idatamanager, @Nullable PersistentCollection persistentcollection, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot @@ -667,7 +667,7 @@ index 8b51997fc..e9ea75579 100644 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 95f7a9587..87bc8e2d9 100644 +index 2578c4957..d3c2abc39 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,31 +39,31 @@ public class SpigotWorldConfig @@ -708,5 +708,5 @@ index 95f7a9587..87bc8e2d9 100644 config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 416603bc8..5af889565 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,393 +1,156 @@ -From dadb0a624cab08627738eb8b0538dc25bf636f10 Mon Sep 17 00:00:00 2001 +From 7ad9c299e87d66f79104c9f21043392b0d60700d 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/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 25a1edc45..f1ad18511 100644 ---- a/src/main/java/net/minecraft/server/BaseBlockPosition.java -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -98,8 +98,4 @@ public class BaseBlockPosition implements Comparable { - return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); +diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java +index bcb4b5e5c..c399bdecc 100644 +--- a/src/main/java/net/minecraft/server/BiomeBase.java ++++ b/src/main/java/net/minecraft/server/BiomeBase.java +@@ -124,7 +124,7 @@ public abstract class BiomeBase { + + @Nullable + public static BiomeBase a(BiomeBase biomebase) { +- return (BiomeBase) BiomeBase.aH.fromId(IRegistry.BIOME.a((Object) biomebase)); ++ return (BiomeBase) BiomeBase.aH.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix } -- // $FF: synthetic method -- public int compareTo(Object object) { -- return this.compareTo((BaseBlockPosition)object); -- } - } + public static WorldGenCarverWrapper a(WorldGenCarver worldgencarver, C c0) { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 66c38df1f..50e29464b 100644 +index bd2a67cfc..330f5d0c1 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -178,10 +178,6 @@ public class BlockPosition extends BaseBlockPosition { - } - } +@@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger; + @Immutable + public class BlockPosition extends BaseBlockPosition { -- // $FF: synthetic method -- protected Object computeNext() { -- return this.computeNext(); -- } - }; - }; +- private static final Logger b = LogManager.getLogger(); ++ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used + 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; +@@ -147,7 +147,7 @@ public class BlockPosition extends BaseBlockPosition { + return a(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ()), Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ())); } -@@ -209,8 +205,11 @@ public class BlockPosition extends BaseBlockPosition { + +- public static Iterable a(int i, int j, int k, int l, int i1, int j1) { ++ public static Iterable a(int ix, int jx, int kx, int l, int i1, int j1) { // Paper - decompile fix + return () -> { + return new AbstractIterator() { + private boolean g = true; +@@ -158,21 +158,21 @@ public class BlockPosition extends BaseBlockPosition { + protected BlockPosition computeNext() { + if (this.g) { + this.g = false; +- this.h = i; +- this.i = j; +- this.j = k; +- return new BlockPosition(i, j, k); ++ this.h = ix; // Paper - decompile fix ++ this.i = jx; // Paper - decompile fix ++ this.j = kx; // Paper - decompile fix ++ return new BlockPosition(ix, jx, kx); + } else if (this.h == l && this.i == i1 && this.j == j1) { + return (BlockPosition) this.endOfData(); + } else { + if (this.h < l) { + ++this.h; + } else if (this.i < i1) { +- this.h = i; ++ this.h = ix; // Paper - decompile fix + ++this.i; + } else if (this.j < j1) { +- this.h = i; +- this.i = j; ++ this.h = ix; // Paper - decompile fix ++ this.i = jx; // Paper - decompile fix + ++this.j; + } + +@@ -206,8 +206,11 @@ public class BlockPosition extends BaseBlockPosition { if (this.g.b < l) { ++this.g.b; } else if (this.g.c < i1) { -+ this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler ++this.g.c; } else if (this.g.d < j1) { -+ this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler -+ this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.c = j; // Paper - decompile fix Readd line removed by the decompiler ++this.g.d; } -@@ -218,18 +217,10 @@ public class BlockPosition extends BaseBlockPosition { - } - } +diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java +index 401b6d970..986b9ccea 100644 +--- a/src/main/java/net/minecraft/server/BlockStateEnum.java ++++ b/src/main/java/net/minecraft/server/BlockStateEnum.java +@@ -20,10 +20,10 @@ public class BlockStateEnum & INamable> extends BlockState + protected BlockStateEnum(String s, Class oclass, Collection collection) { + super(s, oclass); + this.a = ImmutableSet.copyOf(collection); +- Iterator iterator = collection.iterator(); ++ Iterator iterator = collection.iterator(); // Paper - decompile fix -- // $FF: synthetic method -- protected Object computeNext() { -- return this.computeNext(); -- } - }; - }; - } + while (iterator.hasNext()) { +- T t0 = (Enum) iterator.next(); ++ T t0 = iterator.next(); // Paper - Decompile fix + String s1 = ((INamable) t0).getName(); -- // $FF: synthetic method -- public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -- return this.d(baseblockposition); -- } - - public static class MutableBlockPosition extends BlockPosition { - protected int b; -@@ -314,10 +305,6 @@ public class BlockPosition extends BaseBlockPosition { - return new BlockPosition(this); - } - -- // $FF: synthetic method -- public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -- return super.d(baseblockposition); -- } - } - - public static final class b extends BlockPosition.MutableBlockPosition implements AutoCloseable { -@@ -389,34 +376,5 @@ public class BlockPosition extends BaseBlockPosition { - } - } - -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition d(int i, int j, int k) { -- return this.d(i, j, k); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { -- return this.c(enumdirection, i); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection) { -- return this.c(enumdirection); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition g(BaseBlockPosition baseblockposition) { -- return this.g(baseblockposition); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(double d0, double d1, double d2) { -- return this.c(d0, d1, d2); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(int i, int j, int k) { -- return this.c(i, j, k); -- } - } - } -diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 3bd0c56d4..304e47bf2 100644 ---- a/src/main/java/net/minecraft/server/DataPaletteBlock.java -+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -72,11 +72,11 @@ public class DataPaletteBlock implements DataPaletteExpandable { - public int onResize(int ix, T object) { - this.b(); - DataBits databits = this.a; -- DataPalette datapalette = this.h; -+ DataPalette datapalette = this.h; // Paper - decompile fix - this.b(ix); - - for(int jx = 0; jx < databits.b(); ++jx) { -- Object object1 = datapalette.a(databits.a(jx)); -+ T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix - if (object1 != null) { - this.setBlockIndex(jx, object1); - } -@@ -103,7 +103,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { - } - - protected T a(int ix) { -- Object object = this.h.a(this.a.a(ix)); -+ T object = this.h.a(this.a.a(ix)); // Paper - decompile fix - return (T)(object == null ? this.g : object); - } - -@@ -127,7 +127,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { - long[] along = nbttagcompound.o(s1); - int jx = along.length * 64 / 4096; - if (this.h == this.b) { -- DataPaletteHash datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f); -+ DataPaletteHash datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f); // Paper - decompile fix - datapalettehash.a(nbttaglist); - DataBits databits = new DataBits(ix, 4096, along); - -diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java -index 5eded6dc2..11f9642e6 100644 ---- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java -+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java -@@ -136,7 +136,7 @@ public class DedicatedPlayerList extends PlayerList { - } - - // $FF: synthetic method -- public MinecraftServer getServer() { -+ public MinecraftServer getMinecraftServer() { // Paper - decompile fix - return this.getServer(); - } - } + if (this.b.containsKey(s1)) { diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 8bfa218a6..e2e60d3ed 100644 +index 66b168396..83db94c4a 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java -@@ -77,7 +77,7 @@ public class DefinedStructure { +@@ -85,7 +85,7 @@ public class DefinedStructure { } private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) { -- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity1) -> { -+ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1),(java.util.function.Predicate) (entity1) -> { // Paper - decompile fix - return !(entity1 instanceof EntityHuman); +- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity) -> { ++ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (java.util.function.Predicate) (entity) -> { // Paper - decompile fix + return !(entity instanceof EntityHuman); }); - this.b.clear(); -@@ -145,12 +145,12 @@ public class DefinedStructure { - if (this.a.isEmpty()) { - return false; - } else { -- List list = definedstructureinfo.a(this.a, blockposition); -+ List list = definedstructureinfo.a(this.a, blockposition); // Paper - decompile fix - if ((!list.isEmpty() || !definedstructureinfo.h() && !this.b.isEmpty()) && this.c.getX() >= 1 && this.c.getY() >= 1 && this.c.getZ() >= 1) { - Block block = definedstructureinfo.i(); - StructureBoundingBox structureboundingbox = definedstructureinfo.j(); -- ArrayList arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0); -- ArrayList arraylist1 = Lists.newArrayListWithCapacity(list.size()); -+ ArrayList arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0); // Paper - decompile fix -+ ArrayList arraylist1 = Lists.newArrayListWithCapacity(list.size()); // Paper - decompile fix - int j = Integer.MAX_VALUE; - int k = Integer.MAX_VALUE; - int l = Integer.MAX_VALUE; -@@ -427,7 +427,7 @@ public class DefinedStructure { - nbttagcompound.set("blocks", new NBTTagList()); - nbttagcompound.set("palette", new NBTTagList()); - } else { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile fix - DefinedStructure.a definedstructure$a = new DefinedStructure.a(); - arraylist.add(definedstructure$a); -diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index 6695f8d77..e1ea8da88 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentManager.java -+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java -@@ -51,7 +51,7 @@ public class EnchantmentManager { - public static void a(Map map, ItemStack itemstack) { - NBTTagList nbttaglist = new NBTTagList(); +@@ -235,7 +235,7 @@ public class DefinedStructure { + boolean flag = true; + EnumDirection[] aenumdirection = new EnumDirection[] { EnumDirection.UP, EnumDirection.NORTH, EnumDirection.EAST, EnumDirection.SOUTH, EnumDirection.WEST}; -- for(Entry entry : map.entrySet()) { -+ for(Entry entry : map.entrySet()) { // Paper - decompile fix - Enchantment enchantment = (Enchantment)entry.getKey(); - if (enchantment != null) { - int i = entry.getValue(); -@@ -146,7 +146,7 @@ public class EnchantmentManager { - } +- int l1; ++ //int l1; // Paper - decompile fix - public static int a(Enchantment enchantment, EntityLiving entityliving) { -- List list = enchantment.a(entityliving); -+ List list = enchantment.a(entityliving); // Paper - decompile fix - if (list == null) { - return 0; - } else { -@@ -224,7 +224,7 @@ public class EnchantmentManager { - } + while (flag && !list1.isEmpty()) { + flag = false; +@@ -245,7 +245,7 @@ public class DefinedStructure { + BlockPosition blockposition2 = (BlockPosition) iterator1.next(); + Fluid fluid1 = generatoraccess.getFluid(blockposition2); - public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) { -- List list = enchantment.a(entityliving); -+ List list = enchantment.a(entityliving);// Paper - decompile fix - if (list.isEmpty()) { - return ItemStack.a; - } else { -@@ -260,7 +260,7 @@ public class EnchantmentManager { - } +- for (l1 = 0; l1 < aenumdirection.length && !fluid1.d(); ++l1) { ++ for (int l1 = 0; l1 < aenumdirection.length && !fluid1.d(); ++l1) { // Paper - decompile fix + Fluid fluid2 = generatoraccess.getFluid(blockposition2.shift(aenumdirection[l1])); - public static ItemStack a(Random random, ItemStack itemstack, int i, boolean flag) { -- List list = b(random, itemstack, i, flag); -+ List list = b(random, itemstack, i, flag); // Paper - decompile fix - boolean flag1 = itemstack.getItem() == Items.BOOK; - if (flag1) { - itemstack = new ItemStack(Items.ENCHANTED_BOOK); -@@ -328,7 +328,7 @@ public class EnchantmentManager { - } + if (fluid2.getHeight() > fluid1.getHeight() || fluid2.d() && !fluid1.d()) { +@@ -270,7 +270,7 @@ public class DefinedStructure { + int i2 = j; + int j2 = k; - public static List a(int i, ItemStack itemstack, boolean flag) { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); - Item item = itemstack.getItem(); - boolean flag1 = itemstack.getItem() == Items.BOOK; +- l1 = l; ++ int l1 = l; // Paper - decompile fix + Iterator iterator2 = list2.iterator(); -diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java -index 04cff50cb..e746a6a0d 100644 ---- a/src/main/java/net/minecraft/server/EntityDragonFireball.java -+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java -@@ -14,7 +14,7 @@ public class EntityDragonFireball extends EntityFireball { - protected void a(MovingObjectPosition movingobjectposition) { - if (movingobjectposition.entity == null || !movingobjectposition.entity.s(this.shooter)) { - if (!this.world.isClientSide) { -- List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D)); -+ List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D)); // Paper - decompile fix - EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ); - entityareaeffectcloud.setSource(this.shooter); - entityareaeffectcloud.setParticle(Particles.j); -diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 4dee04581..9c48bb3c9 100644 ---- a/src/main/java/net/minecraft/server/EntityLlama.java -+++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -371,11 +371,6 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - public void s(boolean var1) { - } + Pair pair; +@@ -717,7 +717,7 @@ public class DefinedStructure { + public IBlockData a(int i) { + IBlockData iblockdata = (IBlockData) this.b.fromId(i); -- // $FF: synthetic method -- public EntityAgeable createChild(EntityAgeable entityageable) { -- return this.createChild(entityageable); -- } -- - static class a extends PathfinderGoalNearestAttackableTarget { - public a(EntityLlama entityllama) { - super(entityllama, EntityWolf.class, 16, false, true, (Predicate)null); -diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java -index 23ca6fc50..44c91ba26 100644 ---- a/src/main/java/net/minecraft/server/EnumDirection.java -+++ b/src/main/java/net/minecraft/server/EnumDirection.java -@@ -232,10 +232,6 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }, - Y("y") { - public int a(int var1, int i, int var3) { -@@ -246,10 +242,6 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }, - Z("z") { - public int a(int var1, int var2, int i) { -@@ -260,10 +252,6 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }; - - private static final Map d = (Map)Arrays.stream(values()).collect(Collectors.toMap(EnumDirection.EnumAxis::a, (enumdirection$enumaxis) -> { -@@ -315,10 +303,6 @@ public enum EnumDirection implements INamable { - - public abstract double a(double var1, double var3, double var5); - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EnumDirection)object); -- } - } - - public static enum EnumAxisDirection { -@@ -366,9 +350,5 @@ public enum EnumDirection implements INamable { - return Iterators.forArray(this.c); +- return iblockdata == null ? DefinedStructure.a.a : iblockdata; ++ return iblockdata == null ? a : iblockdata; // Paper - decompile fix } -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EnumDirection)object); -- } - } - } -diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index 0e0571a6c..8fc45c697 100644 ---- a/src/main/java/net/minecraft/server/IChatBaseComponent.java -+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -389,14 +389,5 @@ public interface IChatBaseComponent extends Message, Iterable entry : jsonobject.entrySet()) {// Paper - Decompile fix - String s = b.matcher(ChatDeserializer.a((JsonElement)entry.getValue(), (String)entry.getKey())).replaceAll("%$1s"); - this.d.put(entry.getKey(), s); - } -diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 252b0f3ed..86df2b969 100644 ---- a/src/main/java/net/minecraft/server/LootSelectorEntry.java -+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java -@@ -82,14 +82,5 @@ public abstract class LootSelectorEntry { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((LootSelectorEntry)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } + public Iterator iterator() { diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 48d04b540..de9168a9c 100644 +index 1425584ed..b2757aad8 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java -@@ -87,7 +87,7 @@ public interface NBTBase { +@@ -88,7 +88,7 @@ public interface NBTBase { } } @@ -396,31 +159,8 @@ index 48d04b540..de9168a9c 100644 default String asString() { return this.toString(); -diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 456b5f492..54f2935c0 100644 ---- a/src/main/java/net/minecraft/server/NBTList.java -+++ b/src/main/java/net/minecraft/server/NBTList.java -@@ -25,6 +25,7 @@ public abstract class NBTList extends AbstractList impleme - public abstract void b(int var1); - - // $FF: synthetic method -+ /* // Paper start- Decompile fix - public Object set(int i, Object object) { - return this.set(i, (NBTBase)object); - } -@@ -32,5 +33,9 @@ public abstract class NBTList extends AbstractList impleme - // $FF: synthetic method - public Object get(int i) { - return this.get(i); -- } -+ }*/ -+ -+ @Override -+ public abstract NBTBase clone(); -+ // Paper end- Decompile fix - } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 973f28cc5..21a6f488a 100644 +index 767013cae..e0fb6fb49 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 { @@ -434,197 +174,94 @@ index 973f28cc5..21a6f488a 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 8e6cce15f..1b72df8cd 100644 +index 2b7b8be8a..27debcfca 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java -@@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger; - +@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger; public class NBTTagList extends NBTList { + private static final Logger f = LogManager.getLogger(); - private List list = Lists.newArrayList(); + public List list = Lists.newArrayList(); // Paper private byte type = 0; - public NBTTagList() { -@@ -281,11 +281,7 @@ public class NBTTagList extends NBTList { - return this.type; - } - -- // $FF: synthetic method -- public NBTBase clone() { -- return this.clone(); -- } -- -+ /* // Paper start - Decompile fix - // $FF: synthetic method - public Object remove(int i) { - return this.remove(i); -@@ -305,4 +301,5 @@ public class NBTTagList extends NBTList { - public boolean add(Object object) { - return this.add((NBTBase)object); - } -+ */ // Paper end - Decompile fix - } -diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index a717ad95f..ff7e20dfc 100644 ---- a/src/main/java/net/minecraft/server/PacketEncoder.java -+++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -48,8 +48,4 @@ public class PacketEncoder extends MessageToByteEncoder> { - } - } - -- // $FF: synthetic method -- protected void encode(ChannelHandlerContext channelhandlercontext, Object object, ByteBuf bytebuf) throws Exception { -- this.encode(channelhandlercontext, (Packet)object, bytebuf); -- } - } -diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 8bc7c0ccd..faaad0f41 100644 ---- a/src/main/java/net/minecraft/server/ProtoChunk.java -+++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -483,14 +483,4 @@ public class ProtoChunk implements IChunkAccess { - public void b(boolean flag) { - this.u = flag; - } -- -- // $FF: synthetic method -- public TickList l() { -- return this.l(); -- } -- -- // $FF: synthetic method -- public TickList k() { -- return this.k(); -- } - } + public NBTTagList() {} diff --git a/src/main/java/net/minecraft/server/Registry.java b/src/main/java/net/minecraft/server/Registry.java -index 5be9f0ff2..9efec49d6 100644 +index 723372f26..9efec49d6 100644 --- a/src/main/java/net/minecraft/server/Registry.java +++ b/src/main/java/net/minecraft/server/Registry.java -@@ -1,4 +1,8 @@ +@@ -1,3 +1,8 @@ package net.minecraft.server; --public interface Registry extends Iterable { +-public interface Registry extends Iterable {} +import java.util.Iterator; +public interface Registry extends Iterable { // Paper - decompile fix + + @Override + Iterator iterator(); // Paper - decompile fix - } ++} diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index 8d1f9237a..a21006290 100644 +index 50410264f..a894f7886 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java -@@ -26,7 +26,7 @@ public class RegistryBlockID implements Registry { - this.b.put(object, i); +@@ -27,7 +27,7 @@ public class RegistryBlockID implements Registry { + this.b.put(t0, i); - while(this.c.size() <= i) { -- this.c.add((Object)null); + while (this.c.size() <= i) { +- this.c.add((Object) null); + this.c.add(null); // Paper - decompile fix } - this.c.set(i, object); + this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index 03c603362..d03ac0e70 100644 +index 9400a4369..5a5c464ea 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java -@@ -49,7 +49,7 @@ public class RegistryID implements Registry { - } +@@ -17,9 +17,9 @@ 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 = (K[])(new Object[i]); + 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]; -diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 364dadfbd..c338d09bf 100644 ---- a/src/main/java/net/minecraft/server/ServerPing.java -+++ b/src/main/java/net/minecraft/server/ServerPing.java -@@ -100,15 +100,6 @@ public class ServerPing { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix } - public static class ServerData { -@@ -144,15 +135,6 @@ public class ServerPing { - return jsonobject; - } + public int getId(@Nullable K k0) { +@@ -54,9 +54,9 @@ public class RegistryID implements Registry { + K[] ak = this.b; + int[] aint = this.c; -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing.ServerData)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } +- 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; -@@ -228,15 +210,6 @@ public class ServerPing { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing.ServerPingPlayerSample)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } - } -diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java -index 475bf35fa..78234cbdd 100644 ---- a/src/main/java/net/minecraft/server/ShapeDetector.java -+++ b/src/main/java/net/minecraft/server/ShapeDetector.java -@@ -106,10 +106,6 @@ public class ShapeDetector { - return new ShapeDetectorBlock(this.a, blockposition, this.b); - } - -- // $FF: synthetic method -- public Object load(Object object) throws Exception { -- return this.load((BlockPosition)object); -- } - } - - public static class ShapeDetectorCollection { diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index c1bbacfc1..f0a826cd1 100644 +index c01a05b25..478bf4997 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java -@@ -7,6 +7,7 @@ import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; - import it.unimi.dsi.fastutil.objects.ObjectIterator; - import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry; - import java.io.DataInputStream; -+import java.io.DataOutput; - import java.io.DataOutputStream; - import java.io.File; - import java.io.FileInputStream; -@@ -98,7 +99,7 @@ public class WorldPersistentData { - } +@@ -39,14 +39,14 @@ public class WorldPersistentData { - DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file1)); -- NBTCompressedStreamTools.a(nbttagcompound, dataoutputstream); -+ NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); // Paper - decompile fix - dataoutputstream.close(); + @Nullable + public T a(Function function, String s) { +- PersistentBase persistentbase = (PersistentBase) this.data.get(s); ++ T persistentbase = (T) this.data.get(s); // Paper - decompile fix + + if (persistentbase == null && this.e != null) { + try { + File file = this.e.getDataFile(this.b, s); + + if (file != null && file.exists()) { +- persistentbase = (PersistentBase) function.apply(s); ++ persistentbase = function.apply(s); // Paper - decompile fix + persistentbase.a(a(this.e, this.b, s, 1631).getCompound("data")); + this.data.put(s, persistentbase); } - } catch (Exception exception) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index ca47d8de7..cc3aceb49 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,46 +1,37 @@ -From a1159c5878541b6ae4bf920b87f42f7ce31dd1cf Mon Sep 17 00:00:00 2001 +From 646ec56566f565a905815eed2e67eeeae9bac57b 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/AttributeInstance.java b/src/main/java/net/minecraft/server/AttributeInstance.java -index 1c1a6a37a..0929e0189 100644 +index be179ba21..c53bc8230 100644 --- a/src/main/java/net/minecraft/server/AttributeInstance.java +++ b/src/main/java/net/minecraft/server/AttributeInstance.java -@@ -20,8 +20,10 @@ public interface AttributeInstance { +@@ -21,8 +21,10 @@ public interface AttributeInstance { @Nullable - AttributeModifier a(UUID var1); + AttributeModifier a(UUID uuid); + default void addModifier(AttributeModifier modifier) { b(modifier); } // Paper - OBFHELPER - void b(AttributeModifier var1); + void b(AttributeModifier attributemodifier); + default void removeModifier(AttributeModifier modifier) { c(modifier); } // Paper - OBFHELPER - void c(AttributeModifier var1); + void c(AttributeModifier attributemodifier); - void b(UUID var1); + void b(UUID uuid); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 50e29464b..880ce16b1 100644 +index 186fd5121..75a0f1386 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -9,7 +9,7 @@ import org.apache.logging.log4j.Logger; - - @Immutable - public class BlockPosition extends BaseBlockPosition { -- private static final Logger b = LogManager.getLogger(); -+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used - 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 = c; -@@ -44,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); +@@ -45,6 +45,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); } + public BlockPosition add(int i, int j, int k) {return a(i, j, k);} // Paper - OBFHELPER - public BlockPosition a(int ix, int jx, int kx) { - return ix == 0 && jx == 0 && kx == 0 ? this : new BlockPosition(this.getX() + ix, this.getY() + jx, this.getZ() + kx); + 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); } -@@ -182,6 +183,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -183,6 +184,7 @@ public class BlockPosition extends BaseBlockPosition { }; } @@ -48,7 +39,7 @@ index 50e29464b..880ce16b1 100644 public BlockPosition h() { return this; } -@@ -270,6 +272,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -342,6 +344,7 @@ public class BlockPosition extends BaseBlockPosition { return this.d; } @@ -56,7 +47,7 @@ index 50e29464b..880ce16b1 100644 public BlockPosition.MutableBlockPosition c(int i, int j, int k) { this.b = i; this.c = j; -@@ -277,6 +280,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -349,6 +352,7 @@ public class BlockPosition extends BaseBlockPosition { return this; } @@ -65,10 +56,10 @@ index 50e29464b..880ce16b1 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 40f892b24..22fec8697 100644 +index 1ff78eed4..417c015e5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -32,7 +32,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent; +@@ -31,7 +31,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent; public class Chunk implements IChunkAccess { private static final Logger d = LogManager.getLogger(); @@ -77,7 +68,7 @@ index 40f892b24..22fec8697 100644 private final ChunkSection[] sections; private final BiomeBase[] f; private final boolean[] g; -@@ -705,6 +705,7 @@ public class Chunk implements IChunkAccess { +@@ -704,6 +704,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -86,23 +77,23 @@ index 40f892b24..22fec8697 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 744762b8b..d9608121b 100644 +index 34586bca6..b0c004b1f 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -@@ -23,6 +23,8 @@ public class ChunkCoordIntPair { +@@ -24,6 +24,8 @@ public class ChunkCoordIntPair { return a(this.x, this.z); } + public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER + public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER public static long a(int i, int j) { - return (long)i & 4294967295L | ((long)j & 4294967295L) << 32; + return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 3919c1fba..772382144 100644 +index cc9604749..70a95c263 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -@@ -16,7 +16,7 @@ import org.apache.logging.log4j.Logger; +@@ -13,7 +13,7 @@ import org.apache.logging.log4j.Logger; public class ChunkTaskScheduler extends Scheduler { private static final Logger b = LogManager.getLogger(); @@ -112,10 +103,10 @@ index 3919c1fba..772382144 100644 private final IChunkLoader e; private final IAsyncTaskHandler f; diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 95ca5f6d8..0dc948a37 100644 +index d24ec3d53..9e83610f1 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java -@@ -54,6 +54,7 @@ public class DataBits { +@@ -60,6 +60,7 @@ public class DataBits { } } @@ -124,37 +115,34 @@ index 95ca5f6d8..0dc948a37 100644 return this.a; } diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java -index 7f905b1e0..fa5b9262b 100644 +index dae40b9cd..2ee879196 100644 --- a/src/main/java/net/minecraft/server/DataPalette.java +++ b/src/main/java/net/minecraft/server/DataPalette.java -@@ -3,10 +3,11 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -4,8 +4,10 @@ import javax.annotation.Nullable; public interface DataPalette { + + default int getOrCreateIdFor(T object) { return this.a(object); } // Paper - OBFHELPER - int a(T var1); + int a(T t0); -- @Nullable -- T a(int var1); + @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER -+ @Nullable T a(int var1); - - void b(PacketDataSerializer var1); + @Nullable + T a(int i); diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 304e47bf2..6e7454b13 100644 +index 59cbbdcb3..6fcfc5ef7 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -7,7 +7,7 @@ import java.util.function.Function; - import java.util.stream.Collectors; +@@ -8,7 +8,7 @@ import java.util.stream.Collectors; public class DataPaletteBlock implements DataPaletteExpandable { + - private final DataPalette b; -+ private final DataPalette b;private final DataPalette getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER - private final DataPaletteExpandable c = (var0, var1) -> { ++ private final DataPalette b; private final DataPalette getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER + private final DataPaletteExpandable c = (i, object) -> { return 0; }; -@@ -15,9 +15,9 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -16,9 +16,9 @@ public class DataPaletteBlock implements DataPaletteExpandable { private final Function e; private final Function f; private final T g; @@ -167,16 +155,16 @@ index 304e47bf2..6e7454b13 100644 private final ReentrantLock j = new ReentrantLock(); private void b() { -@@ -51,6 +51,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return jx << 8 | k << 4 | ix; +@@ -53,6 +53,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { + return j << 8 | k << 4 | i; } + private void initialize(int bitsPerObject) { this.b(bitsPerObject); } // Paper - OBFHELPER - private void b(int ix) { - if (ix != this.i) { - this.i = ix; -@@ -107,6 +108,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return (T)(object == null ? this.g : object); + private void b(int i) { + if (i != this.i) { + this.i = i; +@@ -115,6 +116,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { + return t0 == null ? this.g : t0; } + public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER @@ -196,10 +184,10 @@ index 372afbe94..20b7c2c6d 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 550c7a355..b039ff1b5 100644 +index a3d088bbd..cca047b04 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -124,6 +124,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -125,6 +125,7 @@ public abstract class EntityInsentient extends EntityLiving { return this.goalTarget; } @@ -208,7 +196,7 @@ index 550c7a355..b039ff1b5 100644 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 341af9c16..14c481220 100644 +index 892e1aca7..ed859ccf9 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity { @@ -220,14 +208,13 @@ index 341af9c16..14c481220 100644 @Override public float getBukkitYaw() { diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index c9e596367..70830bbf4 100644 +index 5f9255df1..5ea517043 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java -@@ -1,11 +1,14 @@ - package net.minecraft.server; +@@ -2,11 +2,13 @@ package net.minecraft.server; public abstract class EntityMonster extends EntityCreature implements IMonster { -+ + + public org.bukkit.craftbukkit.entity.CraftMonster getBukkitMonster() { return (org.bukkit.craftbukkit.entity.CraftMonster) super.getBukkitEntity(); } // Paper protected EntityMonster(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -239,7 +226,7 @@ index c9e596367..70830bbf4 100644 return SoundCategory.HOSTILE; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index bcdc790ba..339abdc01 100644 +index b8abd6363..a07ee150c 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; @@ -252,7 +239,7 @@ index bcdc790ba..339abdc01 100644 import java.util.function.Function; @@ -123,9 +124,20 @@ public class EntityTypes { public static EntityTypes a(String s, EntityTypes.a entitytypes_a) { - EntityTypes entitytypes = entitytypes_a.a(s); + EntityTypes entitytypes = entitytypes_a.a(s); + // Paper start + if (clsToKeyMap == null ) clsToKeyMap = new java.util.HashMap<>(); @@ -290,18 +277,10 @@ index bcdc790ba..339abdc01 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 7047b7c70..92f8d0633 100644 +index d55f52fe9..27705106b 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -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.block.BlockFertilizeEvent; -@@ -574,6 +575,17 @@ public final class ItemStack { +@@ -578,6 +578,17 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -642,19 +621,19 @@ index 000000000..c97e116aa + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 447b56323..db4e4b859 100644 +index 434471215..8c5d6c1d3 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; - public class NBTTagCompound implements NBTBase { +@@ -23,7 +23,7 @@ public class NBTTagCompound implements NBTBase { + private static final Logger f = LogManager.getLogger(); private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+"); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper - public NBTTagCompound() { - } -@@ -89,11 +89,13 @@ public class NBTTagCompound implements NBTBase { + public NBTTagCompound() {} + +@@ -95,11 +95,13 @@ public class NBTTagCompound implements NBTBase { this.map.put(s, new NBTTagLong(i)); } @@ -668,29 +647,11 @@ index 447b56323..db4e4b859 100644 @Nullable public UUID a(String s) { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); -@@ -322,7 +324,7 @@ public class NBTTagCompound implements NBTBase { - - public String toString() { - StringBuilder stringbuilder = new StringBuilder("{"); -- Object object = this.map.keySet(); -+ Collection object = this.map.keySet(); // Paper - decompile fix - if (f.isDebugEnabled()) { - ArrayList arraylist = Lists.newArrayList(this.map.keySet()); - Collections.sort(arraylist); -@@ -476,7 +478,7 @@ public class NBTTagCompound implements NBTBase { - } - - // $FF: synthetic method -- public NBTBase clone() { -+ public NBTBase clone_bad() { // Paper - decompile fix - return this.clone(); - } - } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index db52ffad4..d5bbc5f8e 100644 +index d85bc522c..e2fc41d6d 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -43,7 +43,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).build()); }); private final EnumProtocolDirection h; @@ -699,7 +660,7 @@ index db52ffad4..d5bbc5f8e 100644 private final ReentrantReadWriteLock j = new ReentrantReadWriteLock(); public Channel channel; public SocketAddress socketAddress; -@@ -168,6 +168,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -167,6 +167,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } @@ -707,7 +668,7 @@ index db52ffad4..d5bbc5f8e 100644 private void b(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { EnumProtocol enumprotocol = EnumProtocol.a(packet); EnumProtocol enumprotocol1 = (EnumProtocol) this.channel.attr(NetworkManager.c).get(); -@@ -208,6 +209,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -207,6 +208,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } @@ -715,7 +676,7 @@ index db52ffad4..d5bbc5f8e 100644 private void o() { if (this.channel != null && this.channel.isOpen()) { this.j.readLock().lock(); -@@ -334,9 +336,9 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -333,9 +335,9 @@ public class NetworkManager extends SimpleChannelInboundHandler> { static class QueuedPacket { @@ -740,22 +701,22 @@ index 7582151ae..d05f1e02c 100644 for (int j = 1; j < 5; ++j) { if ((i & -1 << j * 7) == 0) { diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index ff7e20dfc..3448f6c53 100644 +index d54177bdc..2aa805eef 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -38,6 +38,7 @@ public class PacketEncoder extends MessageToByteEncoder> { +@@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder> { packet.b(packetdataserializer); } catch (Throwable throwable) { - a.error(throwable); + PacketEncoder.a.error(throwable); + throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE? if (packet.a()) { throw new SkipEncodeException(throwable); } else { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 12d6c99cf..af382815f 100644 +index 395215bbd..f2159bc2d 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -11,7 +11,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -13,7 +13,7 @@ public class PacketPlayOutMapChunk implements Packet { private int a; private int b; private int c; @@ -764,7 +725,7 @@ index 12d6c99cf..af382815f 100644 private List e; private boolean f; -@@ -85,6 +85,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -97,6 +97,7 @@ public class PacketPlayOutMapChunk implements Packet { return bytebuf; } @@ -773,10 +734,10 @@ index 12d6c99cf..af382815f 100644 int j = 0; ChunkSection[] achunksection = chunk.getSections(); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bbc8c0007..2b6c797ce 100644 +index bb7ef0518..e35f17843 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -68,9 +68,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { private final MinecraftServer minecraftServer; public EntityPlayer player; private int e; @@ -790,22 +751,22 @@ index bbc8c0007..2b6c797ce 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java -index 8fce3b022..58ac6eafc 100644 +index 6740b396a..ea08c5a1c 100644 --- a/src/main/java/net/minecraft/server/PotionUtil.java +++ b/src/main/java/net/minecraft/server/PotionUtil.java -@@ -103,6 +103,7 @@ public class PotionUtil { +@@ -110,6 +110,7 @@ public class PotionUtil { return nbttagcompound == null ? Potions.EMPTY : PotionRegistry.a(nbttagcompound.getString("Potion")); } + public static ItemStack addPotionToItemStack(ItemStack itemstack, PotionRegistry potionregistry) { return a(itemstack, potionregistry); } // Paper - OBFHELPER public static ItemStack a(ItemStack itemstack, PotionRegistry potionregistry) { MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry); - if (potionregistry == Potions.EMPTY) { + diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index a21006290..6c6f006f3 100644 +index a894f7886..93935e7c7 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java -@@ -54,6 +54,7 @@ public class RegistryBlockID implements Registry { +@@ -56,6 +56,7 @@ public class RegistryBlockID implements Registry { return Iterators.filter(this.c.iterator(), Predicates.notNull()); } @@ -814,39 +775,50 @@ index a21006290..6c6f006f3 100644 return this.b.size(); } diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 25d4907b3..1f6de76a7 100644 +index 8cb97b894..5e71d2ac2 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -34,8 +34,8 @@ public class SystemUtils { +@@ -35,8 +35,8 @@ public class SystemUtils { return Collectors.toMap(Entry::getKey, Entry::getValue); } - public static > String a(IBlockState iblockstate, Object object) { -- return iblockstate.a((Comparable)object); -+ public static > String a(IBlockState iblockstate, T object) { // Paper - decompile fix +- return iblockstate.a((Comparable) object); ++ public static > String a(IBlockState iblockstate, T object) { + return iblockstate.a(object); // Paper - decompile fix } public static String a(String s, @Nullable MinecraftKey minecraftkey) { -@@ -47,7 +47,7 @@ public class SystemUtils { +@@ -48,7 +48,7 @@ public class SystemUtils { } public static long getMonotonicNanos() { -- return a.getAsLong(); +- return SystemUtils.a.getAsLong(); + return System.nanoTime(); // Paper } public static long getTimeMillis() { -@@ -109,7 +109,7 @@ public class SystemUtils { +@@ -108,7 +108,7 @@ public class SystemUtils { futuretask.run(); - return (V)futuretask.get(); + return futuretask.get(); } catch (ExecutionException executionexception) { - logger.fatal("Error executing task", executionexception); + logger.fatal("Error executing task", executionexception.getCause() != null ? executionexception.getCause() : executionexception); // Paper } catch (InterruptedException interruptedexception) { logger.fatal("Error executing task", interruptedexception); } -@@ -169,7 +169,7 @@ public class SystemUtils { +@@ -144,8 +144,8 @@ public class SystemUtils { + public static T b(Iterable iterable, @Nullable T t0) { + Iterator iterator = iterable.iterator(); + +- Object object; +- Object object1; ++ T object; // Paper - decompile fix ++ T object1; // Paper - decompile fix + + for (object1 = null; iterator.hasNext(); object1 = object) { + object = iterator.next(); +@@ -170,7 +170,7 @@ public class SystemUtils { } public static Strategy g() { diff --git a/Spigot-Server-Patches/0005-Paper-Metrics.patch b/Spigot-Server-Patches/0005-Paper-Metrics.patch index ac77ac9e1..18b3490e1 100644 --- a/Spigot-Server-Patches/0005-Paper-Metrics.patch +++ b/Spigot-Server-Patches/0005-Paper-Metrics.patch @@ -1,4 +1,4 @@ -From a67441f309fdc542158b62334ea269cc94e47738 Mon Sep 17 00:00:00 2001 +From f1a6ed4b7cd1fe9d614bcc100d83226d9b7e529f 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 cde8ec432..87a7b6980 100644 +index f0473d9bf..255b8bed0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -41,6 +41,7 @@ public class PaperConfig { @@ -671,10 +671,10 @@ index cde8ec432..87a7b6980 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 9b40db46c..9dca5aeda 100644 +index 11c4d53df..fe3bad583 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -84,6 +84,7 @@ public class SpigotConfig +@@ -83,6 +83,7 @@ public class SpigotConfig MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() ); } @@ -682,7 +682,7 @@ index 9b40db46c..9dca5aeda 100644 if ( metrics == null ) { try -@@ -95,6 +96,7 @@ public class SpigotConfig +@@ -94,6 +95,7 @@ public class SpigotConfig Bukkit.getServer().getLogger().log( Level.SEVERE, "Could not start metrics service", ex ); } } @@ -691,5 +691,5 @@ index 9b40db46c..9dca5aeda 100644 static void readConfig(Class clazz, Object instance) -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index b3fedff92..d6c6c2e0d 100644 --- a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -1,4 +1,4 @@ -From a4cd0a3d6497c3e0f9dc2e006b52b705d1624b56 Mon Sep 17 00:00:00 2001 +From 418c4f16ed43996663c1d7843189b5c783988622 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 961966e169..56700fc596 100644 +index 961966e16..56700fc59 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 { @@ -19,10 +19,10 @@ index 961966e169..56700fc596 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ffaa425ec8..19a3ba79f2 100644 +index b1a4a6d70..e72ccefc2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -46,7 +46,7 @@ import org.bukkit.event.entity.EntityPortalEvent; +@@ -44,7 +44,7 @@ import org.bukkit.event.entity.EntityPortalEvent; import org.bukkit.plugin.PluginManager; // CraftBukkit end @@ -31,7 +31,7 @@ index ffaa425ec8..19a3ba79f2 100644 // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -74,7 +74,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -72,7 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); private static double c = 1.0D; private static int entityCount; @@ -40,7 +40,7 @@ index ffaa425ec8..19a3ba79f2 100644 private int id; public boolean j; public final List passengers; -@@ -1761,12 +1761,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1759,12 +1759,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } @@ -64,7 +64,7 @@ index ffaa425ec8..19a3ba79f2 100644 + } @Nullable public final String getSaveID() { -- EntityTypes entitytypes = this.P(); +- EntityTypes entitytypes = this.P(); - MinecraftKey minecraftkey = EntityTypes.getName(entitytypes); - - return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null; @@ -75,7 +75,7 @@ index ffaa425ec8..19a3ba79f2 100644 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 5c1ab6a0b6..cd411a1423 100644 +index a07ee150c..d74bfa120 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -240,6 +240,7 @@ public class EntityTypes { @@ -88,7 +88,7 @@ index 5c1ab6a0b6..cd411a1423 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 0000000000..743142d030 +index 000000000..743142d03 --- /dev/null +++ b/src/main/java/net/minecraft/server/KeyedObject.java @@ -0,0 +1,9 @@ @@ -102,7 +102,7 @@ index 0000000000..743142d030 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 62b6e6eb38..7390061bf0 100644 +index 62b6e6eb3..7390061bf 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; @@ -147,5 +147,5 @@ index 62b6e6eb38..7390061bf0 100644 public World getWorld() { return this.world; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0007-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 index a8b940612..e5e9e28fe 100644 --- a/Spigot-Server-Patches/0007-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 89c7eb82c66a25dc178e94900fe26e498351762e Mon Sep 17 00:00:00 2001 +From 8530b48c5697baa5a57bb85b04151485deb0257c 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,10 +8,10 @@ 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 5dd08018c..d1d8c3be6 100644 +index 417c015e5..b728a44f5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -37,7 +37,7 @@ public class Chunk implements IChunkAccess { +@@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess { private final BiomeBase[] f; private final boolean[] g; private final Map h; @@ -20,7 +20,7 @@ index 5dd08018c..d1d8c3be6 100644 public final World world; public final Map heightMap; public final int locX; -@@ -67,7 +67,30 @@ public class Chunk implements IChunkAccess { +@@ -66,7 +66,30 @@ public class Chunk implements IChunkAccess { // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking private int neighbors = 0x1 << 12; public long chunkKey; @@ -51,7 +51,7 @@ index 5dd08018c..d1d8c3be6 100644 public boolean areNeighborsLoaded(final int radius) { switch (radius) { case 2: -@@ -98,7 +121,7 @@ public class Chunk implements IChunkAccess { +@@ -97,7 +120,7 @@ public class Chunk implements IChunkAccess { this.g = new boolean[256]; this.h = Maps.newHashMap(); this.heightMap = Maps.newEnumMap(HeightMap.Type.class); @@ -60,7 +60,7 @@ index 5dd08018c..d1d8c3be6 100644 this.p = Maps.newHashMap(); this.q = Maps.newHashMap(); this.r = new ShortList[16]; -@@ -658,6 +681,9 @@ public class Chunk implements IChunkAccess { +@@ -657,6 +680,9 @@ public class Chunk implements IChunkAccess { entity.chunkY = k; entity.chunkZ = this.locZ; this.entitySlices[k].add(entity); @@ -70,7 +70,7 @@ index 5dd08018c..d1d8c3be6 100644 } public void a(HeightMap.Type heightmap_type, long[] along) { -@@ -676,8 +702,12 @@ public class Chunk implements IChunkAccess { +@@ -675,8 +701,12 @@ public class Chunk implements IChunkAccess { if (i >= this.entitySlices.length) { i = this.entitySlices.length - 1; } @@ -85,7 +85,7 @@ index 5dd08018c..d1d8c3be6 100644 } public boolean c(BlockPosition blockposition) { -@@ -886,6 +916,7 @@ public class Chunk implements IChunkAccess { +@@ -885,6 +915,7 @@ public class Chunk implements IChunkAccess { } } // Spigot End @@ -94,10 +94,10 @@ index 5dd08018c..d1d8c3be6 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a6eb8ab6c..50176b97b 100644 +index e72ccefc2..48ec5e047 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -132,7 +132,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private static final DataWatcherObject aF = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject aG = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject aH = DataWatcher.a(Entity.class, DataWatcherRegistry.i); @@ -106,7 +106,7 @@ index a6eb8ab6c..50176b97b 100644 public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER -@@ -1762,6 +1762,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1760,6 +1760,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start @@ -192,5 +192,5 @@ index 2c57a4f03..153efb9b9 100644 /** * Order is *EXTREMELY* important -- keep it right! =D -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch index 647fd7841..328ee6085 100644 --- a/Spigot-Server-Patches/0008-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 a00c2b358e7f0ce360d28c8e803026470f3ee940 Mon Sep 17 00:00:00 2001 +From fcea42cc3d3d4bc1e4ade7725e589b16b6a018e3 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,10 +6,10 @@ 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 d1d8c3be6..4d04fdda7 100644 +index b728a44f5..23dee9b56 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -68,15 +68,19 @@ public class Chunk implements IChunkAccess { +@@ -67,15 +67,19 @@ public class Chunk implements IChunkAccess { private int neighbors = 0x1 << 12; public long chunkKey; // Paper start @@ -29,7 +29,7 @@ index d1d8c3be6..4d04fdda7 100644 } return replaced; } -@@ -86,6 +90,7 @@ public class Chunk implements IChunkAccess { +@@ -85,6 +89,7 @@ public class Chunk implements IChunkAccess { TileEntity removed = super.remove(key); if (removed != null) { removed.setCurrentChunk(null); @@ -37,7 +37,7 @@ index d1d8c3be6..4d04fdda7 100644 } return removed; } -@@ -683,6 +688,7 @@ public class Chunk implements IChunkAccess { +@@ -682,6 +687,7 @@ public class Chunk implements IChunkAccess { this.entitySlices[k].add(entity); // Paper start entity.setCurrentChunk(this); @@ -45,7 +45,7 @@ index d1d8c3be6..4d04fdda7 100644 // Paper end } -@@ -707,6 +713,7 @@ public class Chunk implements IChunkAccess { +@@ -706,6 +712,7 @@ public class Chunk implements IChunkAccess { return; } entity.setCurrentChunk(null); @@ -54,5 +54,5 @@ index d1d8c3be6..4d04fdda7 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index d34df9f7f..f498064e2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 87fd657aa5de36c8b09b9d2463708b818665f008 Mon Sep 17 00:00:00 2001 +From 7d6ad95befec8dab636401c55bce7bba66ec4c34 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -297,10 +297,10 @@ index 255b8bed0..fe148495b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index a30b21ad2..83b1ef0fc 100644 +index c09961be9..dbf1089ba 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -23,6 +23,15 @@ public class Block implements IMaterial { +@@ -22,6 +22,15 @@ public class Block implements IMaterial { protected final boolean i; protected final SoundEffectType stepSound; protected final Material material; @@ -317,10 +317,10 @@ index a30b21ad2..83b1ef0fc 100644 private final float frictionFactor; protected final BlockStateList blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4d04fdda7..9970a58ed 100644 +index 23dee9b56..eca1284cc 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -855,6 +855,7 @@ public class Chunk implements IChunkAccess { +@@ -854,6 +854,7 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -328,7 +328,7 @@ index 4d04fdda7..9970a58ed 100644 BlockSand.instaFall = true; java.util.Random random = new java.util.Random(); random.setSeed(world.getSeed()); -@@ -875,6 +876,7 @@ public class Chunk implements IChunkAccess { +@@ -874,6 +875,7 @@ public class Chunk implements IChunkAccess { } BlockSand.instaFall = false; server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -357,19 +357,19 @@ index df2711a5f..732c8793e 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index b859a5b9e..60abc5f28 100644 +index 0397ce610..44c1dfe92 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -90,7 +90,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -88,7 +88,7 @@ public class ChunkProviderServer implements IChunkProvider { } if (flag) { - try { + try (co.aikar.timings.Timing timing = world.timings.syncChunkLoadTimer.startTiming()) { // Paper - // CraftBukkit - decompile error chunk = this.chunkLoader.a(this.world, i, j, (chunk1) -> { chunk1.setLastSaved(this.world.getTime()); -@@ -106,8 +106,7 @@ public class ChunkProviderServer implements IChunkProvider { + this.chunks.put(ChunkCoordIntPair.a(i, j), chunk1); +@@ -103,8 +103,7 @@ public class ChunkProviderServer implements IChunkProvider { this.asyncTaskHandler.postToMainThread(chunk::addEntities); return chunk; } else if (flag1) { @@ -378,8 +378,8 @@ index b859a5b9e..60abc5f28 100644 + try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { // Paper this.batchScheduler.b(); this.batchScheduler.a(new ChunkCoordIntPair(i, j)); - CompletableFuture completablefuture = this.batchScheduler.c(); // CraftBukkit - decompile error -@@ -116,7 +115,7 @@ public class ChunkProviderServer implements IChunkProvider { + CompletableFuture completablefuture = this.batchScheduler.c(); +@@ -113,7 +112,7 @@ public class ChunkProviderServer implements IChunkProvider { } catch (RuntimeException runtimeexception) { throw this.a(i, j, (Throwable) runtimeexception); } @@ -388,7 +388,7 @@ index b859a5b9e..60abc5f28 100644 } else { return null; } -@@ -206,7 +205,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -203,7 +202,7 @@ public class ChunkProviderServer implements IChunkProvider { } public void saveChunk(IChunkAccess ichunkaccess, boolean unloaded) { // Spigot @@ -398,7 +398,7 @@ index b859a5b9e..60abc5f28 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 1b8c28096..62a63dfa8 100644 +index e7ed23453..63533d237 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -1,5 +1,6 @@ @@ -408,7 +408,7 @@ index 1b8c28096..62a63dfa8 100644 import com.google.common.collect.Maps; import com.mojang.datafixers.DataFixTypes; import com.mojang.datafixers.DataFixer; -@@ -682,7 +683,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -666,7 +667,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { public void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) { NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10); World world = chunk.getWorld(); @@ -417,7 +417,7 @@ index 1b8c28096..62a63dfa8 100644 for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); -@@ -691,8 +692,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -675,8 +676,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { chunk.f(true); } @@ -426,7 +426,7 @@ index 1b8c28096..62a63dfa8 100644 NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10); for (int j = 0; j < nbttaglist1.size(); ++j) { -@@ -709,8 +708,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -693,8 +692,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } } } @@ -435,7 +435,7 @@ index 1b8c28096..62a63dfa8 100644 if (nbttagcompound.hasKeyOfType("TileTicks", 9) && world.getBlockTickList() instanceof TickListServer) { ((TickListServer) world.getBlockTickList()).a(nbttagcompound.getList("TileTicks", 10)); -@@ -719,7 +716,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -703,7 +700,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { if (nbttagcompound.hasKeyOfType("LiquidTicks", 9) && world.getFluidTickList() instanceof TickListServer) { ((TickListServer) world.getFluidTickList()).a(nbttagcompound.getList("LiquidTicks", 10)); } @@ -445,10 +445,10 @@ index 1b8c28096..62a63dfa8 100644 } diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java -index cc9e8465c..1bd3a0f77 100644 +index 65574eb2e..bc87cfc4b 100644 --- a/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java -@@ -13,12 +13,22 @@ public class CustomFunction { +@@ -12,12 +12,22 @@ public class CustomFunction { private final CustomFunction.c[] a; private final MinecraftKey b; @@ -472,10 +472,10 @@ index cc9e8465c..1bd3a0f77 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index b8a626dd4..323b2e6dc 100644 +index f28f4f3cd..6b417be1d 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java -@@ -109,7 +109,7 @@ public class CustomFunctionData implements ITickable, IResourcePackListener { +@@ -100,7 +100,7 @@ public class CustomFunctionData implements ITickable, IResourcePackListener { return 0; } else { @@ -485,7 +485,7 @@ index b8a626dd4..323b2e6dc 100644 int j = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index b5e5c385d..7f4c76669 100644 +index 197d116c6..0ebada490 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; @@ -538,10 +538,10 @@ index b5e5c385d..7f4c76669 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 50176b97b..f960db23d 100644 +index 48ec5e047..f36ab639f 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; +@@ -27,7 +27,8 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Hanging; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Vehicle; @@ -551,7 +551,7 @@ index 50176b97b..f960db23d 100644 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -160,7 +161,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -158,7 +159,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean valid; public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 @@ -560,7 +560,7 @@ index 50176b97b..f960db23d 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -537,7 +538,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -535,7 +536,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, double d0, double d1, double d2) { @@ -568,7 +568,7 @@ index 50176b97b..f960db23d 100644 if (this.noclip) { this.a(this.getBoundingBox().d(d0, d1, d2)); this.recalcPosition(); -@@ -887,7 +887,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -885,7 +885,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.methodProfiler.exit(); } @@ -577,7 +577,7 @@ index 50176b97b..f960db23d 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 14c481220..92a55bdf6 100644 +index ed859ccf9..31bbbbd96 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; @@ -653,15 +653,15 @@ index 14c481220..92a55bdf6 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 22db1fad1..d7f33bd53 100644 +index cd462f7df..45ab33d1a 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -168,7 +168,7 @@ public class EntityTracker { public void updatePlayers() { - ArrayList arraylist = Lists.newArrayList(); + List list = Lists.newArrayList(); Iterator iterator = this.c.iterator(); - -+ world.timings.tracker1.startTiming(); // Spigot ++ world.timings.tracker1.startTiming(); // Paper while (iterator.hasNext()) { EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next(); @@ -669,22 +669,22 @@ index 22db1fad1..d7f33bd53 100644 } } } -+ world.timings.tracker1.stopTiming(); // Spigot ++ world.timings.tracker1.stopTiming(); // Paper -+ world.timings.tracker2.startTiming(); // Spigot - for (int i = 0; i < arraylist.size(); ++i) { - EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i); ++ world.timings.tracker2.startTiming(); // Paper + for (int i = 0; i < list.size(); ++i) { + EntityPlayer entityplayer = (EntityPlayer) list.get(i); Iterator iterator1 = this.c.iterator(); @@ -194,6 +196,7 @@ public class EntityTracker { } } } -+ world.timings.tracker2.stopTiming(); // Spigot ++ world.timings.tracker2.stopTiming(); // Paper } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 37211c33a..97690499f 100644 +index 963c7e777..edb1748fd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,5 +1,6 @@ @@ -694,7 +694,7 @@ index 37211c33a..97690499f 100644 import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -@@ -67,8 +68,8 @@ import org.bukkit.craftbukkit.CraftServer; +@@ -62,8 +63,8 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.Main; import org.bukkit.event.server.ServerLoadEvent; // CraftBukkit end @@ -704,7 +704,7 @@ index 37211c33a..97690499f 100644 public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStatistics, ICommandListener, Runnable { -@@ -620,6 +621,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -615,6 +616,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } // CraftBukkit end MinecraftServer.LOGGER.info("Stopping server"); @@ -712,7 +712,7 @@ index 37211c33a..97690499f 100644 // CraftBukkit start if (this.server != null) { this.server.disablePlugins(); -@@ -821,7 +823,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -816,7 +818,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public void t() {} protected void a(BooleanSupplier booleansupplier) { @@ -721,7 +721,7 @@ index 37211c33a..97690499f 100644 this.slackActivityAccountant.tickStarted(); // Spigot long i = SystemUtils.getMonotonicNanos(); -@@ -848,7 +850,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -843,7 +845,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -729,7 +729,7 @@ index 37211c33a..97690499f 100644 this.methodProfiler.enter("save"); this.playerList.savePlayers(); // Spigot Start -@@ -863,7 +864,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -858,7 +859,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // this.saveChunks(true); // Spigot End this.methodProfiler.exit(); @@ -737,7 +737,7 @@ index 37211c33a..97690499f 100644 } this.methodProfiler.enter("snooper"); -@@ -884,14 +884,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -879,14 +879,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.exit(); org.spigotmc.WatchdogThread.tick(); // Spigot this.slackActivityAccountant.tickEnded(l); // Spigot @@ -756,7 +756,7 @@ index 37211c33a..97690499f 100644 this.methodProfiler.enter("jobs"); FutureTask futuretask; -@@ -899,26 +899,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -894,26 +894,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati while ((futuretask = (FutureTask) this.f.poll()) != null) { SystemUtils.a(futuretask, MinecraftServer.LOGGER); } @@ -791,7 +791,7 @@ index 37211c33a..97690499f 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) { -@@ -926,7 +927,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -921,7 +922,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 } } @@ -800,7 +800,7 @@ index 37211c33a..97690499f 100644 // WorldServer worldserver; // CraftBukkit - dropped down long i; -@@ -985,29 +986,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -980,29 +981,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.exit(); this.methodProfiler.enter("tracker"); @@ -837,7 +837,7 @@ index 37211c33a..97690499f 100644 this.methodProfiler.exit(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ceac52fe5..29e24940f 100644 +index c24f4a8fe..e01222ad2 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,5 +1,6 @@ @@ -847,7 +847,7 @@ index ceac52fe5..29e24940f 100644 import com.google.common.collect.AbstractIterator; import com.google.common.collect.ComparisonChain; import com.google.common.collect.Lists; -@@ -86,6 +87,7 @@ public class PlayerChunkMap { +@@ -84,6 +85,7 @@ public class PlayerChunkMap { int j; if (i - this.k > 8000L) { @@ -855,7 +855,7 @@ index ceac52fe5..29e24940f 100644 this.k = i; for (j = 0; j < this.i.size(); ++j) { -@@ -93,9 +95,11 @@ public class PlayerChunkMap { +@@ -91,9 +93,11 @@ public class PlayerChunkMap { playerchunk.d(); playerchunk.c(); } @@ -867,7 +867,7 @@ index ceac52fe5..29e24940f 100644 Iterator iterator = this.f.iterator(); while (iterator.hasNext()) { -@@ -104,25 +108,31 @@ public class PlayerChunkMap { +@@ -102,23 +106,29 @@ public class PlayerChunkMap { } this.f.clear(); @@ -877,9 +877,8 @@ index ceac52fe5..29e24940f 100644 if (this.l && i % 4L == 0L) { this.l = false; + try (Timing ignored = world.timings.doChunkMapSortMissing.startTiming()) { // Paper - // CraftBukkit start - Collections.sort(this.h, (playerchunkx, playerchunk1x) -> { - return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result(); + Collections.sort(this.h, (playerchunk1, playerchunk2) -> { + return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result(); }); + } // Paper timing } @@ -887,11 +886,10 @@ index ceac52fe5..29e24940f 100644 if (this.m && i % 4L == 2L) { this.m = false; + try (Timing ignored = world.timings.doChunkMapSortSendToPlayers.startTiming()) { // Paper - Collections.sort(this.g, (playerchunkx, playerchunk1x) -> { - return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result(); + Collections.sort(this.g, (playerchunk1, playerchunk2) -> { + return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result(); }); + } // Paper timing - // CraftBukkit end } if (!this.h.isEmpty()) { @@ -899,7 +897,7 @@ index ceac52fe5..29e24940f 100644 // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); -@@ -154,10 +164,12 @@ public class PlayerChunkMap { +@@ -150,10 +160,12 @@ public class PlayerChunkMap { } activityAccountant.endActivity(); // Spigot @@ -912,7 +910,7 @@ index ceac52fe5..29e24940f 100644 Iterator iterator2 = this.g.iterator(); while (iterator2.hasNext()) { -@@ -171,14 +183,17 @@ public class PlayerChunkMap { +@@ -167,14 +179,17 @@ public class PlayerChunkMap { } } } @@ -931,10 +929,10 @@ index ceac52fe5..29e24940f 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2b6c797ce..0a887789a 100644 +index f0e87416e..723fce204 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory; +@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.util.NumberConversions; @@ -942,7 +940,7 @@ index 2b6c797ce..0a887789a 100644 // CraftBukkit end public class PlayerConnection implements PacketListenerPlayIn, ITickable { -@@ -136,7 +137,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -135,7 +136,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit end public void tick() { @@ -950,7 +948,7 @@ index 2b6c797ce..0a887789a 100644 this.syncPosition(); this.player.playerTick(); this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch); -@@ -209,7 +209,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -208,7 +208,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854 this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0])); } @@ -986,28 +984,29 @@ index 2b6c797ce..0a887789a 100644 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 616797dc6..3a5daf670 100644 +index 6c88d0c86..8bf94c1b9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -@@ -1,10 +1,16 @@ +@@ -1,11 +1,17 @@ package net.minecraft.server; +import co.aikar.timings.MinecraftTimings; // Paper +import co.aikar.timings.Timing; // Paper + public class PlayerConnectionUtils { - public static void ensureMainThread(Packet packet, T packetlistener, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { + + public static void ensureMainThread(Packet packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { if (!iasynctaskhandler.isMainThread()) { + Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper iasynctaskhandler.postToMainThread(() -> { -+ try (Timing ignored = timing.startTiming()) { // Paper - packet.a(packetlistener); -+ } ++ try (Timing ignored = timing.startTiming()) { // Paper + packet.a(t0); ++ } // Paper - timings }); throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9db7d7e30..aef650774 100644 +index 8d90b674a..aab49bf68 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1017,7 +1016,7 @@ index 9db7d7e30..aef650774 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1174,10 +1175,11 @@ public abstract class PlayerList { +@@ -1173,10 +1174,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1031,7 +1030,7 @@ index 9db7d7e30..aef650774 100644 public WhiteList getWhitelist() { diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index 0d0b4d873..774134103 100644 +index 0da57948a..6571fc595 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java @@ -24,13 +24,19 @@ public class TickListServer implements TickList { @@ -1105,7 +1104,7 @@ index c69209497..68ac014aa 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 0920ef2d1..230517907 100644 +index 5531f5205..209091a9c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,6 @@ @@ -1115,7 +1114,7 @@ index 0920ef2d1..230517907 100644 import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.longs.LongSet; -@@ -26,13 +27,13 @@ import com.google.common.collect.Maps; +@@ -24,7 +25,6 @@ import java.util.ArrayList; import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.block.BlockState; @@ -1123,14 +1122,7 @@ index 0920ef2d1..230517907 100644 import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.block.CraftBlockState; - import org.bukkit.craftbukkit.block.data.CraftBlockData; - import org.bukkit.craftbukkit.event.CraftEventFactory; - import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.craftbukkit.util.LongHashSet; // Paper - import org.bukkit.event.block.BlockCanBuildEvent; - import org.bukkit.event.block.BlockPhysicsEvent; - import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; -@@ -136,7 +137,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -132,7 +132,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1139,7 +1131,7 @@ index 0920ef2d1..230517907 100644 private boolean guardEntityList; // Spigot public static boolean haveWeSilencedAPhysicsCrash; public static String blockLocation; -@@ -205,7 +206,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -201,7 +201,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc }); this.getServer().addWorld(this.world); // CraftBukkit end @@ -1148,7 +1140,7 @@ index 0920ef2d1..230517907 100644 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -1080,6 +1081,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1076,6 +1076,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } this.methodProfiler.exitEnter("remove"); @@ -1156,7 +1148,7 @@ index 0920ef2d1..230517907 100644 this.entityList.removeAll(this.g); int j; -@@ -1100,6 +1102,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1096,6 +1097,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.g.clear(); this.p_(); @@ -1164,7 +1156,7 @@ index 0920ef2d1..230517907 100644 this.methodProfiler.exitEnter("regular"); CrashReport crashreport1; -@@ -1109,6 +1112,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1105,6 +1107,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc timings.entityTick.startTiming(); // Spigot guardEntityList = true; // Spigot // CraftBukkit start - Use field for loop variable @@ -1172,7 +1164,7 @@ index 0920ef2d1..230517907 100644 int entitiesThisCycle = 0; if (tickPosition < 0) tickPosition = 0; for (entityLimiter.initTick(); -@@ -1130,10 +1134,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1126,10 +1129,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.methodProfiler.enter("tick"); if (!entity.dead && !(entity instanceof EntityPlayer)) { try { @@ -1186,7 +1178,7 @@ index 0920ef2d1..230517907 100644 crashreport1 = CrashReport.a(throwable1, "Ticking entity"); crashreportsystemdetails1 = crashreport1.a("Entity being ticked"); entity.appendEntityCrashDetails(crashreportsystemdetails1); -@@ -1258,6 +1263,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1254,6 +1258,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } timings.tileEntityPending.stopTiming(); // Spigot @@ -1194,7 +1186,7 @@ index 0920ef2d1..230517907 100644 this.methodProfiler.exit(); this.methodProfiler.exit(); } -@@ -1316,7 +1322,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1312,7 +1317,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } // CraftBukkit end @@ -1202,7 +1194,7 @@ index 0920ef2d1..230517907 100644 entity.N = entity.locX; entity.O = entity.locY; entity.P = entity.locZ; -@@ -1324,6 +1329,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1320,6 +1324,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc entity.lastPitch = entity.pitch; if (flag && entity.inChunk) { ++entity.ticksLived; @@ -1210,7 +1202,7 @@ index 0920ef2d1..230517907 100644 if (entity.isPassenger()) { entity.aH(); } else { -@@ -1387,8 +1393,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1383,8 +1388,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } } @@ -1220,7 +1212,7 @@ index 0920ef2d1..230517907 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 23c80f80a..2450421d4 100644 +index 0a32a767e..60939cc33 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,6 @@ @@ -1230,25 +1222,21 @@ index 23c80f80a..2450421d4 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.util.concurrent.ListenableFuture; -@@ -71,7 +72,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { - IRegistry iregistry1 = IRegistry.BLOCK; // CraftBukkit - decompile error - - IRegistry.BLOCK.getClass(); -- this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b); // CraftBukkit - decompile error -+ this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b, "Blocks"); // CraftBukkit - decompile error // Paper - Timings v2 - Predicate predicate2 = (fluidtype) -> { // CraftBukkit - decompile error - return fluidtype == null || fluidtype == FluidTypes.a; - }; -@@ -80,7 +81,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { - function = iregistry::getKey; - IRegistry iregistry2 = IRegistry.FLUID; // CraftBukkit - decompile error - IRegistry.FLUID.getClass(); -- this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a); // CraftBukkit - decompile error -+ this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a, "Fluids"); // CraftBukkit - decompile error // Paper - Timings v2 +@@ -59,10 +60,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { + // CraftBukkit end + this.nextTickListBlock = new TickListServer<>(this, (block) -> { + return block == null || block.getBlockData().isAir(); +- }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b); ++ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b, "Blocks"); // Paper - timings ++ + this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { + return fluidtype == null || fluidtype == FluidTypes.EMPTY; +- }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a); ++ }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a, "Fluids"); // Paper - timings this.siegeManager = new VillageSiege(this); this.d = new ObjectLinkedOpenHashSet(); this.server = minecraftserver; -@@ -297,13 +298,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -279,13 +281,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { timings.doChunkUnload.stopTiming(); // Spigot this.methodProfiler.exitEnter("tickPending"); @@ -1266,7 +1254,7 @@ index 23c80f80a..2450421d4 100644 this.methodProfiler.exitEnter("chunkMap"); timings.doChunkMap.startTiming(); // Spigot this.manager.flush(); -@@ -533,6 +534,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -515,6 +517,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } this.methodProfiler.exitEnter("tickBlocks"); @@ -1274,7 +1262,7 @@ index 23c80f80a..2450421d4 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int i1 = achunksection.length; -@@ -564,6 +566,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -546,6 +549,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } } @@ -1282,7 +1270,7 @@ index 23c80f80a..2450421d4 100644 } this.methodProfiler.exit(); -@@ -869,6 +872,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -851,6 +855,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (chunkproviderserver.d()) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1290,7 +1278,7 @@ index 23c80f80a..2450421d4 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); } -@@ -878,7 +882,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -860,7 +865,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); } @@ -1298,9 +1286,9 @@ index 23c80f80a..2450421d4 100644 chunkproviderserver.a(flag); + timings.worldSaveChunks.stopTiming(); // Paper // CraftBukkit - ArrayList -> Collection - java.util.Collection arraylist = chunkproviderserver.a(); - Iterator iterator = arraylist.iterator(); -@@ -890,7 +896,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + java.util.Collection list = chunkproviderserver.a(); + Iterator iterator = list.iterator(); +@@ -872,7 +879,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { chunkproviderserver.unload(chunk); } } @@ -1309,7 +1297,7 @@ index 23c80f80a..2450421d4 100644 } } -@@ -903,6 +909,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -885,6 +892,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } protected void a() throws ExceptionWorldConflict { @@ -1317,7 +1305,7 @@ index 23c80f80a..2450421d4 100644 this.checkSession(); Iterator iterator = this.server.getWorlds().iterator(); -@@ -932,6 +939,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -914,6 +922,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.worldData.c(this.server.getBossBattleCustomData().c()); this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t()); this.h().a(); @@ -1577,10 +1565,10 @@ index 413dd35f0..52a8c48fa 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 b1a5937b1..b5afd5d1c 100644 +index ab944fc67..7993581c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1720,6 +1720,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1726,6 +1726,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -1818,5 +1806,5 @@ index c1071c92e..a99c0cea0 100644 } } -- -2.20.0 +2.20.1 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 69bb34768..4283ce01d 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch @@ -1,4 +1,4 @@ -From 0b7b250edea62c25ecaa5abf3a83298d4365d9ef Mon Sep 17 00:00:00 2001 +From 92ac86da3d4646d3219b8d7a4984c2690acd9467 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 @@ -19,10 +19,10 @@ index a55163a45..341038fc4 100644 + } } diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java -index 74a40671e..5d6260ded 100644 +index 4ed5192c6..489beed26 100644 --- a/src/main/java/net/minecraft/server/ControllerJump.java +++ b/src/main/java/net/minecraft/server/ControllerJump.java -@@ -12,6 +12,7 @@ public class ControllerJump { +@@ -13,6 +13,7 @@ public class ControllerJump { this.a = true; } @@ -31,10 +31,10 @@ index 74a40671e..5d6260ded 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 7cf459d26..9d4d8c697 100644 +index cca047b04..f31f31c37 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 { +@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving { private final EntityAIBodyControl b; protected NavigationAbstract navigation; public PathfinderGoalSelector goalSelector; @@ -42,7 +42,7 @@ index 7cf459d26..9d4d8c697 100644 public PathfinderGoalSelector targetSelector; private EntityLiving goalTarget; private final EntitySenses bC; -@@ -646,6 +647,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -647,6 +648,12 @@ public abstract class EntityInsentient extends EntityLiving { // Spigot Start if ( this.fromMobSpawner ) { @@ -56,10 +56,10 @@ index 7cf459d26..9d4d8c697 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 15c04f890..7db180fa9 100644 +index 0d9505138..38a0b2db1 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -@@ -5,14 +5,17 @@ public class PathfinderGoalFloat extends PathfinderGoal { +@@ -6,14 +6,17 @@ public class PathfinderGoalFloat extends PathfinderGoal { public PathfinderGoalFloat(EntityInsentient entityinsentient) { this.a = entityinsentient; @@ -78,5 +78,5 @@ index 15c04f890..7db180fa9 100644 if (this.a.getRandom().nextFloat() < 0.8F) { this.a.getControllerJump().a(); -- -2.19.2 +2.20.1 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 e21e9c6a8..888328c82 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,4 +1,4 @@ -From 1b2fe04861331c81c67b51e17ae2596e8a03473a Mon Sep 17 00:00:00 2001 +From 0d8ee36dbb6764ff3cde5a629eee498f7c4240e7 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 @@ -30,10 +30,10 @@ index 341038fc4..3e1f4be10 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9d4d8c697..8f4319c80 100644 +index f31f31c37..42a073d70 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -625,13 +625,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -626,13 +626,13 @@ public abstract class EntityInsentient extends EntityLiving { double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -51,5 +51,5 @@ index 9d4d8c697..8f4319c80 100644 } } -- -2.19.2 +2.20.1 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 206e56a3e..748daa01b 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,11 +1,11 @@ -From f53a589e0196b116fe888b7cdadc4d356f122ba6 Mon Sep 17 00:00:00 2001 +From 95f9f5f005624432004e2a747ee6e5abed0819e3 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 02f7e506e3..cef0c47ac7 100644 +index 3e1f4be10..3f734327c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -108,4 +108,10 @@ public class PaperWorldConfig { @@ -20,10 +20,10 @@ index 02f7e506e3..cef0c47ac7 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c3c435cab9..30a46a50fb 100644 +index 209091a9c..ed227d8e8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -207,6 +207,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -202,6 +202,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.getServer().addWorld(this.world); // CraftBukkit end timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings @@ -32,5 +32,5 @@ index c3c435cab9..30a46a50fb 100644 this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -- -2.18.0 +2.20.1 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 11161767e..327110d32 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,11 +1,11 @@ -From 12e9eb10a5ab02e4a5c0bb869ec4115f93f458db Mon Sep 17 00:00:00 2001 +From c2c5e7da6e22bdab35fda8998f1426f1df3dbb0c 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 3f734327c0..1ed58f4bba 100644 +index 3f734327c..1ed58f4bb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -114,4 +114,14 @@ public class PaperWorldConfig { @@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 320146783b..06b7182a45 100644 +index f36ab639f..4baf5750e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1865,6 +1865,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1863,6 +1863,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } @@ -36,7 +36,7 @@ index 320146783b..06b7182a45 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 01045058ce..25960cff2a 100644 +index 4e4c8cc50..a6eae266d 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 { @@ -58,7 +58,7 @@ index 01045058ce..25960cff2a 100644 blockposition = new BlockPosition(this); boolean flag = this.block.getBlock() instanceof BlockConcretePowder; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 7edc028527..5ceb3f2068 100644 +index 3977498c4..5dc52b6b8 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity { @@ -76,5 +76,5 @@ index 7edc028527..5ceb3f2068 100644 this.motY *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D; -- -2.19.0 +2.20.1 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 954b5723d..d79ff3f51 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 a108d9cee628d6f30506090b13eea565d11d66b6 Mon Sep 17 00:00:00 2001 +From fbb55750ab525c22cc9d0971daae118e62f75a17 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,23 +6,23 @@ 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 b64cac252..526f3af51 100644 +index 220ca7bca..e13e17bdd 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java -@@ -49,7 +49,7 @@ public class EULA { - Properties properties = new Properties(); +@@ -52,7 +52,7 @@ public class EULA { + fileoutputstream = new FileOutputStream(this.b); properties.setProperty("eula", "false"); - properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)."); + properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag); } catch (Exception exception) { - a.warn("Failed to save {}", this.b, exception); + EULA.a.warn("Failed to save {}", this.b, exception); } finally { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2d812b024..8a6589d95 100644 +index edb1748fd..b5f30b2b2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1213,7 +1213,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1208,7 +1208,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } public String getServerModName() { @@ -32,7 +32,7 @@ index 2d812b024..8a6589d95 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 174605b6e..29b016e17 100644 +index da57751f7..ed0221f0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -162,7 +162,7 @@ import org.bukkit.event.server.TabCompleteEvent; @@ -116,5 +116,5 @@ index 14a1084aa..21316d67f 100644 log.log( Level.SEVERE, "------------------------------" ); // -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch index 4201d3266..968e71ce3 100644 --- a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch @@ -1,14 +1,14 @@ -From 164c726a9beb2ae4706cee345a93948451828d46 Mon Sep 17 00:00:00 2001 +From c2d0e15e8095c773c163ea2a5f62ae6dcb8d56c5 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 05360531c..1aec6d7c3 100644 +index 4308269d4..70d5a69f8 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -71,6 +71,9 @@ public abstract class EntityHuman extends EntityLiving { +@@ -68,6 +68,9 @@ public abstract class EntityHuman extends EntityLiving { private final ItemCooldown ce; @Nullable public EntityFishingHook hookedFish; @@ -19,10 +19,10 @@ index 05360531c..1aec6d7c3 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 ef3c94221..ac250182b 100644 +index 42a073d70..4809af8f0 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -619,7 +619,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -620,7 +620,7 @@ public abstract class EntityInsentient extends EntityLiving { } else { EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D); @@ -32,7 +32,7 @@ index ef3c94221..ac250182b 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 850569f6b..f958bd5ba 100644 +index 3c566ebd0..ba40e03fc 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 850569f6b..f958bd5ba 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index afe039905..ff564508f 100644 +index 6ca0e19cb..4eaa5d93b 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,18 +58,18 @@ index afe039905..ff564508f 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 b116239f2..73c47c517 100644 +index ed227d8e8..dab1be9b6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; +@@ -30,6 +30,7 @@ import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.block.CraftBlockState; + import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.event.CraftEventFactory; - import org.bukkit.craftbukkit.util.CraftMagicNumbers; - import org.bukkit.craftbukkit.util.LongHashSet; // Paper -+import org.bukkit.entity.Player; - import org.bukkit.event.block.BlockCanBuildEvent; ++import org.bukkit.craftbukkit.util.LongHashSet; // Paper import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; -@@ -2389,7 +2390,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc + import org.bukkit.generator.ChunkGenerator; +@@ -2384,7 +2385,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); @@ -79,10 +79,10 @@ index b116239f2..73c47c517 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 b5afd5d1c..47da00948 100644 +index 7993581c2..4a30435a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1633,7 +1633,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1639,7 +1639,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; @@ -103,5 +103,5 @@ index b5afd5d1c..47da00948 100644 @Override public void updateCommands() { -- -2.20.0 +2.20.1 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 c31f66ac8..2c55e83de 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 729ed20118acbca8d55fbfb71d3d02ef0a27314b Mon Sep 17 00:00:00 2001 +From 5011c4049d2d9d65d19fd159a63811744bfb7ddb 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 9970a58ed..da2548603 100644 +index eca1284cc..0a436133a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -798,6 +798,10 @@ public class Chunk implements IChunkAccess { +@@ -797,6 +797,10 @@ public class Chunk implements IChunkAccess { tileentity.z(); this.tileEntities.put(blockposition.h(), tileentity); // CraftBukkit start @@ -20,5 +20,5 @@ index 9970a58ed..da2548603 100644 System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ() + " (" + getType(blockposition) + ") where there was no entity tile!"); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch index 8170370ba..ba412cf44 100644 --- a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch @@ -1,24 +1,11 @@ -From fe5d1f6d166e14ba309e16fb90c12c82ab35e5c4 Mon Sep 17 00:00:00 2001 +From 38eae291e775cae8925a2d2b580a30f09cecd2d5 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/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 9ffec378a9..5401f7d754 100644 ---- a/src/main/java/net/minecraft/server/BlockChest.java -+++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -216,7 +216,7 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC - } - - private boolean b(World world, BlockPosition blockposition) { -- List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); -+ List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix - if (!list.isEmpty()) { - for(EntityOcelot entityocelot : list) { - if (entityocelot.isSitting()) { diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index ad601a39d9..9573a4ecdf 100644 +index 2b03896e2..c46b761cc 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; @@ -47,7 +34,7 @@ index ad601a39d9..9573a4ecdf 100644 + // 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))); + 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,13 +140,17 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { } } @@ -104,7 +91,7 @@ index ad601a39d9..9573a4ecdf 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 05de26405e..bc851d2a04 100644 +index ee19595d3..f2df6f395 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -1,6 +1,6 @@ @@ -112,10 +99,10 @@ index 05de26405e..bc851d2a04 100644 -public class TileEntityEnderChest extends TileEntity implements ITickable { +public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable + public float a; public float e; - public int f; -@@ -16,16 +16,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { +@@ -17,19 +17,37 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { } this.e = this.a; @@ -124,7 +111,9 @@ index 05de26405e..bc851d2a04 100644 int i = this.position.getX(); int j = this.position.getY(); int k = this.position.getZ(); - float fx = 0.1F; + float f = 0.1F; + double d0; + + */ + // Paper start + } @@ -134,9 +123,11 @@ index 05de26405e..bc851d2a04 100644 + int k = this.position.getZ(); + // Paper end if (this.f > 0 && this.a == 0.0F) { - double d0 = (double)i + 0.5D; - double d1 = (double)k + 0.5D; - this.world.a((EntityHuman)null, d0, (double)j + 0.5D, d1, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + double d1 = (double) i + 0.5D; + +- d0 = (double) k + 0.5D; ++ double d0 = (double) k + 0.5D; // Paper + this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); } - + // Paper start @@ -149,9 +140,9 @@ index 05de26405e..bc851d2a04 100644 + double d0; + // Paper end if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { - float f2 = this.a; - if (this.f > 0) { -@@ -69,11 +87,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { + float f1 = this.a; + +@@ -76,11 +94,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { public void c() { ++this.f; this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f); @@ -166,5 +157,5 @@ index 05de26405e..bc851d2a04 100644 public boolean a(EntityHuman entityhuman) { -- -2.18.0 +2.20.1 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 a98ac0488..e09fd17e9 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 fd0cba99aee112db7620e0860c08f2c65c982ee4 Mon Sep 17 00:00:00 2001 +From e990ffd965e20df1b41e07f7861db7bf2584fb8c 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 ffda9d793..4acb908ec 100644 +index b5f30b2b2..b12d9fbe8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -146,7 +146,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -141,7 +141,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,7 @@ index ffda9d793..4acb908ec 100644 public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -156,7 +156,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -151,7 +151,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot start public static final int TPS = 20; public static final int TICK_TIME = 1000000000 / TPS; @@ -33,7 +33,7 @@ index ffda9d793..4acb908ec 100644 public final double[] recentTps = new double[ 3 ]; public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); // Spigot end -@@ -689,7 +689,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -684,7 +684,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } private boolean canSleepForTick() { @@ -42,7 +42,7 @@ index ffda9d793..4acb908ec 100644 } // Spigot Start -@@ -697,6 +697,57 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -692,6 +692,57 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati { return ( avg * exp ) + ( tps * ( 1 - exp ) ); } @@ -100,7 +100,7 @@ index ffda9d793..4acb908ec 100644 // Spigot End public void run() { -@@ -709,29 +760,47 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -704,29 +755,47 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot start Arrays.fill( recentTps, 20 ); @@ -224,5 +224,5 @@ index be2e31dea..6d21c3269 100644 return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0023-Entity-Origin-API.patch b/Spigot-Server-Patches/0023-Entity-Origin-API.patch index c3c1d25ff..6a5f9ad2a 100644 --- a/Spigot-Server-Patches/0023-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0023-Entity-Origin-API.patch @@ -1,14 +1,14 @@ -From f1f93c9e37b210e625b5881a7fe266309283a08b Mon Sep 17 00:00:00 2001 +From fcc79c8edbb43bcd014c6d87d2b2edd1460744f3 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 7c2a8c5c8..cc6ae6634 100644 +index 4baf5750e..ca5212f20 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -162,6 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper @@ -16,7 +16,7 @@ index 7c2a8c5c8..cc6ae6634 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1606,6 +1607,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1604,6 +1605,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } @@ -28,7 +28,7 @@ index 7c2a8c5c8..cc6ae6634 100644 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1747,6 +1753,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1745,6 +1751,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end @@ -42,7 +42,7 @@ index 7c2a8c5c8..cc6ae6634 100644 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1822,6 +1835,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1820,6 +1833,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected abstract void b(NBTTagCompound nbttagcompound); @@ -51,7 +51,7 @@ index 7c2a8c5c8..cc6ae6634 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 dc173e14f..596ac18a7 100644 +index a6eae266d..489dd861d 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 { @@ -89,22 +89,22 @@ index 5dc52b6b8..2c28633c4 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 1b72df8cd..ae8be435c 100644 +index 27debcfca..22027321b 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java -@@ -174,6 +174,7 @@ public class NBTTagList extends NBTList { +@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList { return new int[0]; } + public final double getDoubleAt(int i) { return this.k(i); } // Paper - OBFHELPER public double k(int i) { if (i >= 0 && i < this.list.size()) { - NBTBase nbtbase = (NBTBase)this.list.get(i); + 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 73c47c517..ab74b1add 100644 +index dab1be9b6..59b1f9043 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -918,6 +918,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -913,6 +913,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc int j = MathHelper.floor(entity.locZ / 16.0D); boolean flag = entity.attachedToPlayer; @@ -135,5 +135,5 @@ index 153efb9b9..df7c77e9a 100644 + // Paper end } -- -2.20.0 +2.20.1 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 0f046614e..fa510cc01 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,4 +1,4 @@ -From 207ee34b2e3af0d3f6ac16d639cccc9857bc16cf Mon Sep 17 00:00:00 2001 +From ef71a8a38a32ae6a68b253e74b46badf1cf175a0 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 @@ -23,10 +23,10 @@ index 68ac014aa..c5212417c 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ab74b1add..5d5a9f0bb 100644 +index 59b1f9043..086d64628 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1147,10 +1147,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1142,10 +1142,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc entity.tickTimer.stopTiming(); // Paper } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); @@ -43,7 +43,7 @@ index ab74b1add..5d5a9f0bb 100644 } } -@@ -1213,10 +1215,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1208,10 +1210,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc ((ITickable) tileentity).tick(); this.methodProfiler.exit(); } catch (Throwable throwable2) { @@ -62,5 +62,5 @@ index ab74b1add..5d5a9f0bb 100644 // Spigot start finally { -- -2.20.0 +2.20.1 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 11d2436cb..12a193243 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,4 +1,4 @@ -From 65611361ad1379efabc6de8576ae3282f808ff3b Mon Sep 17 00:00:00 2001 +From 35478e5d1a29397305e7c48247c5fe853074d2a2 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 @@ -20,10 +20,10 @@ index 1ed58f4bb..39d565db1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cc6ae6634..99716419e 100644 +index ca5212f20..f57c5b6a4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -463,9 +463,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -461,9 +461,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance *= 0.5F; } @@ -39,7 +39,7 @@ index cc6ae6634..99716419e 100644 if (!this.world.isClientSide) { this.setFlag(0, this.fireTicks > 0); -@@ -475,6 +481,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -473,6 +479,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.methodProfiler.exit(); } @@ -54,7 +54,7 @@ index cc6ae6634..99716419e 100644 protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -526,6 +540,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -524,6 +538,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fireTicks = 0; } @@ -63,10 +63,10 @@ index cc6ae6634..99716419e 100644 this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index a2f334968..e741c7f83 100644 +index 9000d2d7b..a8a64d054 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -195,9 +195,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT +@@ -193,9 +193,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT this.setDamage(this.getDamage() - 1.0F); } @@ -83,5 +83,5 @@ index a2f334968..e741c7f83 100644 int i; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0028-Lighting-Queue.patch b/Spigot-Server-Patches/0028-Lighting-Queue.patch index f63983b17..3d505acd0 100644 --- a/Spigot-Server-Patches/0028-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0028-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From 3e0df901f487044ce2782c682f66e627e9411eb3 Mon Sep 17 00:00:00 2001 +From 55ff099f0d6ecf7d813d7951a9f590020b97d147 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -63,10 +63,10 @@ index 39d565db1..8f6f0288b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index da2548603..87ec4d1a2 100644 +index 0a436133a..2afd6befa 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -95,6 +95,7 @@ public class Chunk implements IChunkAccess { +@@ -94,6 +94,7 @@ public class Chunk implements IChunkAccess { return removed; } } @@ -74,7 +74,7 @@ index da2548603..87ec4d1a2 100644 // Paper end public boolean areNeighborsLoaded(final int radius) { switch (radius) { -@@ -285,7 +286,7 @@ public class Chunk implements IChunkAccess { +@@ -284,7 +285,7 @@ public class Chunk implements IChunkAccess { private void g(boolean flag) { this.world.methodProfiler.enter("recheckGaps"); @@ -83,7 +83,7 @@ index da2548603..87ec4d1a2 100644 for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) { if (this.g[i + j * 16]) { -@@ -336,7 +337,7 @@ public class Chunk implements IChunkAccess { +@@ -335,7 +336,7 @@ public class Chunk implements IChunkAccess { } private void a(int i, int j, int k, int l) { @@ -92,7 +92,7 @@ index da2548603..87ec4d1a2 100644 for (int i1 = k; i1 < l; ++i1) { this.world.c(EnumSkyBlock.SKY, new BlockPosition(i, i1, j)); } -@@ -536,6 +537,7 @@ public class Chunk implements IChunkAccess { +@@ -535,6 +536,7 @@ public class Chunk implements IChunkAccess { if (flag1) { this.initLighting(); } else { @@ -100,7 +100,7 @@ index da2548603..87ec4d1a2 100644 int i1 = iblockdata.b(this.world, blockposition); int j1 = iblockdata1.b(this.world, blockposition); -@@ -543,6 +545,7 @@ public class Chunk implements IChunkAccess { +@@ -542,6 +544,7 @@ public class Chunk implements IChunkAccess { if (i1 != j1 && (i1 < j1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) { this.c(i, k); } @@ -108,7 +108,7 @@ index da2548603..87ec4d1a2 100644 } TileEntity tileentity; -@@ -1361,6 +1364,16 @@ public class Chunk implements IChunkAccess { +@@ -1360,6 +1363,16 @@ public class Chunk implements IChunkAccess { return this.D == 8; } @@ -126,10 +126,10 @@ index da2548603..87ec4d1a2 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 60abc5f28..6a9b9fa2a 100644 +index 44c1dfe92..fe189a841 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -314,6 +314,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -310,6 +310,7 @@ public class ChunkProviderServer implements IChunkProvider { return false; } save = event.isSaveChunk(); @@ -138,10 +138,10 @@ index 60abc5f28..6a9b9fa2a 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 4acb908ec..194f8441e 100644 +index b12d9fbe8..f547a6ad7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -894,7 +894,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -889,7 +889,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati protected void a(BooleanSupplier booleansupplier) { co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper this.slackActivityAccountant.tickStarted(); // Spigot @@ -150,7 +150,7 @@ index 4acb908ec..194f8441e 100644 ++this.ticks; if (this.S) { -@@ -952,6 +952,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -947,6 +947,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.exit(); this.methodProfiler.exit(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -263,10 +263,10 @@ index 000000000..9783f3a0d + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5d5a9f0bb..69f55d0dd 100644 +index 086d64628..bf05c47a1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -335,7 +335,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -330,7 +330,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (iblockdata2.b(this, blockposition) != iblockdata1.b(this, blockposition) || iblockdata2.e() != iblockdata1.e()) { this.methodProfiler.enter("checkLight"); @@ -276,5 +276,5 @@ index 5d5a9f0bb..69f55d0dd 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0029-Configurable-end-credits.patch b/Spigot-Server-Patches/0029-Configurable-end-credits.patch index 23e798511..233a125e7 100644 --- a/Spigot-Server-Patches/0029-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0029-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From 218a1980882ca92ea3578f3ad4d3a34804dbda7e Mon Sep 17 00:00:00 2001 +From 8389f574485f07e27a681ea473b5028947250219 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -20,10 +20,10 @@ index 8f6f0288b..5aee23dce 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d0d93b1eb..2804bfc0a 100644 +index 5e60bdb40..301119d3e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -58,7 +58,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private long cu = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; @@ -32,7 +32,7 @@ index d0d93b1eb..2804bfc0a 100644 private final RecipeBookServer recipeBook; private Vec3D cz; private int cA; -@@ -649,6 +649,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -651,6 +651,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.world.kill(this); if (!this.viewingCredits) { this.viewingCredits = true; @@ -41,5 +41,5 @@ index d0d93b1eb..2804bfc0a 100644 this.cx = true; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0030-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0030-Fix-lag-from-explosions-processing-dead-entities.patch index 3797fdf6c..ddf7c8ce2 100644 --- a/Spigot-Server-Patches/0030-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/Spigot-Server-Patches/0030-Fix-lag-from-explosions-processing-dead-entities.patch @@ -1,20 +1,20 @@ -From b45b30d876512ac7815531b094830438c30de107 Mon Sep 17 00:00:00 2001 +From c32e5c2cb240c0c70aad5d9c62b49b28a265ffa1 Mon Sep 17 00:00:00 2001 From: Iceee Date: Wed, 2 Mar 2016 01:39:52 -0600 Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index d564aaf60..92e3a49e2 100644 +index 33809baf2..c4db6367e 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -111,7 +111,14 @@ public class Explosion { int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D); int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D); int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); -- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); +- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); + // Paper start - Fix lag from explosions processing dead entities -+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { ++ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { + @Override + public boolean apply(Entity entity) { + return IEntitySelector.canAITarget().test(entity) && !entity.dead; @@ -25,27 +25,17 @@ index d564aaf60..92e3a49e2 100644 for (int l1 = 0; l1 < list.size(); ++l1) { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 2e2fb85cf..7b7fd6b9b 100644 +index 8225a8258..bbcbb6232 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java -@@ -13,6 +13,7 @@ public final class IEntitySelector { +@@ -14,6 +14,7 @@ public final class IEntitySelector { public static final Predicate d = (entity) -> { return entity instanceof IInventory && entity.isAlive(); }; + public static Predicate canAITarget() { return e; } // Paper - OBFHELPER public static final Predicate e = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator() && !((EntityHuman)entity).u(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator() && !((EntityHuman) entity).u(); }; -@@ -96,9 +97,5 @@ public final class IEntitySelector { - } - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((Entity)object); -- } - } - } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0031-Optimize-explosions.patch b/Spigot-Server-Patches/0031-Optimize-explosions.patch index 979f90f26..d99e137a1 100644 --- a/Spigot-Server-Patches/0031-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0031-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From bbbcb6b95ae225470a3f41c3cd0e6fe294587320 Mon Sep 17 00:00:00 2001 +From 6ae47c32adde3d935976cbc9b200e1e068c6ea0a Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -25,7 +25,7 @@ index 5aee23dce..2ec3d9355 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 92e3a49e2..10c415b37 100644 +index c4db6367e..3e44b2d54 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -137,7 +137,7 @@ public class Explosion { @@ -124,10 +124,10 @@ index 92e3a49e2..10c415b37 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 194f8441e..eef8d2b5a 100644 +index f547a6ad7..7a2f128d3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1059,6 +1059,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1054,6 +1054,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati worldserver.getTracker().updatePlayers(); this.methodProfiler.exit(); this.methodProfiler.exit(); @@ -136,18 +136,18 @@ index 194f8441e..eef8d2b5a 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 69f55d0dd..00880d54f 100644 +index bf05c47a1..ac602abc0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -24,6 +24,7 @@ import org.apache.logging.log4j.Logger; - +@@ -22,6 +22,7 @@ import org.apache.logging.log4j.Logger; // CraftBukkit start import com.google.common.collect.Maps; + import java.util.ArrayList; +import java.util.HashMap; // Paper import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.block.BlockState; -@@ -145,6 +146,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -140,6 +141,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter tileLimiter; private int tileTickPosition; @@ -156,5 +156,5 @@ index 69f55d0dd..00880d54f 100644 public CraftWorld getWorld() { return this.world; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0032-Add-player-view-distance-API.patch b/Spigot-Server-Patches/0032-Add-player-view-distance-API.patch index b9fb19b26..7de1d17fa 100644 --- a/Spigot-Server-Patches/0032-Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/0032-Add-player-view-distance-API.patch @@ -1,14 +1,14 @@ -From 0fc496b449eaf0a6b9cb98c8ab8d345e297a35a6 Mon Sep 17 00:00:00 2001 +From 34ef67b5834b8d47cc7f8947ff4148c6f679fa9b Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 14:35:27 -0600 Subject: [PATCH] Add player view distance API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1aec6d7c3..1185769ca 100644 +index 70d5a69f8..f28ca6bb4 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -74,6 +74,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -71,6 +71,15 @@ public abstract class EntityHuman extends EntityLiving { // Paper start public boolean affectsSpawning = true; // Paper end @@ -25,7 +25,7 @@ index 1aec6d7c3..1185769ca 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index d7f33bd53..63e22bd9a 100644 +index 45ab33d1a..3854ae976 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -200,6 +200,7 @@ public class EntityTracker { @@ -37,7 +37,7 @@ index d7f33bd53..63e22bd9a 100644 Iterator iterator = this.c.iterator(); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 6a622f72e..4272d2036 100644 +index d00401ce1..dd6c84b4a 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -435,7 +435,7 @@ public class EntityTrackerEntry { @@ -50,10 +50,10 @@ index 6a622f72e..4272d2036 100644 return d0 >= (double) (-i) && d0 <= (double) i && d1 >= (double) (-i) && d1 <= (double) i && this.tracker.a(entityplayer); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 29e24940f..653031af4 100644 +index e01222ad2..55161af9c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -35,7 +35,7 @@ public class PlayerChunkMap { +@@ -33,7 +33,7 @@ public class PlayerChunkMap { private final List g = Lists.newLinkedList(); private final List h = Lists.newLinkedList(); private final List i = Lists.newArrayList(); @@ -62,7 +62,7 @@ index 29e24940f..653031af4 100644 private long k; private boolean l = true; private boolean m = true; -@@ -261,8 +261,11 @@ public class PlayerChunkMap { +@@ -257,8 +257,11 @@ public class PlayerChunkMap { // CraftBukkit start - Load nearby chunks first List chunkList = new LinkedList(); @@ -76,7 +76,7 @@ index 29e24940f..653031af4 100644 chunkList.add(new ChunkCoordIntPair(k, l)); } } -@@ -281,8 +284,11 @@ public class PlayerChunkMap { +@@ -277,8 +280,11 @@ public class PlayerChunkMap { int i = (int) entityplayer.d >> 4; int j = (int) entityplayer.e >> 4; @@ -90,7 +90,7 @@ index 29e24940f..653031af4 100644 PlayerChunk playerchunk = this.getChunk(k, l); if (playerchunk != null) { -@@ -312,7 +318,8 @@ public class PlayerChunkMap { +@@ -308,7 +314,8 @@ public class PlayerChunkMap { if (d2 >= 64.0D) { int k = (int) entityplayer.d >> 4; int l = (int) entityplayer.e >> 4; @@ -100,7 +100,7 @@ index 29e24940f..653031af4 100644 int j1 = i - k; int k1 = j - l; -@@ -356,6 +363,8 @@ public class PlayerChunkMap { +@@ -352,6 +359,8 @@ public class PlayerChunkMap { return playerchunk != null && playerchunk.d(entityplayer) && playerchunk.e(); } @@ -109,7 +109,7 @@ index 29e24940f..653031af4 100644 public void a(int i) { i = MathHelper.clamp(i, 3, 32); if (i != this.j) { -@@ -365,36 +374,55 @@ public class PlayerChunkMap { +@@ -361,36 +370,55 @@ public class PlayerChunkMap { while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -187,7 +187,7 @@ index 29e24940f..653031af4 100644 private void e() { this.l = true; -@@ -473,4 +501,32 @@ public class PlayerChunkMap { +@@ -469,4 +497,32 @@ public class PlayerChunkMap { } } // CraftBukkit end @@ -221,7 +221,7 @@ index 29e24940f..653031af4 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index ff564508f..4233b94a1 100644 +index 4eaa5d93b..6720a9648 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -44,7 +44,7 @@ public final class SpawnerCreature { @@ -234,10 +234,10 @@ index ff564508f..4233b94a1 100644 for (int i1 = -b0; i1 <= b0; ++i1) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6635f1a4a..d2ff18cf7 100644 +index 31140ed18..1a4527f30 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1646,6 +1646,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1652,6 +1652,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } @@ -276,5 +276,5 @@ index a95f93eb7..09df00e94 100644 animalBB = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange ); monsterBB = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange ); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0034-Disable-thunder.patch index ea6e13287..393aa6663 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0034-Disable-thunder.patch @@ -1,11 +1,11 @@ -From 3de68b79f98b2fc517ad7300d8c1e0d8b9940bc7 Mon Sep 17 00:00:00 2001 +From 252e5a6798a4f1635081f343bb1d95bf4fb4d2fb 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 4679246662..13253f6e9c 100644 +index 467924666..13253f6e9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -155,4 +155,9 @@ public class PaperWorldConfig { @@ -19,10 +19,10 @@ index 4679246662..13253f6e9c 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e4d03b6779..f39ce330f6 100644 +index 60939cc33..54c1b484a 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 { +@@ -474,7 +474,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { int l; BlockPosition blockposition; @@ -32,5 +32,5 @@ index e4d03b6779..f39ce330f6 100644 l = this.m >> 2; blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch index c9b0495e6..0a448caa5 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch @@ -1,4 +1,4 @@ -From 728e0827b06ae5a4180b22c7e2163d580c1632a6 Mon Sep 17 00:00:00 2001 +From 3e950e16bbbff96b09fb37f9fbffbed216f61a68 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow @@ -19,10 +19,10 @@ index 13253f6e9..cde9c11f4 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 73e9ff1b3..2558a20f6 100644 +index 54c1b484a..7bece8558 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 { +@@ -496,7 +496,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } this.methodProfiler.exitEnter("iceandsnow"); @@ -32,5 +32,5 @@ index 73e9ff1b3..2558a20f6 100644 l = this.m >> 2; blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch index 6d92c410b..002ceef07 100644 --- a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -1,11 +1,11 @@ -From bb502b2f16c52b6ef4fe6ac457c423bf940618e3 Mon Sep 17 00:00:00 2001 +From 99e8159915dbca4b04eac59a3ebe3cb845b70f15 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Wed, 2 Mar 2016 23:13:07 -0600 Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 5dbd493f41..a049b8d68e 100644 +index dd6c84b4a..a12a42c32 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -41,7 +41,19 @@ public class EntityTrackerEntry { @@ -45,15 +45,14 @@ index 5dbd493f41..a049b8d68e 100644 if (l1 >= -32768L && l1 < 32768L && i2 >= -32768L && i2 < 32768L && j2 >= -32768L && j2 < 32768L && this.v <= 400 && !this.x && this.y == this.tracker.onGround) { if ((!flag1 || !flag2) && !(this.tracker instanceof EntityArrow)) { if (flag1) { -@@ -201,7 +213,26 @@ public class EntityTrackerEntry { - } +@@ -202,6 +214,26 @@ public class EntityTrackerEntry { - if (object != null) { -- this.broadcast((Packet) object); + if (packet1 != null) { + this.broadcast((Packet) packet1); + // Paper start - ensure fresh viewers get an absolute position on their first update, + // since we can't be certain what position they received in the spawn packet. -+ if (object instanceof PacketPlayOutEntityTeleport) { -+ this.broadcast((Packet) object); ++ if (packet1 instanceof PacketPlayOutEntityTeleport) { ++ this.broadcast((Packet) packet1); + } else { + PacketPlayOutEntityTeleport teleportPacket = null; + @@ -65,7 +64,7 @@ index 5dbd493f41..a049b8d68e 100644 + } + sendPlayerPacket(viewer.getKey(), teleportPacket); + } else { -+ sendPlayerPacket(viewer.getKey(), (Packet) object); ++ sendPlayerPacket(viewer.getKey(), (Packet) packet1); + } + } + } @@ -73,15 +72,15 @@ index 5dbd493f41..a049b8d68e 100644 } this.d(); -@@ -338,7 +369,7 @@ public class EntityTrackerEntry { +@@ -338,7 +370,7 @@ public class EntityTrackerEntry { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end - this.trackedPlayers.add(entityplayer); + this.trackedPlayerMap.put(entityplayer, true); // Paper - Packet packet = this.e(); + Packet packet = this.e(); entityplayer.playerConnection.sendPacket(packet); -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch index 48190a215..dc3c41d96 100644 --- a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch @@ -1,14 +1,14 @@ -From 7cc085846480e5bd02fa7d296150dd91ff2bcaf1 Mon Sep 17 00:00:00 2001 +From 871f28247f535e856bec4dc25075e67463e5391f Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 23:30:53 -0600 Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index 7bd27ad7f9..eafd207467 100644 +index fecd65ddb..c6bd54a2c 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java -@@ -16,6 +16,12 @@ import org.bukkit.entity.HumanEntity; +@@ -15,6 +15,12 @@ import org.bukkit.entity.HumanEntity; import org.bukkit.potion.PotionEffect; // CraftBukkit end @@ -21,7 +21,7 @@ index 7bd27ad7f9..eafd207467 100644 public class TileEntityBeacon extends TileEntityContainer implements IWorldInventory, ITickable { public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; -@@ -130,14 +136,31 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven +@@ -129,14 +135,31 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven } private void applyEffect(List list, MobEffectList effects, int i, int b0) { @@ -54,7 +54,7 @@ index 7bd27ad7f9..eafd207467 100644 } } } -@@ -159,10 +182,10 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven +@@ -158,10 +181,10 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven int i = getLevel(); List list = getHumansInRange(); @@ -68,5 +68,5 @@ index 7bd27ad7f9..eafd207467 100644 } -- -2.18.0 +2.20.1 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 6cd24fd72..35b08bcc9 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch @@ -1,11 +1,11 @@ -From 63f74cee412e46e59e862a07cffb35317117d9a2 Mon Sep 17 00:00:00 2001 +From 2a9f268a740cdb30e6fd16398f90305080411e21 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 40766d81c7..71af3fcfed 100644 +index 40766d81c..71af3fcfe 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -170,4 +170,9 @@ public class PaperWorldConfig { @@ -19,10 +19,10 @@ index 40766d81c7..71af3fcfed 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cdf89cfed3..1f98be261a 100644 +index 301119d3e..98a8ce962 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -71,6 +71,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean f; public int ping; public boolean viewingCredits; @@ -30,7 +30,7 @@ index cdf89cfed3..1f98be261a 100644 // CraftBukkit start public String displayName; -@@ -335,7 +336,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -332,7 +333,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } @@ -45,5 +45,5 @@ index cdf89cfed3..1f98be261a 100644 this.closeInventory(); this.activeContainer = this.defaultContainer; -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch index 97f61ce09..ecbf8cba6 100644 --- a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch @@ -1,14 +1,14 @@ -From 792f2e79ad0dd0e0c558ef3924a1dd34120a2901 Mon Sep 17 00:00:00 2001 +From 516693b2cf7b54953f8ea3dfd1ffc41fb2d61314 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 23:45:17 -0600 Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 00880d54f..214adec9b 100644 +index ac602abc0..ac23ae323 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1124,10 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1119,10 +1119,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit start - Use field for loop variable co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper int entitiesThisCycle = 0; @@ -23,7 +23,7 @@ index 00880d54f..214adec9b 100644 tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; entity = (Entity) this.entityList.get(this.tickPosition); // CraftBukkit end -@@ -1191,9 +1191,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1186,9 +1186,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // Spigot start // Iterator iterator = this.tileEntityListTick.iterator(); int tilesThisCycle = 0; @@ -35,5 +35,5 @@ index 00880d54f..214adec9b 100644 TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); // Spigot start -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index a03c393ce..106fa7074 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From ccaf2d344c00e98b07e41c0e718e31193379fc11 Mon Sep 17 00:00:00 2001 +From 22047d54062fe5f973526c035e3a8ed652aba5e8 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 26df2ff32f..4320efaef5 100644 +index c2bb79fe8..4f9c97a08 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -110,6 +110,21 @@ public abstract class PlayerList { +@@ -109,6 +109,21 @@ public abstract class PlayerList { } // CraftBukkit end @@ -32,5 +32,5 @@ index 26df2ff32f..4320efaef5 100644 entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch index 1627b2286..311eac63f 100644 --- a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch @@ -1,4 +1,4 @@ -From 8405fca5dd7106f16174a4f33ebc7d50a4ec3a96 Mon Sep 17 00:00:00 2001 +From 6397a37ddacf30f6245a460f231d38e336d8773d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 Subject: [PATCH] Configurable Disabling Cat Chest Detection @@ -6,7 +6,7 @@ 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 71af3fcfed..e28d5b19a3 100644 +index 71af3fcfe..e28d5b19a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -175,4 +175,9 @@ public class PaperWorldConfig { @@ -20,10 +20,10 @@ index 71af3fcfed..e28d5b19a3 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 5401f7d754..27e6d2b5f2 100644 +index 5e1a3df2b..e94786138 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -216,6 +216,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC +@@ -232,6 +232,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC } private boolean b(World world, BlockPosition blockposition) { @@ -32,9 +32,9 @@ index 5401f7d754..27e6d2b5f2 100644 + return false; + } + // Paper end - List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix + List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); + if (!list.isEmpty()) { - for(EntityOcelot entityocelot : list) { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch index 34d8a4889..44edddb28 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From ab619f67d419bb011f610c5097fc77c654032378 Mon Sep 17 00:00:00 2001 +From 6fbda7d7dcd7dfc3d3bcc02e918bbe9bfdc277d3 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 67c993795..a5bd908fd 100644 +index 723fce204..f543532f8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1553,6 +1553,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -48,7 +48,7 @@ index 67c993795..a5bd908fd 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 4858265a8..4c177a674 100644 +index 212e3cd4a..6700ce84c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -699,6 +699,29 @@ public final class CraftServer implements Server { @@ -106,17 +106,17 @@ 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 f4e088c13..944151d14 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 - public static void restart(final File script) + private static void restart(final String restartScript) { AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us + org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper try { - if ( script.isFile() ) + String[] split = restartScript.split( " " ); -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch index d241ce0e8..f105ec2ca 100644 --- a/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 4eb56052b0b279c261b87dc066fc9840888f694c Mon Sep 17 00:00:00 2001 +From fa93c46b38c46ec16ff9bcf510e7f1dc6b56ef68 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -7,10 +7,10 @@ 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 d1d16b25d0..5d6f726d05 100644 +index 2d788ef66..60b5068e3 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -113,9 +113,26 @@ public abstract class NavigationAbstract { +@@ -122,10 +122,26 @@ public abstract class NavigationAbstract { } public boolean a(Entity entity, double d0) { @@ -20,8 +20,8 @@ index d1d16b25d0..5d6f726d05 100644 + } + PathEntity pathentity = this.a(entity); + - return pathentity != null && this.a(pathentity, d0); -+ + if (pathentity != null && this.a(pathentity, d0)) { + this.lastFailure = 0; + this.pathfindFailures = 0; @@ -38,7 +38,7 @@ index d1d16b25d0..5d6f726d05 100644 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { -@@ -241,6 +258,7 @@ public abstract class NavigationAbstract { +@@ -258,6 +274,7 @@ public abstract class NavigationAbstract { } public void q() { @@ -47,5 +47,5 @@ index d1d16b25d0..5d6f726d05 100644 } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0047-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0047-Avoid-hopper-searches-if-there-are-no-items.patch index cbfcb4a66..d970f58cb 100644 --- a/Spigot-Server-Patches/0047-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0047-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From 5abf081ee514bf133173e6b77aede9134606ec6f Mon Sep 17 00:00:00 2001 +From 68d160bf273d31d81e6687a9f64783f89adcd41e 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,10 +14,10 @@ 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 87ec4d1a2..c5d562dca 100644 +index 2afd6befa..d1b6344ce 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -96,6 +96,10 @@ public class Chunk implements IChunkAccess { +@@ -95,6 +95,10 @@ public class Chunk implements IChunkAccess { } } final PaperLightingQueue.LightingQueue lightingQueue = new PaperLightingQueue.LightingQueue(this); @@ -28,7 +28,7 @@ index 87ec4d1a2..c5d562dca 100644 // Paper end public boolean areNeighborsLoaded(final int radius) { switch (radius) { -@@ -690,6 +694,11 @@ public class Chunk implements IChunkAccess { +@@ -689,6 +693,11 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.locZ; this.entitySlices[k].add(entity); // Paper start @@ -40,7 +40,7 @@ index 87ec4d1a2..c5d562dca 100644 entity.setCurrentChunk(this); entityCounts.increment(entity.getMinecraftKeyString()); // Paper end -@@ -715,6 +724,11 @@ public class Chunk implements IChunkAccess { +@@ -714,6 +723,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -52,7 +52,7 @@ index 87ec4d1a2..c5d562dca 100644 entity.setCurrentChunk(null); entityCounts.decrement(entity.getMinecraftKeyString()); // Paper end -@@ -962,6 +976,15 @@ public class Chunk implements IChunkAccess { +@@ -961,6 +975,15 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[k].isEmpty()) { Iterator iterator = this.entitySlices[k].iterator(); @@ -68,7 +68,7 @@ index 87ec4d1a2..c5d562dca 100644 while (iterator.hasNext()) { Entity entity1 = (Entity) iterator.next(); -@@ -998,7 +1021,18 @@ public class Chunk implements IChunkAccess { +@@ -997,7 +1020,18 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); @@ -88,10 +88,10 @@ index 87ec4d1a2..c5d562dca 100644 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 7b7fd6b9b..eb08a1caa 100644 +index bbcbb6232..f6916fd45 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java -@@ -10,6 +10,7 @@ public final class IEntitySelector { +@@ -11,6 +11,7 @@ public final class IEntitySelector { public static final Predicate c = (entity) -> { return entity.isAlive() && !entity.isVehicle() && !entity.isPassenger(); }; @@ -100,5 +100,5 @@ index 7b7fd6b9b..eb08a1caa 100644 return entity instanceof IInventory && entity.isAlive(); }; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0050-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0050-Player-Tab-List-and-Title-APIs.patch index 3efa4c8ea..f73748051 100644 --- a/Spigot-Server-Patches/0050-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0050-Player-Tab-List-and-Title-APIs.patch @@ -1,28 +1,28 @@ -From 25b13058491216858b504fb43d55fcd62df61a84 Mon Sep 17 00:00:00 2001 +From a2acd0e3e5d9721b99457509426f39da2ea7c469 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 02:32:10 -0600 Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index 286c1b14..ff14b3e0 100644 +index 62fba42c3..48fecffdf 100644 --- a/src/main/java/net/minecraft/server/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -354,6 +354,7 @@ public interface IChatBaseComponent extends Message, Iterable { +@@ -42,11 +42,28 @@ public class PacketPlayOutTitle implements Packet { + } - public PacketPlayOutTitle() { } + // Paper start + public net.md_5.bungee.api.chat.BaseComponent[] components; @@ -36,11 +36,8 @@ index 267b69de..29cbe15a 100644 + } + // Paper end - public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle$enumtitleaction, IChatBaseComponent ichatbasecomponent) { - this(packetplayouttitle$enumtitleaction, ichatbasecomponent, -1, -1, -1); -@@ -46,7 +57,13 @@ public class PacketPlayOutTitle implements Packet { public void b(PacketDataSerializer packetdataserializer) throws IOException { - packetdataserializer.a((Enum)this.a); + packetdataserializer.a((Enum) this.a); if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) { - packetdataserializer.a(this.b); + // Paper start @@ -54,7 +51,7 @@ index 267b69de..29cbe15a 100644 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2ab720d7..9e51bac8 100644 +index 1a4527f30..512019db4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -162,5 +159,5 @@ index 2ab720d7..9e51bac8 100644 public String getDisplayName() { return getHandle().displayName; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0052-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0052-Change-implementation-of-tile-entity-removal-list.patch index 2ba364fae..8d78caa34 100644 --- a/Spigot-Server-Patches/0052-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0052-Change-implementation-of-tile-entity-removal-list.patch @@ -1,14 +1,14 @@ -From 1739a3d8040f80e9389d2113e3e83337d8e52e90 Mon Sep 17 00:00:00 2001 +From ac1d51e728daaf8341cbbef9958466de73a3c927 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:39:54 -0600 Subject: [PATCH] Change implementation of (tile)entity removal list diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 214adec9b..a9239ee7b 100644 +index ac23ae323..ae14fb182 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -73,11 +73,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -68,11 +68,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } }; // Spigot end @@ -21,8 +21,8 @@ index 214adec9b..a9239ee7b 100644 + private final Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper public final List players = Lists.newArrayList(); public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); -@@ -1095,20 +1095,20 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc + protected final IntHashMap entitiesById = new IntHashMap<>(); +@@ -1090,20 +1090,20 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.entityList.removeAll(this.g); int j; @@ -53,5 +53,5 @@ index 214adec9b..a9239ee7b 100644 this.g.clear(); this.p_(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0056-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0056-Add-exception-reporting-event.patch index 6a3b9e37f..e3110c39d 100644 --- a/Spigot-Server-Patches/0056-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0056-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From d59504f70dfb71a27f3bee67630007337fc29f74 Mon Sep 17 00:00:00 2001 +From b9f5bd730d327e08bd8a8100c7e939f7e8d03714 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 @@ -49,7 +49,7 @@ index 000000000..f699ce18c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c5d562dca..37bea8dbe 100644 +index d1b6344ce..446e464b7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -59,7 +59,7 @@ index c5d562dca..37bea8dbe 100644 import com.google.common.collect.Maps; import com.google.common.collect.Queues; import com.google.common.collect.Sets; -@@ -425,6 +426,7 @@ public class Chunk implements IChunkAccess { +@@ -424,6 +425,7 @@ public class Chunk implements IChunkAccess { return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k)); } @@ -67,7 +67,7 @@ index c5d562dca..37bea8dbe 100644 public IBlockData getType(BlockPosition blockposition) { return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()); } -@@ -820,10 +822,15 @@ public class Chunk implements IChunkAccess { +@@ -819,10 +821,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -88,18 +88,18 @@ index c5d562dca..37bea8dbe 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 6a9b9fa2a..557aa5180 100644 +index fe189a841..9a8894238 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier; +@@ -13,6 +13,7 @@ import java.util.concurrent.CompletableFuture; + import java.util.function.BooleanSupplier; import java.util.function.Consumer; - import java.util.function.Function; import javax.annotation.Nullable; +import com.destroystokyo.paper.exception.ServerInternalException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -209,9 +210,16 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -206,9 +207,16 @@ public class ChunkProviderServer implements IChunkProvider { ichunkaccess.setLastSaved(this.world.getTime()); this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { @@ -119,7 +119,7 @@ index 6a9b9fa2a..557aa5180 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 95120be5d..5977d3b48 100644 +index 09ef8729d..bf67dbf54 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -129,15 +129,15 @@ index 95120be5d..5977d3b48 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.io.Files; -@@ -356,6 +357,7 @@ public class NameReferencingFileConverter { - root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1)); +@@ -354,6 +355,7 @@ public class NameReferencingFileConverter { + root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file5)); } catch (Exception exception) { exception.printStackTrace(); + ServerInternalException.reportInternalException(exception); // Paper } if (root != null) { -@@ -369,6 +371,7 @@ public class NameReferencingFileConverter { +@@ -367,6 +369,7 @@ public class NameReferencingFileConverter { NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { exception.printStackTrace(); @@ -146,7 +146,7 @@ index 95120be5d..5977d3b48 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 66fe6ff86..06417b9ec 100644 +index e8d9f33c8..5b48bb0b7 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -156,7 +156,7 @@ index 66fe6ff86..06417b9ec 100644 import com.google.common.collect.Lists; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; -@@ -75,6 +76,7 @@ public class RegionFile { +@@ -82,6 +83,7 @@ public class RegionFile { } } catch (IOException ioexception) { ioexception.printStackTrace(); @@ -164,8 +164,8 @@ index 66fe6ff86..06417b9ec 100644 } } -@@ -221,6 +223,7 @@ public class RegionFile { - this.b(i, j, (int)(SystemUtils.getTimeMillis() / 1000L)); +@@ -237,6 +239,7 @@ public class RegionFile { + this.b(i, j, (int) (SystemUtils.getTimeMillis() / 1000L)); } catch (IOException ioexception) { ioexception.printStackTrace(); + ServerInternalException.reportInternalException(ioexception); // Paper @@ -192,7 +192,7 @@ index c5ca89691..e507a996f 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 4233b94a1..1ff5dcd85 100644 +index 6720a9648..2aa0db5c2 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; @@ -220,7 +220,7 @@ index 4233b94a1..1ff5dcd85 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index e649d662a..560edb523 100644 +index 58122b18e..0ac1fb53a 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -240,7 +240,7 @@ index e649d662a..560edb523 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a9239ee7b..0e70a3d68 100644 +index ae14fb182..ae7e4a7fa 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,6 +1,8 @@ @@ -252,7 +252,7 @@ index a9239ee7b..0e70a3d68 100644 import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.longs.LongSet; -@@ -1150,8 +1152,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1145,8 +1147,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); // Paper start - Prevent tile entity and entity crashes @@ -264,7 +264,7 @@ index a9239ee7b..0e70a3d68 100644 entity.dead = true; continue; // Paper end -@@ -1216,8 +1220,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1211,8 +1215,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.methodProfiler.exit(); } catch (Throwable throwable2) { // Paper start - Prevent tile entity and entity crashes @@ -277,16 +277,16 @@ index a9239ee7b..0e70a3d68 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index f0a826cd1..2dee02669 100644 +index 478bf4997..8d51af286 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java -@@ -121,6 +121,7 @@ public class WorldPersistentData { - int j = nbttagcompound.hasKeyOfType("DataVersion", 99) ? nbttagcompound.getInt("DataVersion") : 1343; - nbttagcompound1 = GameProfileSerializer.a(idatamanager.i(), DataFixTypes.SAVED_DATA, nbttagcompound, j, i); - } catch (Throwable throwable2) { -+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(throwable2); // Paper - throwable = throwable2; - throw throwable2; +@@ -138,6 +138,7 @@ public class WorldPersistentData { + + nbttagcompound = GameProfileSerializer.a(idatamanager.i(), DataFixTypes.SAVED_DATA, nbttagcompound1, j, i); + } catch (Throwable throwable1) { ++ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(throwable1); // Paper + throwable = throwable1; + throw throwable1; } finally { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index 311c4f5ca..e76882b8e 100644 @@ -335,5 +335,5 @@ index 311c4f5ca..e76882b8e 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0058-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0058-Disable-Scoreboards-for-non-players-by-default.patch index 1f4fd36ef..3f1e88949 100644 --- a/Spigot-Server-Patches/0058-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0058-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From f2a8776578335496dd9595b3d6a735ca6a52d675 Mon Sep 17 00:00:00 2001 +From 634501d0bd202dd5df459b6f2e688c2c98c10bf3 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 @@ -25,10 +25,10 @@ index 50837d767..898068a81 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 99716419e..caeb5eae0 100644 +index f57c5b6a4..dfb7d544f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2247,6 +2247,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2245,6 +2245,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase getScoreboardTeam() { @@ -37,7 +37,7 @@ index 99716419e..caeb5eae0 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index da105b41c..6f8ac61d8 100644 +index 25982848a..8b8805017 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -538,6 +538,7 @@ public abstract class EntityLiving extends Entity { @@ -49,5 +49,5 @@ index da105b41c..6f8ac61d8 100644 if (!flag) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0060-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0060-Complete-resource-pack-API.patch index 4dc478521..a5bb5c402 100644 --- a/Spigot-Server-Patches/0060-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0060-Complete-resource-pack-API.patch @@ -1,11 +1,11 @@ -From 1f3a75ff9db681c7721175a51d7268682f5954fd Mon Sep 17 00:00:00 2001 +From 4d44bf0818687383719df45c13d77915bfa185b4 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 23:17:52 -0400 Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a5bd908fd..b67861519 100644 +index f543532f8..91eb73b73 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1317,7 +1317,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -22,7 +22,7 @@ index a5bd908fd..b67861519 100644 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0c35c94b3..73abc95e4 100644 +index 976760e54..991787392 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -128,6 +128,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -36,7 +36,7 @@ index 0c35c94b3..73abc95e4 100644 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1757,6 +1761,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1763,6 +1767,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().server.getCommandDispatcher().a(getHandle()); } @@ -70,5 +70,5 @@ index 0c35c94b3..73abc95e4 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0061-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0061-Chunk-save-queue-improvements.patch index 0523f3c52..2405e2054 100644 --- a/Spigot-Server-Patches/0061-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0061-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From 4b04c2b61a16280bc65656261c939ee5bb665606 Mon Sep 17 00:00:00 2001 +From 509516752bce9e1f9a8e0eb8f0d94d11b4ff841c 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,7 +26,7 @@ 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 aa920c469..4aad68a57 100644 +index cc69ff3a4..f80b385ff 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -217,4 +217,10 @@ public class PaperConfig { @@ -41,11 +41,11 @@ index aa920c469..4aad68a57 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index d9608121b..d7a670093 100644 +index b0c004b1f..d2cece265 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -@@ -19,6 +19,7 @@ public class ChunkCoordIntPair { - this.z = (int)(i >> 32); +@@ -20,6 +20,7 @@ public class ChunkCoordIntPair { + this.z = (int) (i >> 32); } + public long asLong() { return a(); } // Paper @@ -53,18 +53,18 @@ index d9608121b..d7a670093 100644 return a(this.x, this.z); } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 43f77a398..4a0f3989e 100644 +index 63533d237..c0785eea0 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -22,6 +22,7 @@ import java.util.function.Consumer; +@@ -20,6 +20,7 @@ import java.util.Map.Entry; + import java.util.function.Consumer; import java.util.function.Function; - import java.util.function.Predicate; import javax.annotation.Nullable; +import java.util.concurrent.ConcurrentLinkedQueue; // Paper import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // Spigot start -@@ -31,8 +32,28 @@ import org.spigotmc.SupplierUtils; +@@ -29,8 +30,28 @@ import org.spigotmc.SupplierUtils; public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -94,7 +94,7 @@ index 43f77a398..4a0f3989e 100644 private final File c; private final DataFixer d; private PersistentStructureLegacy e; -@@ -82,7 +103,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -80,7 +101,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @Nullable private NBTTagCompound a(DimensionManager dimensionmanager, @Nullable PersistentCollection persistentcollection, int i, int j, @Nullable GeneratorAccess generatoraccess) throws IOException { @@ -103,7 +103,7 @@ index 43f77a398..4a0f3989e 100644 if (nbttagcompound != null) { return nbttagcompound; -@@ -310,7 +331,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -308,7 +329,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { }; } @@ -112,7 +112,7 @@ index 43f77a398..4a0f3989e 100644 // Spigot end } catch (Exception exception) { ChunkRegionLoader.a.error("Failed to save chunk", exception); -@@ -319,7 +340,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -317,7 +338,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier nbttagcompound) { // Spigot @@ -122,11 +122,12 @@ index 43f77a398..4a0f3989e 100644 FileIOThread.a().a(this); } -@@ -329,19 +351,24 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -327,20 +349,24 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } private boolean processSaveQueueEntry(boolean logCompletion) { -- Iterator iterator = this.b.entrySet().iterator(); +- Iterator>> iterator = this.b.entrySet().iterator(); // Spigot +- - if (!iterator.hasNext()) { + // Paper start - Chunk queue improvements + QueuedChunk chunk = queue.poll(); @@ -138,7 +139,7 @@ index 43f77a398..4a0f3989e 100644 return false; } else { -- Entry entry = (Entry) iterator.next(); +- Entry entry = (Entry) iterator.next(); - - iterator.remove(); - ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) entry.getKey(); @@ -154,7 +155,7 @@ index 43f77a398..4a0f3989e 100644 if (nbttagcompound == null) { return true; -@@ -350,6 +377,15 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -349,6 +375,15 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { // CraftBukkit start RegionFileCache.write(this.c, chunkcoordintpair.x, chunkcoordintpair.z, SupplierUtils.getIfExists(nbttagcompound)); // Spigot @@ -171,15 +172,15 @@ index 43f77a398..4a0f3989e 100644 NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); dataoutputstream.close(); diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index a3aba244a..97917551a 100644 +index 8c3537ab8..3c688f546 100644 --- a/src/main/java/net/minecraft/server/FileIOThread.java +++ b/src/main/java/net/minecraft/server/FileIOThread.java -@@ -35,20 +35,21 @@ public class FileIOThread implements Runnable { - for(int i = 0; i < this.c.size(); ++i) { - IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver)this.c.get(i); +@@ -38,20 +38,21 @@ public class FileIOThread implements Runnable { + IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver) this.c.get(i); boolean flag; -- synchronized(iasyncchunksaver) { -+ //synchronized(iasyncchunksaver) { // Paper - remove synchronized + +- synchronized (iasyncchunksaver) { ++ //synchronized (iasyncchunksaver) { // Paper - remove synchronized flag = iasyncchunksaver.a(); - } + //} // Paper @@ -193,13 +194,13 @@ index a3aba244a..97917551a 100644 try { - Thread.sleep(this.f ? 0L : 10L); + Thread.sleep(this.f ? 0L : 1L); // Paper - } catch (InterruptedException interruptedexception1) { - interruptedexception1.printStackTrace(); + } catch (InterruptedException interruptedexception) { + interruptedexception.printStackTrace(); - } + }} // Paper } if (this.c.isEmpty()) { -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0062-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0062-Chunk-Save-Reattempt.patch index 4edcb8c33..27b581edd 100644 --- a/Spigot-Server-Patches/0062-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0062-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From b8e76a39e5eaeb73e676e879ffd8650dc68ee57c Mon Sep 17 00:00:00 2001 +From 0d32d723ff3531d21f727f3b075ae01d98d2f989 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,12 +6,12 @@ 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/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 06417b9ec..e1c0921ea 100644 +index 5b48bb0b7..9299ab56a 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -222,8 +222,7 @@ public class RegionFile { +@@ -238,8 +238,7 @@ public class RegionFile { - this.b(i, j, (int)(SystemUtils.getTimeMillis() / 1000L)); + this.b(i, j, (int) (SystemUtils.getTimeMillis() / 1000L)); } catch (IOException ioexception) { - ioexception.printStackTrace(); - ServerInternalException.reportInternalException(ioexception); // Paper @@ -54,5 +54,5 @@ index e507a996f..5dbd1d517 100644 public static synchronized boolean chunkExists(File file, int i, int j) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0067-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0067-Handle-Item-Meta-Inconsistencies.patch index e3296d31a..f83b41011 100644 --- a/Spigot-Server-Patches/0067-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0067-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 69d000dba170d92165b9f2d569127c62a52b14fd Mon Sep 17 00:00:00 2001 +From 5580ed9eca9a0c268f11b3651469a78d5e39ecc4 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 92f8d0633..dbc9fbd66 100644 +index 27705106b..da722ec7e 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; @@ -61,7 +61,7 @@ index 92f8d0633..dbc9fbd66 100644 this.getItem().a(this.tag); // CraftBukkit end } -@@ -588,6 +607,7 @@ public final class ItemStack { +@@ -591,6 +610,7 @@ public final class ItemStack { // Paper end public void setTag(@Nullable NBTTagCompound nbttagcompound) { this.tag = nbttagcompound; @@ -69,7 +69,7 @@ index 92f8d0633..dbc9fbd66 100644 } public IChatBaseComponent getName() { -@@ -664,6 +684,7 @@ public final class ItemStack { +@@ -667,6 +687,7 @@ public final class ItemStack { nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment))); nbttagcompound.setShort("lvl", (short) ((byte) i)); nbttaglist.add((NBTBase) nbttagcompound); @@ -201,7 +201,7 @@ index 2ef4ac64b..d1a546c8f 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 0764a6835..407adbdae 100644 +index 9b31e2d72..1c94fd908 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -8,6 +8,7 @@ import java.lang.reflect.Constructor; @@ -271,7 +271,7 @@ index 0764a6835..407adbdae 100644 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -504,13 +507,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -510,13 +513,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { void deserializeInternal(NBTTagCompound tag, Object context) { } @@ -287,7 +287,7 @@ index 0764a6835..407adbdae 100644 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -745,13 +748,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -751,13 +754,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } public Map getEnchants() { @@ -303,7 +303,7 @@ index 0764a6835..407adbdae 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1078,7 +1081,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1084,7 +1087,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -312,7 +312,7 @@ index 0764a6835..407adbdae 100644 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = HashMultimap.create(this.attributeModifiers); -@@ -1284,6 +1287,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1290,6 +1293,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } } diff --git a/Spigot-Server-Patches/0069-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0069-Add-World-Util-Methods.patch index 2a36f6d72..4b1168dfe 100644 --- a/Spigot-Server-Patches/0069-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0069-Add-World-Util-Methods.patch @@ -1,4 +1,4 @@ -From e69350a0263767ab2332db30c6fa93cddbf4237d Mon Sep 17 00:00:00 2001 +From a6d6f8889148feda3f6229367dc1ae53b488a1a7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 20:16:03 -0400 Subject: [PATCH] Add World Util Methods @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 37bea8dbe..eca041265 100644 +index 446e464b7..dcb036f31 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -638,6 +638,7 @@ public class Chunk implements IChunkAccess { +@@ -637,6 +637,7 @@ public class Chunk implements IChunkAccess { } } @@ -18,13 +18,13 @@ index 37bea8dbe..eca041265 100644 return this.a(blockposition, i, this.world.o().g()); } diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java -index f5c56de0c..9b972e65d 100644 +index 237a34082..cf53118cc 100644 --- a/src/main/java/net/minecraft/server/IWorldReader.java +++ b/src/main/java/net/minecraft/server/IWorldReader.java -@@ -35,6 +35,22 @@ public interface IWorldReader extends IBlockAccess { +@@ -38,6 +38,22 @@ public interface IWorldReader extends IBlockAccess { } - int getLightLevel(BlockPosition var1, int var2); + int getLightLevel(BlockPosition blockposition, int i); + // Paper start + default @Nullable + IBlockData getTypeIfLoaded(BlockPosition var1) { @@ -42,31 +42,22 @@ index f5c56de0c..9b972e65d 100644 + } + // Paper end - boolean isChunkLoaded(int var1, int var2, boolean var3); + boolean isChunkLoaded(int i, int j, boolean flag); -@@ -100,7 +116,7 @@ public interface IWorldReader extends IBlockAccess { - WorldBorder worldborder = this.getWorldBorder(); - boolean flag1 = worldborder.b() < (double)i && (double)j < worldborder.d() && worldborder.c() < (double)i1 && (double)j1 < worldborder.e(); - VoxelShapeBitSet voxelshapebitset = new VoxelShapeBitSet(j - i, l - k, j1 - i1); -- Predicate predicate = (voxelshape3) -> { -+ Predicate predicate = (voxelshape3) -> { // Paper - decompile fix - return !voxelshape3.isEmpty() && VoxelShapes.c(voxelshape, voxelshape3, OperatorBoolean.AND); - }; - Stream stream = StreamSupport.stream(BlockPosition.MutableBlockPosition.b(i, k, i1, j - 1, l - 1, j1 - 1).spliterator(), false).map((blockposition$mutableblockposition) -> { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0e70a3d68..4093d3486 100644 +index ae7e4a7fa..96442ad7d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -84,7 +84,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -79,7 +79,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); + protected final IntHashMap entitiesById = new IntHashMap<>(); private final long F = 16777215L; - private int G; + private int G; public int getSkylightSubtracted() { return this.G; } public void setSkylightSubtracted(int value) { this.G = value;} // Paper - OBFHELPER protected int m = (new Random()).nextInt(); protected final int n = 1013904223; protected float o; -@@ -274,6 +274,83 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -269,6 +269,83 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return this.getType(blockposition).isAir(); } @@ -151,5 +142,5 @@ index 0e70a3d68..4093d3486 100644 return this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0070-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0070-Optimized-Light-Level-Comparisons.patch index d1baf2512..c5ffc829a 100644 --- a/Spigot-Server-Patches/0070-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0070-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From e6cbd59cc5e1a9a30dc857d211e159684ae7a236 Mon Sep 17 00:00:00 2001 +From b1a186f233892e1ad57a261ddeeb3264380b4776 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 1506c9ed..6ae6fc3e 100644 +index fe0dde146..9d53f1118 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 @@ -21,7 +21,7 @@ index 1506c9ed..6ae6fc3e 100644 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 42478d1f..7426d14c 100644 +index 81ea9bcb4..291cc9a39 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -30,7 +30,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen @@ -34,7 +34,7 @@ index 42478d1f..7426d14c 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 dd309030..7cddfc38 100644 +index 53f091835..f8dda1b7a 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,14 +47,15 @@ index dd309030..7cddfc38 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 2485b0fb..8781dea8 100644 +index 5ea517043..dc61263a3 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java -@@ -64,8 +64,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { +@@ -66,9 +66,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { if (this.world.getBrightness(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) { return false; } else { - int i = this.world.Y() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition); +- - return i <= this.random.nextInt(8); + // Paper start - optimized light check, returns faster + boolean passes; @@ -72,7 +73,7 @@ index 2485b0fb..8781dea8 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 03886a4f..02bebf72 100644 +index 4078a94de..5bba50461 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -275,7 +275,7 @@ public class EntityZombie extends EntityMonster { @@ -85,5 +86,5 @@ index 03886a4f..02bebf72 100644 if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a_(entityzombie, entityzombie.getBoundingBox()) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()) && !this.world.containsLiquid(entityzombie.getBoundingBox())) { this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit -- -2.17.1 +2.20.1 diff --git a/Spigot-Server-Patches/0071-Pass-world-to-Village-creation.patch b/Spigot-Server-Patches/0071-Pass-world-to-Village-creation.patch index b21e6d2cc..975101833 100644 --- a/Spigot-Server-Patches/0071-Pass-world-to-Village-creation.patch +++ b/Spigot-Server-Patches/0071-Pass-world-to-Village-creation.patch @@ -1,4 +1,4 @@ -From 4794e17198632431883eba3787fdbbf99df2f43b Mon Sep 17 00:00:00 2001 +From 330e204a245962e81e507e22bdc85b1e0abd4498 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 19 Mar 2016 15:16:54 -0400 Subject: [PATCH] Pass world to Village creation @@ -6,20 +6,20 @@ Subject: [PATCH] Pass world to Village creation fixes NPE bug #95 diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -index d58f6b2a86..d14a9e3a3e 100644 +index 98c6bbc18..7a9fb9753 100644 --- a/src/main/java/net/minecraft/server/PersistentVillage.java +++ b/src/main/java/net/minecraft/server/PersistentVillage.java -@@ -202,7 +202,7 @@ public class PersistentVillage extends PersistentBase { +@@ -237,7 +237,7 @@ public class PersistentVillage extends PersistentBase { - for(int i = 0; i < nbttaglist.size(); ++i) { + for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); - Village village = new Village(); + Village village = new Village(world); // Paper + village.a(nbttagcompound1); this.villages.add(village); - } diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index f87e8e05af..bda67faefe 100644 +index 22b9cce4b..c99d4debc 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -24,7 +24,7 @@ public class Village { @@ -32,5 +32,5 @@ index f87e8e05af..bda67faefe 100644 this.d = BlockPosition.ZERO; this.j = Maps.newHashMap(); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0074-Catch-Async-PlayerChunkMap-operations.patch b/Spigot-Server-Patches/0074-Catch-Async-PlayerChunkMap-operations.patch index 18a7f4ff1..59bb6f8c3 100644 --- a/Spigot-Server-Patches/0074-Catch-Async-PlayerChunkMap-operations.patch +++ b/Spigot-Server-Patches/0074-Catch-Async-PlayerChunkMap-operations.patch @@ -1,14 +1,14 @@ -From a344b3a7f2aa1b2bc16b50743b31c011f4b3c996 Mon Sep 17 00:00:00 2001 +From aa830a52fc2ed826f6421df2fc5817a2c4a36a90 Mon Sep 17 00:00:00 2001 From: Daniel Ennis Date: Sun, 20 Mar 2016 15:22:42 -0400 Subject: [PATCH] Catch Async PlayerChunkMap operations diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 653031af4..3d17ad646 100644 +index 55161af9c..206457650 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -438,10 +438,12 @@ public class PlayerChunkMap { +@@ -434,10 +434,12 @@ public class PlayerChunkMap { } public void a(PlayerChunk playerchunk) { @@ -22,5 +22,5 @@ index 653031af4..3d17ad646 100644 long i = d(chunkcoordintpair.x, chunkcoordintpair.z); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0075-Waving-banner-workaround.patch b/Spigot-Server-Patches/0075-Waving-banner-workaround.patch index b596a5d9a..584c5c41e 100644 --- a/Spigot-Server-Patches/0075-Waving-banner-workaround.patch +++ b/Spigot-Server-Patches/0075-Waving-banner-workaround.patch @@ -1,4 +1,4 @@ -From 2a29c283343e48329376f2c90d533e7bdd3bd6d0 Mon Sep 17 00:00:00 2001 +From 5e1586ef520f83dbf2bc8edb333f9939c8115409 Mon Sep 17 00:00:00 2001 From: Gabscap Date: Sat, 19 Mar 2016 22:25:11 +0100 Subject: [PATCH] Waving banner workaround @@ -6,13 +6,13 @@ Subject: [PATCH] Waving banner workaround This patch is a workaround for MC-63720 diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -index 731b96dea2..2a0fd2fbc0 100644 +index c5c3f40ce..6413f76e7 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -@@ -3,7 +3,13 @@ package net.minecraft.server; - import java.io.IOException; +@@ -4,7 +4,13 @@ import java.io.IOException; public class PacketPlayOutUpdateTime implements Packet { + + // World Age in ticks + // Not changed by server commands + // World Age must not be negative @@ -22,7 +22,7 @@ index 731b96dea2..2a0fd2fbc0 100644 + // Displayed in the debug screen (F3) private long b; - public PacketPlayOutUpdateTime() { + public PacketPlayOutUpdateTime() {} @@ -19,6 +25,9 @@ public class PacketPlayOutUpdateTime implements Packet { } } @@ -34,5 +34,5 @@ index 731b96dea2..2a0fd2fbc0 100644 public void a(PacketDataSerializer packetdataserializer) throws IOException { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0076-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0076-Use-a-Shared-Random-for-Entities.patch index 3363326dc..45302c351 100644 --- a/Spigot-Server-Patches/0076-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0076-Use-a-Shared-Random-for-Entities.patch @@ -1,4 +1,4 @@ -From 904838a83dcfe4d279996358ec02ff87a14ed35a Mon Sep 17 00:00:00 2001 +From 8eff43ace31acf510f77d2fe38e77627e29c1d08 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,10 +6,10 @@ 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 43ceb2fb18..e31c97fb72 100644 +index dfb7d544f..ab46ae8c3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -51,6 +51,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -49,6 +49,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke // CraftBukkit start private static final int CURRENT_LEVEL = 2; @@ -30,7 +30,7 @@ index 43ceb2fb18..e31c97fb72 100644 static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -184,7 +198,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; @@ -40,5 +40,5 @@ index 43ceb2fb18..e31c97fb72 100644 this.justCreated = true; this.uniqueID = MathHelper.a(this.random); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0077-Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/0077-Don-t-teleport-dead-entities.patch index 916c131ab..6fc5967b2 100644 --- a/Spigot-Server-Patches/0077-Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/0077-Don-t-teleport-dead-entities.patch @@ -1,4 +1,4 @@ -From 6af064d807377a45c74cb75e73e28d775d252e27 Mon Sep 17 00:00:00 2001 +From 5549de94f03b62911fa4c033daa064f1dcde508d 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 e31c97fb72..7275c4d21a 100644 +index ab46ae8c3..f7a7ba412 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2562,7 +2562,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2560,7 +2560,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public Entity teleportTo(Location exit, boolean portal) { @@ -20,5 +20,5 @@ index e31c97fb72..7275c4d21a 100644 WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle(); DimensionManager dimensionmanager = worldserver1.dimension; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch b/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch index 0bf911513..9dfc4a450 100644 --- a/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch @@ -1,4 +1,4 @@ -From f5810f944e68391b4e1b8c35968b89a54f6ee177 Mon Sep 17 00:00:00 2001 +From 980387d44ae6392de1394b8fc6ca2579488f103a Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Aug 2015 01:15:02 -0400 Subject: [PATCH] Optimize Chunk Access @@ -71,10 +71,10 @@ index 732c8793e..8b3738c8f 100644 public Chunk remove(Object object) { return this.remove((Long) object); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 557aa5180..1d08ec37f 100644 +index 9a8894238..fd68f06fe 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -78,15 +78,16 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -76,15 +76,16 @@ public class ChunkProviderServer implements IChunkProvider { Chunk chunk; synchronized (this.chunkLoader) { @@ -94,7 +94,7 @@ index 557aa5180..1d08ec37f 100644 return chunk; } -@@ -198,7 +199,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -195,7 +196,7 @@ public class ChunkProviderServer implements IChunkProvider { } this.chunks.put(k, chunk); @@ -103,7 +103,7 @@ index 557aa5180..1d08ec37f 100644 } this.asyncTaskHandler.postToMainThread(chunk::addEntities); -@@ -345,7 +346,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -341,7 +342,7 @@ public class ChunkProviderServer implements IChunkProvider { this.saveChunk(chunk, true); // Spigot } this.chunks.remove(chunk.chunkKey); @@ -112,7 +112,7 @@ index 557aa5180..1d08ec37f 100644 } return true; } -@@ -381,6 +382,6 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -377,6 +378,6 @@ public class ChunkProviderServer implements IChunkProvider { } public boolean isLoaded(int i, int j) { @@ -121,5 +121,5 @@ index 557aa5180..1d08ec37f 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0079-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0079-Configurable-spawn-chances-for-skeleton-horses.patch index b0c743fca..0c1ee4fb2 100644 --- a/Spigot-Server-Patches/0079-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0079-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,11 +1,11 @@ -From 78959508ddb0744bf1e6faed38c6b79c0a07775b Mon Sep 17 00:00:00 2001 +From 3ab0f8039f163674f602340e00fdef8f34bfdbab 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 795545245a..0faef7cf28 100644 +index 795545245..0faef7cf2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -220,4 +220,12 @@ public class PaperWorldConfig { @@ -22,10 +22,10 @@ index 795545245a..0faef7cf28 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2341ce3f93..a7cc053dc8 100644 +index 7bece8558..4a8cc0ff1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -497,7 +497,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -480,7 +480,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); @@ -35,5 +35,5 @@ index 2341ce3f93..a7cc053dc8 100644 if (flag2) { EntityHorseSkeleton entityhorseskeleton = new EntityHorseSkeleton(this); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0080-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0080-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index d3c7a4c59..993199290 100644 --- a/Spigot-Server-Patches/0080-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0080-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -1,4 +1,4 @@ -From f8874981d7f1f44b2420f499c41ecadd99903172 Mon Sep 17 00:00:00 2001 +From 7ed9ceeb7d35c46ef914426bf9944bd1dda34c57 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 @@ -12,10 +12,10 @@ Replace all calls to the new place to the unnecessary forward. Optimize getType and getBlockData to manually inline and optimize the calls diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index f1ad18511..339e2da6b 100644 +index 5843ef65a..4c7793f86 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -9,6 +9,14 @@ public class BaseBlockPosition implements Comparable { +@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable { private final int a; private final int b; private final int c; @@ -31,10 +31,10 @@ index f1ad18511..339e2da6b 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 880ce16b1..c9019260b 100644 +index 75a0f1386..507c93804 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -228,6 +228,16 @@ public class BlockPosition extends BaseBlockPosition { +@@ -300,6 +300,16 @@ public class BlockPosition extends BaseBlockPosition { protected int b; protected int c; protected int d; @@ -52,10 +52,10 @@ index 880ce16b1..c9019260b 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 eca041265..66520842d 100644 +index dcb036f31..182a637ad 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -426,12 +426,24 @@ public class Chunk implements IChunkAccess { +@@ -425,12 +425,24 @@ public class Chunk implements IChunkAccess { return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k)); } @@ -84,10 +84,10 @@ index eca041265..66520842d 100644 IBlockData iblockdata = null; diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 274c44948..7e4c79a1c 100644 +index 3c5f10ad4..621ed1fc5 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -6,7 +6,7 @@ public class ChunkSection { +@@ -7,7 +7,7 @@ public class ChunkSection { private int nonEmptyBlockCount; private int tickingBlockCount; private int e; @@ -97,10 +97,10 @@ index 274c44948..7e4c79a1c 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 4093d3486..e109016b7 100644 +index 96442ad7d..502738b90 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -263,11 +263,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -258,11 +258,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public static boolean isValidLocation(BlockPosition blockposition) { @@ -114,7 +114,7 @@ index 4093d3486..e109016b7 100644 } public boolean isEmpty(BlockPosition blockposition) { -@@ -284,7 +284,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -279,7 +279,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // test if meets light level, return faster // logic copied from below public boolean isLightLevel(BlockPosition blockposition, int level) { @@ -123,7 +123,7 @@ index 4093d3486..e109016b7 100644 if (this.getType(blockposition).c(this, blockposition)) { int sky = getSkylightSubtracted(); if (this.getLightLevel(blockposition.up(), sky) >= level) { -@@ -331,7 +331,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -326,7 +326,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit end Chunk chunk = this.getChunkIfLoaded(blockposition); if (chunk != null) { @@ -132,7 +132,7 @@ index 4093d3486..e109016b7 100644 } return null; } -@@ -386,7 +386,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -381,7 +381,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return true; } // CraftBukkit end @@ -141,7 +141,7 @@ index 4093d3486..e109016b7 100644 return false; } else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { return false; -@@ -707,11 +707,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -702,11 +702,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); } @@ -155,7 +155,7 @@ index 4093d3486..e109016b7 100644 if (this.isLoaded(blockposition)) { this.getChunkAtWorldCoords(blockposition).a(enumskyblock, blockposition, i); this.m(blockposition); -@@ -738,7 +738,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -733,7 +733,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } // CraftBukkit end @@ -164,16 +164,16 @@ index 4093d3486..e109016b7 100644 return Blocks.VOID_AIR.getBlockData(); } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); -@@ -748,7 +748,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -743,7 +743,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public Fluid getFluid(BlockPosition blockposition) { - if (k(blockposition)) { + if (blockposition.isInvalidYLocation()) { // Paper - return FluidTypes.a.i(); + return FluidTypes.EMPTY.i(); } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); -@@ -1766,7 +1766,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1761,7 +1761,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public Map capturedTileEntities = Maps.newHashMap(); @Nullable public TileEntity getTileEntity(BlockPosition blockposition) { @@ -182,7 +182,7 @@ index 4093d3486..e109016b7 100644 return null; } else { // CraftBukkit start -@@ -1807,7 +1807,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1802,7 +1802,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { @@ -191,7 +191,7 @@ index 4093d3486..e109016b7 100644 if (tileentity != null && !tileentity.x()) { // CraftBukkit start if (captureBlockStates) { -@@ -1868,7 +1868,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1863,7 +1863,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public boolean p(BlockPosition blockposition) { @@ -201,5 +201,5 @@ index 4093d3486..e109016b7 100644 } else { Chunk chunk = this.chunkProvider.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, false, false); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0082-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/0082-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 4ac9f4fcc..24bb20d0d 100644 --- a/Spigot-Server-Patches/0082-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/0082-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -1,4 +1,4 @@ -From 370c7181c7102186b298dd9d2427d8e7280bdd78 Mon Sep 17 00:00:00 2001 +From f89ace834ec5515fb35f7c63acb3d9c95190fb58 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 @@ -25,10 +25,10 @@ index 0faef7cf2..deb4ec254 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e109016b7..e614ac33a 100644 +index 502738b90..05d988ed6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -620,7 +620,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -615,7 +615,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -38,10 +38,10 @@ index e109016b7..e614ac33a 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 e98ba11dc..b5983957b 100644 +index 4a8cc0ff1..fa7466d64 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -37,6 +37,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; +@@ -33,6 +33,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; public class WorldServer extends World implements IAsyncTaskHandler { private static final Logger a = LogManager.getLogger(); @@ -49,7 +49,7 @@ index e98ba11dc..b5983957b 100644 private final MinecraftServer server; public EntityTracker tracker; private final PlayerChunkMap manager; -@@ -677,6 +678,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -660,6 +661,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { IBlockData iblockdata = this.getType(nextticklistentry.a); if (iblockdata.getBlock() == nextticklistentry.a()) { @@ -58,5 +58,5 @@ index e98ba11dc..b5983957b 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0083-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0083-Entity-AddTo-RemoveFrom-World-Events.patch index bf61dfa42..654dcc45e 100644 --- a/Spigot-Server-Patches/0083-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0083-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,14 +1,14 @@ -From 89e7bbd243d48746d5df915a32901d9b035976c1 Mon Sep 17 00:00:00 2001 +From b4fad19cf6a691affd09d0e66a98923e7d5128f0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e614ac33a..608f72f0f 100644 +index 05d988ed6..1450a4c6e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1032,6 +1032,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1027,6 +1027,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } entity.valid = true; // CraftBukkit @@ -16,7 +16,7 @@ index e614ac33a..608f72f0f 100644 } protected void c(Entity entity) { -@@ -1039,6 +1040,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1034,6 +1035,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc ((IWorldAccess) this.v.get(i)).b(entity); } @@ -25,5 +25,5 @@ index e614ac33a..608f72f0f 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0084-Configurable-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/0084-Configurable-Chunk-Inhabited-Time.patch index bf711f1b1..f0ed9fade 100644 --- a/Spigot-Server-Patches/0084-Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/0084-Configurable-Chunk-Inhabited-Time.patch @@ -1,4 +1,4 @@ -From 298486afbcd90b8d75fff4514bc9c296c088508e Mon Sep 17 00:00:00 2001 +From 3e8049326274357d86f1e05f315785243963d2e6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Time @@ -30,10 +30,10 @@ index deb4ec254..d2559f7c4 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 66520842d..f470eba29 100644 +index 182a637ad..0421f8f95 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1290,7 +1290,7 @@ public class Chunk implements IChunkAccess { +@@ -1289,7 +1289,7 @@ public class Chunk implements IChunkAccess { } public long m() { @@ -43,5 +43,5 @@ index 66520842d..f470eba29 100644 public void b(long i) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0085-EntityPathfindEvent.patch b/Spigot-Server-Patches/0085-EntityPathfindEvent.patch index d40eb80f4..e8ae17bda 100644 --- a/Spigot-Server-Patches/0085-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0085-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From 614a925bc91281a04de5af8f6da7fa8b725046eb Mon Sep 17 00:00:00 2001 +From 66f0c7791596f3d0e726a47caa3b4c38056110c2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -6,34 +6,34 @@ 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 0600fe23a..53f1c25d2 100644 +index 60b5068e3..604049b08 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -3,7 +3,7 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -4,7 +4,7 @@ import javax.annotation.Nullable; public abstract class NavigationAbstract { + - protected EntityInsentient a; + protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER protected World b; @Nullable protected PathEntity c; -@@ -74,6 +74,7 @@ public abstract class NavigationAbstract { +@@ -78,6 +78,7 @@ public abstract class NavigationAbstract { } else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; } 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 fx = this.j(); - this.b.methodProfiler.enter("pathfind"); -@@ -95,6 +96,7 @@ public abstract class NavigationAbstract { + float f = this.j(); + +@@ -102,6 +103,7 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; } 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 fx = this.j(); - this.b.methodProfiler.enter("pathfind"); + float f = this.j(); + -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch b/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch index beb4a6b76..ad42b8381 100644 --- a/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch +++ b/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch @@ -1,11 +1,11 @@ -From 3dcbb08c24ce42132cca1ad5df0ddddb756eae21 Mon Sep 17 00:00:00 2001 +From df54abcfdf2bbf943dbd4a193e9edcc7af8f7cdf Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Tue, 29 Mar 2016 06:56:23 +0300 Subject: [PATCH] Reduce IO ops opening a new region file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index f4405be395..5d2853b9ce 100644 +index 9299ab56a..407ac75aa 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -8,9 +8,12 @@ import java.io.ByteArrayInputStream; @@ -21,10 +21,11 @@ index f4405be395..5d2853b9ce 100644 import java.util.List; import java.util.zip.DeflaterOutputStream; import java.util.zip.GZIPInputStream; -@@ -60,8 +63,16 @@ public class RegionFile { +@@ -65,11 +68,18 @@ public class RegionFile { this.f.set(1, false); this.c.seek(0L); +- int k; + // Paper Start + ByteBuffer header = ByteBuffer.allocate(8192); + while (header.hasRemaining()) { @@ -33,21 +34,25 @@ index f4405be395..5d2853b9ce 100644 + header.clear(); + IntBuffer headerAsInts = header.asIntBuffer(); + // Paper End - for(int j1 = 0; j1 < 1024; ++j1) { -- int k = this.c.readInt(); + +- for (j = 0; j < 1024; ++j) { +- k = this.c.readInt(); +- this.d[j] = k; ++ for(int j1 = 0; j1 < 1024; ++j1) { + int k = headerAsInts.get(); // Paper - this.d[j1] = k; ++ this.d[j1] = k; if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) { - for(int l = 0; l < (k & 255); ++l) { -@@ -71,7 +82,7 @@ public class RegionFile { + for (int l = 0; l < (k & 255); ++l) { + this.f.set((k >> 8) + l, false); +@@ -78,7 +88,7 @@ public class RegionFile { } - for(int k1 = 0; k1 < 1024; ++k1) { -- int l1 = this.c.readInt(); -+ int l1 = headerAsInts.get(); // Paper - this.e[k1] = l1; + for (j = 0; j < 1024; ++j) { +- k = this.c.readInt(); ++ int k = headerAsInts.get(); // Paper + this.e[j] = k; } } catch (IOException ioexception) { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0089-Do-not-load-chunks-for-Pathfinding.patch b/Spigot-Server-Patches/0089-Do-not-load-chunks-for-Pathfinding.patch index 1f2a5c172..49b6a0c08 100644 --- a/Spigot-Server-Patches/0089-Do-not-load-chunks-for-Pathfinding.patch +++ b/Spigot-Server-Patches/0089-Do-not-load-chunks-for-Pathfinding.patch @@ -1,27 +1,27 @@ -From 371d310b56332215506709abf6289ee0529dbb57 Mon Sep 17 00:00:00 2001 +From 19ecf92a02579bb9c9518f7a192ca00d7d0c3afe Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 31 Mar 2016 19:17:58 -0400 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 546c79cd8..25caf7ef9 100644 +index 49533ac33..eef3ab73f 100644 --- a/src/main/java/net/minecraft/server/ChunkCache.java +++ b/src/main/java/net/minecraft/server/ChunkCache.java -@@ -21,7 +21,7 @@ public class ChunkCache implements IIBlockAccess { +@@ -26,7 +26,7 @@ public class ChunkCache implements IIBlockAccess { - for(int l = this.a; l <= j; ++l) { - for(int i1 = this.b; i1 <= k; ++i1) { + for (l = this.a; l <= j; ++l) { + for (i1 = this.b; i1 <= k; ++i1) { - this.c[l - this.a][i1 - this.b] = world.getChunkAt(l, i1); + this.c[l - this.a][i1 - this.b] = world.getChunkIfLoaded(l, i1); // Paper } } diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 53f1c25d2..26156d6cf 100644 +index 604049b08..716d00afb 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -21,13 +21,15 @@ public abstract class NavigationAbstract { +@@ -22,8 +22,9 @@ public abstract class NavigationAbstract { protected long n; protected PathfinderAbstract o; private BlockPosition q; @@ -30,7 +30,9 @@ index 53f1c25d2..26156d6cf 100644 + private void setWorld() { if (getPathfinder() != null && getPathfinder().getPathfinder() != null) getPathfinder().getPathfinder().world = getEntity().world; } // Paper public NavigationAbstract(EntityInsentient entityinsentient, World world) { - this.a = entityinsentient; + this.g = Vec3D.a; + this.h = Vec3D.a; +@@ -32,6 +33,7 @@ public abstract class NavigationAbstract { this.b = world; this.p = entityinsentient.getAttributeInstance(GenericAttributes.FOLLOW_RANGE); this.r = this.a(); @@ -38,7 +40,7 @@ index 53f1c25d2..26156d6cf 100644 } public BlockPosition i() { -@@ -164,6 +166,7 @@ public abstract class NavigationAbstract { +@@ -174,6 +176,7 @@ public abstract class NavigationAbstract { } public void d() { @@ -47,10 +49,10 @@ index 53f1c25d2..26156d6cf 100644 if (this.m) { this.l(); diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index a12fdceac..1881dea66 100644 +index 3085338f0..89d51d471 100644 --- a/src/main/java/net/minecraft/server/Pathfinder.java +++ b/src/main/java/net/minecraft/server/Pathfinder.java -@@ -8,7 +8,7 @@ public class Pathfinder { +@@ -9,7 +9,7 @@ public class Pathfinder { private final Path a = new Path(); private final Set b = Sets.newHashSet(); private final PathPoint[] c = new PathPoint[32]; @@ -60,15 +62,15 @@ index a12fdceac..1881dea66 100644 public Pathfinder(PathfinderAbstract pathfinderabstract) { this.d = pathfinderabstract; diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java -index ba7fe359f..671628014 100644 +index 36d7e1d96..d722c8513 100644 --- a/src/main/java/net/minecraft/server/PathfinderAbstract.java +++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - public abstract class PathfinderAbstract { +@@ -4,6 +4,7 @@ public abstract class PathfinderAbstract { + protected IBlockAccess a; protected EntityInsentient b; + public World world; // Paper - protected final IntHashMap c = new IntHashMap(); + protected final IntHashMap c = new IntHashMap<>(); protected int d; protected int e; @@ -16,6 +17,7 @@ public abstract class PathfinderAbstract { @@ -80,59 +82,42 @@ index ba7fe359f..671628014 100644 this.c.c(); this.d = MathHelper.d(entityinsentient.width + 1.0F); diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java -index 2e82c7c48..34b29652b 100644 +index d4eb7f862..3b5ace88d 100644 --- a/src/main/java/net/minecraft/server/PathfinderNormal.java +++ b/src/main/java/net/minecraft/server/PathfinderNormal.java -@@ -47,7 +47,7 @@ public class PathfinderNormal extends PathfinderAbstract { - BlockPosition blockposition2 = new BlockPosition(this.b); - PathType pathtype1 = this.a(this.b, blockposition2.getX(), i, blockposition2.getZ()); - if (this.b.a(pathtype1) < 0.0F) { -- HashSet hashset = Sets.newHashSet(); -+ HashSet hashset = Sets.newHashSet(); // Paper - decompile fix - hashset.add(new BlockPosition(this.b.getBoundingBox().minX, (double)i, this.b.getBoundingBox().minZ)); - hashset.add(new BlockPosition(this.b.getBoundingBox().minX, (double)i, this.b.getBoundingBox().maxZ)); - hashset.add(new BlockPosition(this.b.getBoundingBox().maxX, (double)i, this.b.getBoundingBox().minZ)); -@@ -233,7 +233,7 @@ public class PathfinderNormal extends PathfinderAbstract { - } +@@ -327,7 +327,8 @@ public class PathfinderNormal extends PathfinderAbstract { + PathType pathtype = this.b(iblockaccess, i, j, k); - public PathType a(IBlockAccess iblockaccess, int i, int jx, int k, EntityInsentient entityinsentient, int l, int i1, int j1, boolean flag, boolean flag1) { -- EnumSet enumset = EnumSet.noneOf(PathType.class); -+ EnumSet enumset = EnumSet.noneOf(PathType.class); // Paper - decompile fix - PathType pathtype = PathType.BLOCKED; - double d0 = (double)entityinsentient.width / 2.0D; - BlockPosition blockposition = new BlockPosition(entityinsentient); -@@ -304,7 +304,8 @@ public class PathfinderNormal extends PathfinderAbstract { - public PathType a(IBlockAccess iblockaccess, int i, int jx, int k) { - PathType pathtype = this.b(iblockaccess, i, jx, k); - if (pathtype == PathType.OPEN && jx >= 1) { -- Block block = iblockaccess.getType(new BlockPosition(i, jx - 1, k)).getBlock(); -+ Block block = world.getBlockIfLoaded(new BlockPosition(i, jx - 1, k)); // Paper + if (pathtype == PathType.OPEN && j >= 1) { +- Block block = iblockaccess.getType(new BlockPosition(i, j - 1, k)).getBlock(); ++ Block block = world.getBlockIfLoaded(new BlockPosition(i, j - 1, k)); // Paper + if (block == null) return PathType.BLOCKED; // Paper - PathType pathtype1 = this.b(iblockaccess, i, jx - 1, k); + PathType pathtype1 = this.b(iblockaccess, i, j - 1, k); + pathtype = pathtype1 != PathType.WALKABLE && pathtype1 != PathType.OPEN && pathtype1 != PathType.WATER && pathtype1 != PathType.LAVA ? PathType.WALKABLE : PathType.OPEN; - if (pathtype1 == PathType.DAMAGE_FIRE || block == Blocks.MAGMA_BLOCK) { -@@ -326,8 +327,9 @@ public class PathfinderNormal extends PathfinderAbstract { - for(int l = -1; l <= 1; ++l) { - for(int i1 = -1; i1 <= 1; ++i1) { +@@ -353,9 +354,10 @@ public class PathfinderNormal extends PathfinderAbstract { + for (int l = -1; l <= 1; ++l) { + for (int i1 = -1; i1 <= 1; ++i1) { if (l != 0 || i1 != 0) { -- Block block = iblockaccess.getType(blockposition$b.c(l + i, jx, i1 + k)).getBlock(); +- Block block = iblockaccess.getType(blockposition_b.c(l + i, j, i1 + k)).getBlock(); ++ Block block = world.getBlockIfLoaded(blockposition_b.c(l + i, j, i1 + k)); // Paper + - if (block == Blocks.CACTUS) { -+ Block block = world.getBlockIfLoaded(blockposition$b.c(l + i, jx, i1 + k)); // Paper + if (block == null) pathtype = PathType.BLOCKED; // Paper + else if (block == Blocks.CACTUS) { // Paper pathtype = PathType.DANGER_CACTUS; } else if (block == Blocks.FIRE) { pathtype = PathType.DANGER_FIRE; -@@ -343,7 +345,8 @@ public class PathfinderNormal extends PathfinderAbstract { +@@ -387,7 +389,8 @@ public class PathfinderNormal extends PathfinderAbstract { - protected PathType b(IBlockAccess iblockaccess, int i, int jx, int k) { - BlockPosition blockposition = new BlockPosition(i, jx, k); + protected PathType b(IBlockAccess iblockaccess, int i, int j, int k) { + BlockPosition blockposition = new BlockPosition(i, j, k); - IBlockData iblockdata = iblockaccess.getType(blockposition); + IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper + if (iblockdata == null) return PathType.BLOCKED; // Paper Block block = iblockdata.getBlock(); Material material = iblockdata.getMaterial(); - if (iblockdata.isAir()) { + -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0090-Do-not-load-chunks-for-light-checks.patch b/Spigot-Server-Patches/0090-Do-not-load-chunks-for-light-checks.patch index 787b9da28..1c48b3ef2 100644 --- a/Spigot-Server-Patches/0090-Do-not-load-chunks-for-light-checks.patch +++ b/Spigot-Server-Patches/0090-Do-not-load-chunks-for-light-checks.patch @@ -1,4 +1,4 @@ -From 745b9a840a5cd1abf190a93a673f174d0c39aa3b Mon Sep 17 00:00:00 2001 +From e8cefaca8bce04d279e54ebb7f3106a4af8ab800 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 31 Mar 2016 19:17:58 -0400 Subject: [PATCH] Do not load chunks for light checks @@ -7,10 +7,10 @@ Should only happen for blocks on the edge that uses neighbors light level (certain blocks). In that case, there will be 3-4 other neighbors to get a light level from. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 207f53a9c3..b8fcfb6092 100644 +index 1450a4c6e..907681cdf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -663,6 +663,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -658,6 +658,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (blockposition.getY() >= 256) { blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ()); } @@ -19,5 +19,5 @@ index 207f53a9c3..b8fcfb6092 100644 return this.getChunkAtWorldCoords(blockposition).a(blockposition, i); } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0091-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0091-Add-PlayerUseUnknownEntityEvent.patch index 550bd7539..1f21c86f9 100644 --- a/Spigot-Server-Patches/0091-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0091-Add-PlayerUseUnknownEntityEvent.patch @@ -1,24 +1,24 @@ -From 5a9c89981490e9246a982dd7a217a2c88229a018 Mon Sep 17 00:00:00 2001 +From 1b1366ebf7437bc03164354f888adc45d89604b1 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 05:09:16 -0400 Subject: [PATCH] Add PlayerUseUnknownEntityEvent diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java -index a4b98c81f..53d38ea40 100644 +index 77440ac81..8711462e1 100644 --- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java +++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java -@@ -4,7 +4,7 @@ import java.io.IOException; - import javax.annotation.Nullable; +@@ -5,7 +5,7 @@ import javax.annotation.Nullable; public class PacketPlayInUseEntity implements Packet { + - private int a; + private int a; public int getEntityId() { return this.a; } // Paper - add accessor private PacketPlayInUseEntity.EnumEntityUseAction action; private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b67861519..dc2c143c8 100644 +index 91eb73b73..f35714fa1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1893,6 +1893,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -39,5 +39,5 @@ index b67861519..dc2c143c8 100644 } -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0092-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0092-Fix-reducedDebugInfo-not-initialized-on-client.patch index 1084ebf72..3856d4ac2 100644 --- a/Spigot-Server-Patches/0092-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0092-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -1,14 +1,14 @@ -From ef9ed246bbbed57972d8592aebb841a80a66365d Mon Sep 17 00:00:00 2001 +From 3a7b47e95a8f85b41b95c1d0521390ab564fbf8f Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 20:37:03 -0400 Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7dfb2bee49..2154c0516c 100644 +index 4f9c97a08..13d55343e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -162,6 +162,7 @@ public abstract class PlayerList { +@@ -161,6 +161,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); @@ -17,5 +17,5 @@ index 7dfb2bee49..2154c0516c 100644 entityplayer.getStatisticManager().c(); entityplayer.B().a(entityplayer); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0094-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0094-Configurable-Keep-Spawn-Loaded-range-per-world.patch index f5e5f034b..fe94407c8 100644 --- a/Spigot-Server-Patches/0094-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0094-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 7f55fefff3414e5298ee5cdf9071c0435a1d600f Mon Sep 17 00:00:00 2001 +From 759df70cabfe26f1770dc4a86679fb3f8ad0d45d 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 @@ -21,12 +21,12 @@ index 058cd8cc8..276dd98fd 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eef8d2b5a..cc98b745b 100644 +index 7a2f128d3..c21ebd466 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -490,13 +490,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati - ArrayList arraylist = Lists.newArrayList(); - Set set = Sets.newConcurrentHashSet(); +@@ -485,13 +485,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + List list = Lists.newArrayList(); + Set set = Sets.newConcurrentHashSet(); - for (int i = -192; i <= 192 && this.isRunning(); i += 16) { - for (int j = -192; j <= 192 && this.isRunning(); j += 16) { @@ -35,20 +35,20 @@ index eef8d2b5a..cc98b745b 100644 + for (int i = -radius; i <= radius && this.isRunning(); i += 16) { + for (int j = -radius; j <= radius && this.isRunning(); j += 16) { + // Paper end - arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); + list.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); } + } // Paper + if (this.isRunning()) { // Paper -+ int expected = arraylist.size(); // Paper ++ int expected = list.size(); // Paper + - CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) arraylist, (chunk) -> { + CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) list, (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()) { -@@ -511,11 +519,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -506,11 +514,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati throw new RuntimeException(executionexception.getCause()); } catch (TimeoutException timeoutexception) { @@ -63,10 +63,10 @@ index eef8d2b5a..cc98b745b 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 520235d1b..7953d7f99 100644 +index 907681cdf..5aea44cd8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2852,8 +2852,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2847,8 +2847,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc int k = i * 16 + 8 - blockposition.getX(); int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; @@ -91,10 +91,10 @@ index acd54067e..c655d51ac 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 889f99d66..ff1ccbd64 100644 +index f118d382c..274e8626d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1397,8 +1397,9 @@ public class CraftWorld implements World { +@@ -1419,8 +1419,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/0095-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0095-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index ef46f3962..80474d921 100644 --- a/Spigot-Server-Patches/0095-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0095-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -1,14 +1,14 @@ -From 95a720901fee2ac8a6f18c047d98cc7a12c98f22 Mon Sep 17 00:00:00 2001 +From 2848d4479060017f0be0642f379638c37a73efd1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Apr 2016 17:48:50 -0400 Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 411cfedd25..b4274cf0ec 100644 +index 5aea44cd8..a7342da04 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -578,6 +578,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -573,6 +573,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public void applyPhysics(BlockPosition blockposition, Block block) { @@ -17,5 +17,5 @@ index 411cfedd25..b4274cf0ec 100644 this.a(blockposition.east(), block, blockposition); this.a(blockposition.down(), block, blockposition); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 09a795ea2..88f80cb2d 100644 --- a/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -1,14 +1,14 @@ -From c964f427b9758437f1cbbce042795818e8243b52 Mon Sep 17 00:00:00 2001 +From 5a15c3db1c4118969b832e0d827619f0b3602afc 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 64482393d..1a1b40ac0 100644 +index a7342da04..11c77ade1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2848,6 +2848,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2843,6 +2843,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return this.K; } @@ -17,11 +17,11 @@ index 64482393d..1a1b40ac0 100644 BlockPosition blockposition = this.getSpawn(); int k = i * 16 + 8 - blockposition.getX(); diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java -index bd9c76ee8..ef5c7b1f6 100644 +index 5e87e537e..3911e4947 100644 --- a/src/main/java/net/minecraft/server/WorldProvider.java +++ b/src/main/java/net/minecraft/server/WorldProvider.java -@@ -72,7 +72,7 @@ public abstract class WorldProvider { - } +@@ -69,7 +69,7 @@ public abstract class WorldProvider { + public void l() {} public boolean a(int i, int j) { - return !this.b.isForceLoaded(i, j); @@ -30,5 +30,5 @@ index bd9c76ee8..ef5c7b1f6 100644 protected abstract void m(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0097-Remove-Debug-checks-from-DataBits.patch b/Spigot-Server-Patches/0097-Remove-Debug-checks-from-DataBits.patch index 5f8f3d089..04c4d2b0f 100644 --- a/Spigot-Server-Patches/0097-Remove-Debug-checks-from-DataBits.patch +++ b/Spigot-Server-Patches/0097-Remove-Debug-checks-from-DataBits.patch @@ -1,4 +1,4 @@ -From fb3fb94a0ae6670121707f295837a53cc0fd0127 Mon Sep 17 00:00:00 2001 +From 2445bd51a7e8e1e29d2ed54a71136d45e2bf9685 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Apr 2016 21:38:58 -0400 Subject: [PATCH] Remove Debug checks from DataBits @@ -9,38 +9,38 @@ Before: http://i.imgur.com/nQsMzAE.png After: http://i.imgur.com/nJ46crB.png diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 0dc948a375..f4de7fcf4b 100644 +index 9e83610f1..fe5947b6c 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java -@@ -13,7 +13,7 @@ public class DataBits { +@@ -14,7 +14,7 @@ public class DataBits { } public DataBits(int i, int j, long[] along) { -- Validate.inclusiveBetween(1L, 32L, (long)i); -+ //Validate.inclusiveBetween(1L, 32L, (long)i); // Paper +- Validate.inclusiveBetween(1L, 32L, (long) i); ++ //Validate.inclusiveBetween(1L, 32L, (long) i); // Paper this.d = j; this.b = i; this.a = along; -@@ -25,8 +25,8 @@ public class DataBits { +@@ -27,8 +27,8 @@ public class DataBits { } public void a(int i, int j) { -- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); -- Validate.inclusiveBetween(0L, this.c, (long)j); -+ //Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); // Paper -+ //Validate.inclusiveBetween(0L, this.c, (long)j); // Paper +- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); +- Validate.inclusiveBetween(0L, this.c, (long) j); ++ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper ++ //Validate.inclusiveBetween(0L, this.c, (long) j); // Paper int k = i * this.b; int l = k / 64; int i1 = ((i + 1) * this.b - 1) / 64; -@@ -41,7 +41,7 @@ public class DataBits { +@@ -45,7 +45,7 @@ public class DataBits { } public int a(int i) { -- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); +- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); + //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper int j = i * this.b; int k = j / 64; int l = ((i + 1) * this.b - 1) / 64; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0098-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0098-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index d17071161..ab0918ecd 100644 --- a/Spigot-Server-Patches/0098-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0098-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -1,4 +1,4 @@ -From 33a493b42f79a4adbdd4afe6806bdeea1e52322a Mon Sep 17 00:00:00 2001 +From f62a99088d8de9b94f645e5309a996409238f9c9 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 @@ -26,7 +26,7 @@ index 276dd98fd..973ea8bca 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8a65072fe..d162bd3d8 100644 +index f35714fa1..0ff0dff28 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1631,7 +1631,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -48,10 +48,10 @@ index 8a65072fe..d162bd3d8 100644 if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80f595fea..7edca4284 100644 +index 452619f2f..194149eb6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -177,7 +177,7 @@ public abstract class PlayerList { +@@ -176,7 +176,7 @@ public abstract class PlayerList { } chatmessage.a(EnumChatFormat.YELLOW); @@ -61,5 +61,5 @@ index 80f595fea..7edca4284 100644 worldserver = server.getWorldServer(entityplayer.dimension); // CraftBukkit - Update in case join event changed it playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0100-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0100-Remove-unused-World-Tile-Entity-List.patch index 6532cef28..01e03c725 100644 --- a/Spigot-Server-Patches/0100-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0100-Remove-unused-World-Tile-Entity-List.patch @@ -1,4 +1,4 @@ -From 7a77bcce394c3b98f9b3df7972bad53d5bbc3520 Mon Sep 17 00:00:00 2001 +From e671d551cf48e7fae5fcd6e2d3f07289e4425135 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,10 +6,10 @@ 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 1a1b40ac0..9c5f520f1 100644 +index 11c77ade1..600b0ec8b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -76,7 +76,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -71,7 +71,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc }; // Spigot end protected final Set g = com.google.common.collect.Sets.newHashSet(); // Paper @@ -18,7 +18,7 @@ index 1a1b40ac0..9c5f520f1 100644 public final List tileEntityListTick = Lists.newArrayList(); private final List c = Lists.newArrayList(); private final Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper -@@ -1268,7 +1268,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1263,7 +1263,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -27,7 +27,7 @@ index 1a1b40ac0..9c5f520f1 100644 this.tileEntityListUnload.clear(); } -@@ -1321,7 +1321,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1316,7 +1316,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (tileentity.x()) { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); @@ -36,7 +36,7 @@ index 1a1b40ac0..9c5f520f1 100644 if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); } -@@ -1351,7 +1351,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1346,7 +1346,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -45,7 +45,7 @@ index 1a1b40ac0..9c5f520f1 100644 this.a(tileentity1); } // CraftBukkit end -@@ -1371,9 +1371,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1366,9 +1366,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc protected void p_() {} public boolean a(TileEntity tileentity) { @@ -57,7 +57,7 @@ index 1a1b40ac0..9c5f520f1 100644 this.tileEntityListTick.add(tileentity); } -@@ -1854,7 +1854,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1849,7 +1849,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } else { if (tileentity != null) { this.c.remove(tileentity); @@ -67,5 +67,5 @@ index 1a1b40ac0..9c5f520f1 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0102-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0102-Configurable-Player-Collision.patch index 84d6d8e2e..3bc526158 100644 --- a/Spigot-Server-Patches/0102-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0102-Configurable-Player-Collision.patch @@ -1,4 +1,4 @@ -From 559f0719ff1b69a0decfbbc543cf13fcc2c79654 Mon Sep 17 00:00:00 2001 +From b2e2e4d12a4f1389e539a0823fec418b05ca6c7b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision @@ -19,10 +19,10 @@ index 0778f53e2..30fcf4a72 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc98b745b..d146cc79c 100644 +index c21ebd466..862c5d66b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -425,6 +425,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -420,6 +420,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.a(this.getWorldServer(DimensionManager.OVERWORLD).worldMaps); // CraftBukkit end @@ -43,31 +43,31 @@ index cc98b745b..d146cc79c 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 f7a9b9d88..7befd80cf 100644 +index a6aed2531..575e3762b 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java -@@ -92,7 +92,7 @@ public class PacketPlayOutScoreboardTeam implements Packet playersByName = new org.spigotmc.CaseInsensitiveMap(); + private final Map playersByName = new java.util.HashMap<>(); + @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule public PlayerList(MinecraftServer minecraftserver) { this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this); -@@ -231,6 +232,13 @@ public abstract class PlayerList { +@@ -230,6 +231,13 @@ public abstract class PlayerList { } entityplayer.syncInventory(); @@ -81,7 +81,7 @@ index 7edca4284..3e4ca288d 100644 // CraftBukkit - Moved from above, added world PlayerList.f.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX, entityplayer.locY, entityplayer.locZ); } -@@ -424,6 +432,16 @@ public abstract class PlayerList { +@@ -423,6 +431,16 @@ public abstract class PlayerList { entityplayer.playerTick();// SPIGOT-924 // CraftBukkit end @@ -98,7 +98,7 @@ index 7edca4284..3e4ca288d 100644 this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1306,7 +1324,13 @@ public abstract class PlayerList { +@@ -1305,7 +1323,13 @@ public abstract class PlayerList { player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message } // CraftBukkit end @@ -114,5 +114,5 @@ index 7edca4284..3e4ca288d 100644 // CraftBukkit start -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0104-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0104-Configurable-RCON-IP-address.patch index 0a2a963df..101e60e79 100644 --- a/Spigot-Server-Patches/0104-Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/0104-Configurable-RCON-IP-address.patch @@ -1,4 +1,4 @@ -From 24629d8216ef7f94026a4c062775768a7463683f Mon Sep 17 00:00:00 2001 +From b29545cb2306aec2113260e8574a89cd053a7d5d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Apr 2016 00:39:33 -0400 Subject: [PATCH] Configurable RCON IP address @@ -6,10 +6,10 @@ 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 32244b55a2..4bfd41af18 100644 +index 81a6a8fc9..7b82c4dea 100644 --- a/src/main/java/net/minecraft/server/RemoteControlListener.java +++ b/src/main/java/net/minecraft/server/RemoteControlListener.java -@@ -23,7 +23,7 @@ public class RemoteControlListener extends RemoteConnectionThread { +@@ -24,7 +24,7 @@ public class RemoteControlListener extends RemoteConnectionThread { super(iminecraftserver, "RCON Listener"); this.h = iminecraftserver.a("rcon.port", 0); this.l = iminecraftserver.a("rcon.password", ""); @@ -19,5 +19,5 @@ index 32244b55a2..4bfd41af18 100644 if (0 == this.h) { this.h = this.i + 10; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0105-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0105-Prevent-Fire-from-loading-chunks.patch index e2f0660e1..7b46248fb 100644 --- a/Spigot-Server-Patches/0105-Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0105-Prevent-Fire-from-loading-chunks.patch @@ -1,4 +1,4 @@ -From 71e0dac70fbb70261b7d5f29382847a068fbf9d9 Mon Sep 17 00:00:00 2001 +From f7bd4a38ff79dfc78488a4348bfbc4f85eb92a9f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 17 Apr 2016 17:27:09 -0400 Subject: [PATCH] Prevent Fire from loading chunks @@ -7,10 +7,10 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index ebf9d3510c..24573b4704 100644 +index e09a58697..3f421d46a 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java -@@ -162,6 +162,7 @@ public class BlockFire extends Block { +@@ -161,6 +161,7 @@ public class BlockFire extends Block { } blockposition_mutableblockposition.g(blockposition).d(l, j1, i1); @@ -18,7 +18,7 @@ index ebf9d3510c..24573b4704 100644 int l1 = this.a((IWorldReader) world, (BlockPosition) blockposition_mutableblockposition); if (l1 > 0) { -@@ -207,10 +208,14 @@ public class BlockFire extends Block { +@@ -206,10 +207,14 @@ public class BlockFire extends Block { } private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition @@ -35,7 +35,7 @@ index ebf9d3510c..24573b4704 100644 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -267,7 +272,11 @@ public class BlockFire extends Block { +@@ -266,7 +271,11 @@ public class BlockFire extends Block { for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; @@ -49,5 +49,5 @@ index ebf9d3510c..24573b4704 100644 return i; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0106-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0106-Implement-PlayerLocaleChangeEvent.patch index 640707e7d..6bcf90718 100644 --- a/Spigot-Server-Patches/0106-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0106-Implement-PlayerLocaleChangeEvent.patch @@ -1,14 +1,14 @@ -From 00c27cd397ae5eda3d387c87fb4ec208ab4cde79 Mon Sep 17 00:00:00 2001 +From 58a1b09c393ddac6921607da61d06d946e8df60f Mon Sep 17 00:00:00 2001 From: Isaac Moore Date: Tue, 19 Apr 2016 14:09:31 -0500 Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index aacf411dc..623e7ec5f 100644 +index 98a8ce962..aad5a3527 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -36,7 +36,7 @@ import org.bukkit.inventory.MainHand; +@@ -33,7 +33,7 @@ import org.bukkit.inventory.MainHand; public class EntityPlayer extends EntityHuman implements ICrafting { private static final Logger cc = LogManager.getLogger(); @@ -17,7 +17,7 @@ index aacf411dc..623e7ec5f 100644 public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; -@@ -1251,13 +1251,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1253,13 +1253,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT); this.server.server.getPluginManager().callEvent(event); } @@ -40,10 +40,10 @@ index aacf411dc..623e7ec5f 100644 this.ct = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bx, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1b2e7ed72..1f21e54ab 100644 +index a12c30857..cceaba875 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1741,8 +1741,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1747,8 +1747,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -56,7 +56,7 @@ index 1b2e7ed72..1f21e54ab 100644 } // Paper start -@@ -1831,7 +1833,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1837,7 +1839,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -66,5 +66,5 @@ index 1b2e7ed72..1f21e54ab 100644 @Override -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0108-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0108-Add-ability-to-configure-frosted_ice-properties.patch index ab9cda84a..eb337498d 100644 --- a/Spigot-Server-Patches/0108-Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/0108-Add-ability-to-configure-frosted_ice-properties.patch @@ -1,4 +1,4 @@ -From 93c2696ec51341f0375fb4fda21b81e890bc49e4 Mon Sep 17 00:00:00 2001 +From c606b70b6aba86512d4fbeb55cf80b4041f448ca 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 @@ -24,24 +24,27 @@ index 973ea8bca..7c7d5595a 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 1100073f3..598621fbb 100644 +index 7cac7cc90..792a69ad5 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java -@@ -11,19 +11,20 @@ public class BlockIceFrost extends BlockIce { +@@ -12,6 +12,7 @@ public class BlockIceFrost extends BlockIce { } public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) { + if (!world.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice - if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - iblockdata.get(a) - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); - IBlockData iblockdata1 = world.getType(blockposition$b); - if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) { -- world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, 20, 40)); -+ world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - (Integer) iblockdata.get(BlockIceFrost.a) - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) { + BlockPosition.b blockposition_b = BlockPosition.b.r(); + Throwable throwable = null; +@@ -27,7 +28,7 @@ public class BlockIceFrost extends BlockIce { + IBlockData iblockdata1 = world.getType(blockposition_b); + + if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) { +- world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, 20, 40)); ++ world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } } + } catch (Throwable throwable1) { +@@ -49,7 +50,7 @@ public class BlockIceFrost extends BlockIce { } } else { @@ -51,5 +54,5 @@ index 1100073f3..598621fbb 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0109-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0109-remove-null-possibility-for-getServer-singleton.patch index d69dd8313..90112e1f5 100644 --- a/Spigot-Server-Patches/0109-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0109-remove-null-possibility-for-getServer-singleton.patch @@ -1,4 +1,4 @@ -From 2d8a85df7a2943eb4c852bfdd9e0e06cb1a86864 Mon Sep 17 00:00:00 2001 +From 9d07418be4c69b977e9a3b2e2b1651f5821c50b2 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,10 +6,10 @@ 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 74c84dda69..eb6ada935f 100644 +index 862c5d66b..3ff271869 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -73,6 +73,7 @@ import co.aikar.timings.MinecraftTimings; // Paper +@@ -68,6 +68,7 @@ import co.aikar.timings.MinecraftTimings; // Paper public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStatistics, ICommandListener, Runnable { @@ -17,16 +17,16 @@ index 74c84dda69..eb6ada935f 100644 public static final Logger LOGGER = LogManager.getLogger(); public static final File a = new File("usercache.json"); public Convertable convertable; -@@ -162,6 +163,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -157,6 +158,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.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA); - this.resourcePackRepository = new ResourcePackRepository(ResourcePackLoader::new); + this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); this.ag = new CraftingManager(); -@@ -1828,7 +1831,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1823,7 +1826,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit start @Deprecated public static MinecraftServer getServer() { @@ -36,5 +36,5 @@ index 74c84dda69..eb6ada935f 100644 // CraftBukkit end } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0110-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0110-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 84b637da6..ef915d0b1 100644 --- a/Spigot-Server-Patches/0110-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0110-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From 84144ea1b943d26fa00db7f33b51c5172d234a11 Mon Sep 17 00:00:00 2001 +From 3a8e019ef8f05f0d544032d452fe95be4f3213c6 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,10 +13,10 @@ 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 1185769ca..443a089d8 100644 +index f28ca6bb4..f1314831f 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -618,6 +618,12 @@ public abstract class EntityHuman extends EntityLiving { +@@ -615,6 +615,12 @@ public abstract class EntityHuman extends EntityLiving { return null; } // CraftBukkit end @@ -30,7 +30,7 @@ index 1185769ca..443a089d8 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 08d923563..6d9c80489 100644 +index a12a42c32..638b54c1e 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -97,7 +97,7 @@ public class EntityTrackerEntry { @@ -43,10 +43,10 @@ index 08d923563..6d9c80489 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 9c5f520f1..5d7370029 100644 +index 600b0ec8b..b51415e9b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1072,6 +1072,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1067,6 +1067,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc { if ( iter.next().trackee == entity ) { @@ -140,5 +140,5 @@ index 256a13178..5768cd512 100644 public RenderData() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0111-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0111-LootTable-API-Replenishable-Lootables-Feature.patch index b42b59cbb..24d5fd9fb 100644 --- a/Spigot-Server-Patches/0111-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0111-LootTable-API-Replenishable-Lootables-Feature.patch @@ -1,4 +1,4 @@ -From 33e61dd190f6ec4964e57784f282124f44568536 Mon Sep 17 00:00:00 2001 +From 794b677388806e472929c34cf95a29abd4a35d74 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 @@ -520,10 +520,10 @@ index 000000000..d50410532 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b39e3ef13..1338eff40 100644 +index f7a7ba412..b6356966a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -69,6 +69,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -67,6 +67,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -591,13 +591,13 @@ index 520cca48c..e228fc853 100644 if (this.lootTableSeed == 0L) { diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index 7d066a18d..c9c29528a 100644 +index 961d9a5f9..60f0b5046 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java -@@ -4,9 +4,10 @@ import java.util.Random; - import javax.annotation.Nullable; +@@ -5,9 +5,10 @@ import javax.annotation.Nullable; public abstract class TileEntityLootable extends TileEntityContainer implements ILootable { + - protected MinecraftKey g; - protected long h; + protected MinecraftKey g; public MinecraftKey getLootTableKey() { return g; } public void setLootTable(MinecraftKey key) { g = key; } // Paper - OBFHELPER @@ -607,7 +607,7 @@ index 7d066a18d..c9c29528a 100644 protected TileEntityLootable(TileEntityTypes tileentitytypes) { super(tileentitytypes); -@@ -21,16 +22,18 @@ public abstract class TileEntityLootable extends TileEntityContainer implements +@@ -23,16 +24,18 @@ public abstract class TileEntityLootable extends TileEntityContainer implements } protected boolean d(NBTTagCompound nbttagcompound) { @@ -627,7 +627,7 @@ index 7d066a18d..c9c29528a 100644 if (this.g == null) { return false; } else { -@@ -39,14 +42,14 @@ public abstract class TileEntityLootable extends TileEntityContainer implements +@@ -41,15 +44,15 @@ public abstract class TileEntityLootable extends TileEntityContainer implements nbttagcompound.setLong("LootTableSeed", this.h); } @@ -640,11 +640,12 @@ index 7d066a18d..c9c29528a 100644 - if (this.g != null && this.world.getMinecraftServer() != null) { + if (lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.g); + - this.g = null; + lootableData.processRefill(entityhuman); // Paper Random random; + if (this.h == 0L) { - random = new Random(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java index 8617fac6b..4f4121adc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java diff --git a/Spigot-Server-Patches/0112-Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/0112-Entity-Tracking-Improvements.patch index 122ce793a..cbd242dfc 100644 --- a/Spigot-Server-Patches/0112-Entity-Tracking-Improvements.patch +++ b/Spigot-Server-Patches/0112-Entity-Tracking-Improvements.patch @@ -1,4 +1,4 @@ -From da63912ec50ee3ed27e4473060f6a172146e123d Mon Sep 17 00:00:00 2001 +From 50cda9c60ae28cd18ad98fc7c6939974b7fec251 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 1474209a1e..5e5c241669 100644 +index b6356966a..583cee415 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -70,6 +70,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper protected CraftEntity bukkitEntity; @@ -19,7 +19,7 @@ index 1474209a1e..5e5c241669 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 69d3b4f8e4..0b00ed3d00 100644 +index 638b54c1e..28a0ea034 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -56,6 +56,7 @@ public class EntityTrackerEntry { @@ -30,7 +30,7 @@ index 69d3b4f8e4..0b00ed3d00 100644 this.tracker = entity; this.e = i; this.f = j; -@@ -453,17 +454,59 @@ public class EntityTrackerEntry { +@@ -454,17 +455,59 @@ public class EntityTrackerEntry { this.tracker.b(entityplayer); entityplayer.d(this.tracker); @@ -90,7 +90,7 @@ index 69d3b4f8e4..0b00ed3d00 100644 double d0 = entityplayer.locX - (double) this.xLoc / 4096.0D; double d1 = entityplayer.locZ - (double) this.zLoc / 4096.0D; int i = Math.min(this.e, (entityplayer.getViewDistance() - 1) * 16); // Paper - Use player view distance API -@@ -604,6 +647,7 @@ public class EntityTrackerEntry { +@@ -605,6 +648,7 @@ public class EntityTrackerEntry { this.trackedPlayers.remove(entityplayer); this.tracker.c(entityplayer); entityplayer.c(this.tracker); @@ -99,5 +99,5 @@ index 69d3b4f8e4..0b00ed3d00 100644 } -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0113-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0113-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index bb5cd9036..0b190bae6 100644 --- a/Spigot-Server-Patches/0113-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/0113-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -1,11 +1,11 @@ -From b720608db74ef91858c50f2c572f66321b36f5ba Mon Sep 17 00:00:00 2001 +From 9c9c5f73303c7aeb25ee2ac573501c161a4ed6b6 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 1d32b93c8..c4d12c315 100644 +index 30fcf4a72..e10055b7d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -238,4 +238,9 @@ public class PaperConfig { @@ -19,17 +19,17 @@ index 1d32b93c8..c4d12c315 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index f2e8eface..895ea0eb4 100644 +index 1a9391a38..3a9dfb979 100644 --- a/src/main/java/net/minecraft/server/PersistentScoreboard.java +++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java -@@ -160,6 +160,7 @@ public class PersistentScoreboard extends PersistentBase { - NBTTagList nbttaglist = new NBTTagList(); +@@ -177,6 +177,7 @@ public class PersistentScoreboard extends PersistentBase { - for(ScoreboardTeam scoreboardteam : this.b.getTeams()) { + while (iterator.hasNext()) { + ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next(); + if (!com.destroystokyo.paper.PaperConfig.saveEmptyScoreboardTeams && scoreboardteam.getPlayerNameSet().isEmpty()) continue; // Paper NBTTagCompound nbttagcompound = new NBTTagCompound(); + nbttagcompound.setString("Name", scoreboardteam.getName()); - nbttagcompound.setString("DisplayName", IChatBaseComponent.ChatSerializer.a(scoreboardteam.getDisplayName())); -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0115-Activation-Range-Improvements.patch b/Spigot-Server-Patches/0115-Activation-Range-Improvements.patch index 495397d25..4a0e05437 100644 --- a/Spigot-Server-Patches/0115-Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/0115-Activation-Range-Improvements.patch @@ -1,4 +1,4 @@ -From fdd7766d19df64b696d939e214b6a03c3e1757ab Mon Sep 17 00:00:00 2001 +From 60e23e8bb0a197dc11f3d6facbbda7029175567d Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 13 May 2016 01:38:06 -0400 Subject: [PATCH] Activation Range Improvements @@ -10,10 +10,10 @@ Fixes and adds new Immunities to improve gameplay behavior Adds water Mobs to activation range config and nerfs fish diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index c9019260b..e980e31fc 100644 +index 507c93804..a4c282220 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -315,6 +315,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -387,6 +387,7 @@ public class BlockPosition extends BaseBlockPosition { this.c = i; } @@ -22,10 +22,10 @@ index c9019260b..e980e31fc 100644 return new BlockPosition(this); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 69645d517..9682b0a01 100644 +index 583cee415..192f0aedd 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -575,6 +575,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -573,6 +573,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.recalcPosition(); } else { if (enummovetype == EnumMoveType.PISTON) { @@ -46,10 +46,10 @@ index 20b7c2c6d..d659c57db 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index ac250182b..06bb8cf1f 100644 +index 4809af8f0..7401bafa9 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -104,6 +104,17 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -105,6 +105,17 @@ public abstract class EntityInsentient extends EntityLiving { return this.lookController; } @@ -68,7 +68,7 @@ index ac250182b..06bb8cf1f 100644 return this.moveController; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 95af2d529..162de836e 100644 +index fe1c5a49b..f58ebe3c2 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 { @@ -81,10 +81,10 @@ index 95af2d529..162de836e 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 9c48bb3c9..22cea8552 100644 +index b19bd2b99..5e1976871 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -340,6 +340,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn +@@ -363,6 +363,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn return this.bR != null; } @@ -93,29 +93,31 @@ index 9c48bb3c9..22cea8552 100644 return this.bQ != null; } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index acc099e95..339c78eec 100644 +index a146a8b45..a19853463 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java -@@ -20,7 +20,9 @@ public abstract class PathfinderGoal { - } +@@ -18,7 +18,10 @@ public abstract class PathfinderGoal { - public void d() { + public void c() {} + +- public void d() {} ++ public void d() { + onTaskReset(); // Paper - } ++ } + public void onTaskReset() {} // Paper - public void e() { - } + public void e() {} + diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -index 9a75cb63b..cf10605aa 100644 +index d5c08aa7c..756d63239 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -@@ -1,12 +1,12 @@ - package net.minecraft.server; +@@ -2,12 +2,12 @@ package net.minecraft.server; public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { + - private final EntityCreature f; -+ private final EntityCreature f; public EntityCreature getEntity() { return f; } // Paper - OBFHELPER ++ private final EntityCreature f;public EntityCreature getEntity() { return f; } // Paper - OBFHELPER public double a; protected int b; protected int c; @@ -125,9 +127,9 @@ index 9a75cb63b..cf10605aa 100644 private boolean h; private final int i; private final int j; -@@ -15,6 +15,13 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { - public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix) { - this(entitycreature, d0, ix, 1); +@@ -16,6 +16,13 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { + public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i) { + this(entitycreature, d0, i, 1); } + // Paper start - activation range improvements + @Override @@ -137,22 +139,22 @@ index 9a75cb63b..cf10605aa 100644 + } + // Paper end - public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix, int jx) { + public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i, int j) { this.d = BlockPosition.ZERO; -@@ -93,6 +100,7 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { - blockposition$mutableblockposition.g(blockposition).d(i1, k - 1, j1); - if (this.f.f(blockposition$mutableblockposition) && this.a(this.f.world, blockposition$mutableblockposition)) { - this.d = blockposition$mutableblockposition; -+ setTarget(blockposition$mutableblockposition.toBlockPosition()); // Paper +@@ -94,6 +101,7 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { + blockposition_mutableblockposition.g(blockposition).d(i1, k - 1, j1); + if (this.f.f((BlockPosition) blockposition_mutableblockposition) && this.a(this.f.world, blockposition_mutableblockposition)) { + this.d = blockposition_mutableblockposition; ++ setTarget(blockposition_mutableblockposition.toBlockPosition()); // Paper return true; } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -index ae21eb84d..8f35f71f8 100644 +index f3df91181..3e2f9c749 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -@@ -10,10 +10,10 @@ import org.apache.logging.log4j.Logger; - public class PathfinderGoalSelector { +@@ -11,10 +11,10 @@ public class PathfinderGoalSelector { + private static final Logger a = LogManager.getLogger(); private final Set b = Sets.newLinkedHashSet(); - private final Set c = Sets.newLinkedHashSet(); @@ -165,7 +167,7 @@ index ae21eb84d..8f35f71f8 100644 private int g; public PathfinderGoalSelector(MethodProfiler methodprofiler) { -@@ -24,6 +24,20 @@ public class PathfinderGoalSelector { +@@ -25,6 +25,20 @@ public class PathfinderGoalSelector { this.b.add(new PathfinderGoalSelector.PathfinderGoalSelectorItem(i, pathfindergoal)); } @@ -385,10 +387,10 @@ index 09df00e94..d08ef3fe1 100644 { isActive = false; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 87bc8e2d9..06d84a0b6 100644 +index d3c2abc39..1d222eaff 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -144,12 +144,14 @@ public class SpigotWorldConfig +@@ -150,12 +150,14 @@ public class SpigotWorldConfig public int animalActivationRange = 32; public int monsterActivationRange = 32; public int miscActivationRange = 16; @@ -404,5 +406,5 @@ index 87bc8e2d9..06d84a0b6 100644 log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange + " / Tiv " + tickInactiveVillagers ); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0116-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0116-Optimize-UserCache-Thread-Safe.patch index 3a138fc6a..f1f1c922b 100644 --- a/Spigot-Server-Patches/0116-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0116-Optimize-UserCache-Thread-Safe.patch @@ -1,4 +1,4 @@ -From d128b3896e20ff9f497284c2686617631ea0f874 Mon Sep 17 00:00:00 2001 +From f7f5a84a18d147fe939616f32507e91ee572ac68 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 1c09dded9..edf72fbec 100644 +index 3ff271869..7710962ce 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -691,7 +691,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -686,7 +686,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // Spigot start if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { LOGGER.info("Saving usercache.json"); @@ -23,10 +23,10 @@ index 1c09dded9..edf72fbec 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index d1197b959..51c2c5dd7 100644 +index f782ecb82..65d230d45 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 { +@@ -108,7 +108,7 @@ public class UserCache { this.a(gameprofile, (Date) null); } @@ -35,9 +35,9 @@ index d1197b959..51c2c5dd7 100644 UUID uuid = gameprofile.getId(); if (date == null) { -@@ -122,8 +122,9 @@ public class UserCache { +@@ -121,8 +121,9 @@ public class UserCache { - UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); // CraftBukkit - decompile error + UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); - if (this.e.containsKey(uuid)) { + //if (this.e.containsKey(uuid)) { // Paper @@ -46,7 +46,7 @@ index d1197b959..51c2c5dd7 100644 this.d.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT)); this.f.remove(gameprofile); -@@ -136,7 +137,7 @@ public class UserCache { +@@ -135,7 +136,7 @@ public class UserCache { } @Nullable @@ -55,7 +55,7 @@ index d1197b959..51c2c5dd7 100644 String s1 = s.toLowerCase(Locale.ROOT); UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(s1); -@@ -165,8 +166,9 @@ public class UserCache { +@@ -164,8 +165,9 @@ public class UserCache { return usercache_usercacheentry == null ? null : usercache_usercacheentry.a(); } @@ -66,7 +66,7 @@ index d1197b959..51c2c5dd7 100644 UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.e.get(uuid); return usercache_usercacheentry == null ? null : usercache_usercacheentry.a(); -@@ -221,8 +223,15 @@ public class UserCache { +@@ -220,8 +222,15 @@ public class UserCache { } @@ -82,7 +82,7 @@ index d1197b959..51c2c5dd7 100644 BufferedWriter bufferedwriter = null; try { -@@ -236,6 +245,14 @@ public class UserCache { +@@ -235,6 +244,14 @@ public class UserCache { } finally { IOUtils.closeQuietly(bufferedwriter); } @@ -98,5 +98,5 @@ index d1197b959..51c2c5dd7 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0117-Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/0117-Avoid-blocking-on-Network-Manager-creation.patch index a920ca0ca..b14a7d441 100644 --- a/Spigot-Server-Patches/0117-Avoid-blocking-on-Network-Manager-creation.patch +++ b/Spigot-Server-Patches/0117-Avoid-blocking-on-Network-Manager-creation.patch @@ -1,4 +1,4 @@ -From 0e18207b7777c6f0c30703a5bf999b373c5e831e Mon Sep 17 00:00:00 2001 +From 46e4b64e9955a014abcd9743dd0b22ebd872c2a6 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,10 +6,10 @@ 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 9cff011dac..f04ce2fb03 100644 +index 41ff55e9e..baabcd19c 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 { +@@ -39,6 +39,15 @@ public class ServerConnection { public volatile boolean c; private final List f = Collections.synchronizedList(Lists.newArrayList()); private final List g = Collections.synchronizedList(Lists.newArrayList()); @@ -25,7 +25,7 @@ index 9cff011dac..f04ce2fb03 100644 public ServerConnection(MinecraftServer minecraftserver) { this.e = minecraftserver; -@@ -74,7 +83,7 @@ public class ServerConnection { +@@ -73,7 +82,7 @@ public class ServerConnection { channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(ServerConnection.this)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder(EnumProtocolDirection.SERVERBOUND)).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder(EnumProtocolDirection.CLIENTBOUND)); NetworkManager networkmanager = new NetworkManager(EnumProtocolDirection.SERVERBOUND); @@ -34,7 +34,7 @@ index 9cff011dac..f04ce2fb03 100644 channel.pipeline().addLast("packet_handler", networkmanager); networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager)); } -@@ -103,6 +112,7 @@ public class ServerConnection { +@@ -102,6 +111,7 @@ public class ServerConnection { synchronized (this.g) { // Spigot Start @@ -43,5 +43,5 @@ index 9cff011dac..f04ce2fb03 100644 if ( org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0 ) { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0118-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0118-Optional-TNT-doesn-t-move-in-water.patch index f4a1b87cf..d366b58b1 100644 --- a/Spigot-Server-Patches/0118-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0118-Optional-TNT-doesn-t-move-in-water.patch @@ -1,4 +1,4 @@ -From b53f5958e3068cd2af5506553515162a3b4d96d9 Mon Sep 17 00:00:00 2001 +From 7fb2a84b0018e12e30e3700bdaaa688f9bed0c33 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 @@ -32,10 +32,10 @@ index 00f0451ef..42d951554 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9682b0a01..876ae1639 100644 +index 192f0aedd..0004c134a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1173,6 +1173,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1171,6 +1171,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean aq() { @@ -48,7 +48,7 @@ index 9682b0a01..876ae1639 100644 return this.isInWater() || this.q(); } -@@ -2724,6 +2730,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2722,6 +2728,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean bw() { @@ -115,5 +115,5 @@ index 2c28633c4..e5170b4e6 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0123-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0123-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 75b70acb6..8905d93e8 100644 --- a/Spigot-Server-Patches/0123-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0123-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -1,4 +1,4 @@ -From ec6342a78de5a84e7a81431fcdbf37db320b27c8 Mon Sep 17 00:00:00 2001 +From b8e43d91f2413961dbec06e5545224fce3aade80 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 @@ -43,10 +43,10 @@ index 42d951554..d8f258105 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f6bfd6ece..7380c4386 100644 +index 0421f8f95..ddccdc939 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -41,6 +41,7 @@ public class Chunk implements IChunkAccess { +@@ -40,6 +40,7 @@ public class Chunk implements IChunkAccess { private boolean i;public boolean isLoaded() { return i; } // Paper - OBFHELPER public final World world; public final Map heightMap; @@ -75,10 +75,10 @@ index 8b3738c8f..2021c0d02 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1d08ec37f..516a583a8 100644 +index fd68f06fe..ff6f7596c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -308,6 +308,19 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -304,6 +304,19 @@ public class ChunkProviderServer implements IChunkProvider { } activityAccountant.endActivity(); // Spigot } @@ -99,13 +99,13 @@ index 1d08ec37f..516a583a8 100644 this.chunkScheduler.a(booleansupplier); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 1d672eaa1..5497a458d 100644 +index e47aae2f8..b9d90c4fb 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -26,8 +26,23 @@ public class PlayerChunk { - ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); - this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); +@@ -29,8 +29,23 @@ public class PlayerChunk { + + chunkproviderserver.a(i, j); + this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); + markChunkUsed(); // Paper - delay chunk unloads } @@ -126,7 +126,7 @@ index 1d672eaa1..5497a458d 100644 public ChunkCoordIntPair a() { return this.location; } -@@ -38,6 +53,8 @@ public class PlayerChunk { +@@ -41,6 +56,8 @@ public class PlayerChunk { } else { if (this.players.isEmpty()) { this.i = this.playerChunkMap.getWorld().getTime(); @@ -135,7 +135,7 @@ index 1d672eaa1..5497a458d 100644 } this.players.add(entityplayer); -@@ -56,6 +73,8 @@ public class PlayerChunk { +@@ -59,6 +76,8 @@ public class PlayerChunk { this.players.remove(entityplayer); if (this.players.isEmpty()) { @@ -144,7 +144,7 @@ index 1d672eaa1..5497a458d 100644 this.playerChunkMap.b(this); } -@@ -67,6 +86,7 @@ public class PlayerChunk { +@@ -70,6 +89,7 @@ public class PlayerChunk { return true; } else { this.chunk = this.playerChunkMap.getWorld().getChunkProvider().getChunkAt(this.location.x, this.location.z, true, flag); @@ -153,10 +153,10 @@ index 1d672eaa1..5497a458d 100644 } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3d17ad646..c3ac66d35 100644 +index 206457650..ab4f3b722 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -456,7 +456,13 @@ public class PlayerChunkMap { +@@ -452,7 +452,13 @@ public class PlayerChunkMap { Chunk chunk = playerchunk.f(); if (chunk != null) { @@ -172,10 +172,10 @@ index 3d17ad646..c3ac66d35 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c484493b0..9a0e5342d 100644 +index b51415e9b..1ffa3f0aa 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1292,7 +1292,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1287,7 +1287,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (!tileentity.x() && tileentity.hasWorld()) { BlockPosition blockposition = tileentity.getPosition(); @@ -191,10 +191,10 @@ index c484493b0..9a0e5342d 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 ff1ccbd64..3e71cdcdc 100644 +index 274e8626d..cecdc5388 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1750,7 +1750,7 @@ public class CraftWorld implements World { +@@ -1772,7 +1772,7 @@ public class CraftWorld implements World { ChunkProviderServer cps = world.getChunkProvider(); for (net.minecraft.server.Chunk chunk : cps.chunks.values()) { // If in use, skip it diff --git a/Spigot-Server-Patches/0124-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0124-Fix-Double-World-Add-issues.patch index 3740a49fa..6df0b0ca3 100644 --- a/Spigot-Server-Patches/0124-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0124-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From af2828a58a4f89566cc230a26042e7811491def3 Mon Sep 17 00:00:00 2001 +From ad615dea2d04464cdc2f32a7a7cf5b7ffdf3ca20 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 3b39b5472..6093ae408 100644 +index c0785eea0..030461026 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -1052,7 +1052,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -1035,7 +1035,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public static void a(Entity entity, GeneratorAccess generatoraccess, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { @@ -21,10 +21,10 @@ index 3b39b5472..6093ae408 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 6f672aa22..0d04b14cf 100644 +index 1ffa3f0aa..3d43f2937 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -992,6 +992,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -987,6 +987,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot @@ -33,5 +33,5 @@ index 6f672aa22..0d04b14cf 100644 return false; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0125-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0125-Fix-Old-Sign-Conversion.patch index 80fffc0e0..83302beb0 100644 --- a/Spigot-Server-Patches/0125-Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/0125-Fix-Old-Sign-Conversion.patch @@ -1,4 +1,4 @@ -From 01f61b9f5d052ed0b5129a941d189fafb8fefcf1 Mon Sep 17 00:00:00 2001 +From 8940a41d893f9fb606b307aea8d348faa7dee34c 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,23 +9,23 @@ 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 987d944dbd..5f6fb44ffa 100644 +index 83db94c4a..dd635292e 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java -@@ -190,9 +190,11 @@ public class DefinedStructure { - definedstructure$blockinfo1.c.setInt("x", blockposition1.getX()); - definedstructure$blockinfo1.c.setInt("y", blockposition1.getY()); - definedstructure$blockinfo1.c.setInt("z", blockposition1.getZ()); -+ tileentity2.isLoadingStructure = true; // Paper - tileentity2.load(definedstructure$blockinfo1.c); - tileentity2.a(definedstructureinfo.b()); - tileentity2.a(definedstructureinfo.c()); -+ tileentity2.isLoadingStructure = false; // Paper +@@ -215,9 +215,11 @@ public class DefinedStructure { + definedstructure_blockinfo1.c.setInt("x", blockposition1.getX()); + definedstructure_blockinfo1.c.setInt("y", blockposition1.getY()); + definedstructure_blockinfo1.c.setInt("z", blockposition1.getZ()); ++ tileentity.isLoadingStructure = true; // Paper + tileentity.load(definedstructure_blockinfo1.c); + tileentity.a(definedstructureinfo.b()); + tileentity.a(definedstructureinfo.c()); ++ tileentity.isLoadingStructure = false; // Paper } } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index c5212417c6..b3c5766a27 100644 +index c5212417c..b3c5766a2 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 @@ -37,7 +37,7 @@ index c5212417c6..b3c5766a27 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 00b6a3c16d..20dc3f272c 100644 +index 31a9d4572..458d1561d 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -50,13 +50,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -58,5 +58,5 @@ index 00b6a3c16d..20dc3f272c 100644 if (this.world instanceof WorldServer) { try { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0126-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0126-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index b2487cda2..cb46a6c14 100644 --- a/Spigot-Server-Patches/0126-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/0126-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -1,14 +1,14 @@ -From d3d680ce20a615960678a5de765cf2eff66bf3d1 Mon Sep 17 00:00:00 2001 +From 509571b6d0a2ea133f1442e3b8262fb6281fd7df 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 f8b7d695c6..a47a51a412 100644 +index 65d230d45..9bf2521be 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 { +@@ -86,7 +86,7 @@ public class UserCache { }; gameprofilerepository.findProfilesByNames(new String[] { s}, Agent.MINECRAFT, profilelookupcallback); @@ -18,5 +18,5 @@ index f8b7d695c6..a47a51a412 100644 GameProfile gameprofile = new GameProfile(uuid, s); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0127-More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/0127-More-informative-vehicle-moved-wrongly-message.patch index 8b5639546..be507ea12 100644 --- a/Spigot-Server-Patches/0127-More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/0127-More-informative-vehicle-moved-wrongly-message.patch @@ -1,14 +1,14 @@ -From 6a0d67ee8558b708ee01c418fbcdefca8ee73638 Mon Sep 17 00:00:00 2001 +From 6b9fde930c004144814668d3b2747506a64e5a8e 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 ba690d5bd0..1dce60f8cc 100644 +index 51ba4a804..088c0147a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -356,7 +356,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -355,7 +355,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot flag1 = true; @@ -18,5 +18,5 @@ index ba690d5bd0..1dce60f8cc 100644 Location curPos = this.getPlayer().getLocation(); // Spigot -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0128-Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/0128-Re-track-players-that-dismount-from-other-players.patch index 279d60846..357809cd1 100644 --- a/Spigot-Server-Patches/0128-Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/0128-Re-track-players-that-dismount-from-other-players.patch @@ -1,14 +1,14 @@ -From 3b30ec48c1e132f5af6ecde10b350a8deb9fb504 Mon Sep 17 00:00:00 2001 +From b70b6f04bb1093dd3642d0571707c4fd0d7488d5 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 1cafad6bb6..de452e23ca 100644 +index aad5a3527..749e41aed 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -752,6 +752,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -754,6 +754,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (entity1 != entity && this.playerConnection != null) { this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch); } @@ -23,5 +23,5 @@ index 1cafad6bb6..de452e23ca 100644 } -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0129-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0129-Add-setting-for-proxy-online-mode-status.patch index da3b1b0a9..0c7ded68d 100644 --- a/Spigot-Server-Patches/0129-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0129-Add-setting-for-proxy-online-mode-status.patch @@ -1,4 +1,4 @@ -From d0b00a2f0cdb9e94da1f1942cf8b9a9b4ec403da Mon Sep 17 00:00:00 2001 +From f0eae946258127b451f577122aa6aa553651fa23 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 @@ -31,10 +31,10 @@ index e10055b7d..2ae623e7d 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 5977d3b48..c3f3ae03a 100644 +index bf67dbf54..dcaba3c40 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 { +@@ -58,7 +58,8 @@ public class NameReferencingFileConverter { return new String[i]; }); @@ -59,5 +59,5 @@ index c655d51ac..f90b708e4 100644 profile = console.getUserCache().getProfile( name ); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0130-Optimise-BlockStateEnum-hashCode-and-equals.patch b/Spigot-Server-Patches/0130-Optimise-BlockStateEnum-hashCode-and-equals.patch index 2d246d108..3a1285d02 100644 --- a/Spigot-Server-Patches/0130-Optimise-BlockStateEnum-hashCode-and-equals.patch +++ b/Spigot-Server-Patches/0130-Optimise-BlockStateEnum-hashCode-and-equals.patch @@ -1,22 +1,22 @@ -From 454a4b007f6acbd522312c5dec9cc03b81ed396c Mon Sep 17 00:00:00 2001 +From 7064b8b9f50b18bbd81ed129577c4944104ad7d9 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 73623a21c5..9d8a03be8d 100644 +index 986b9ccea..259da0aa0 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java -@@ -8,6 +8,7 @@ import java.util.Arrays; - import java.util.Collection; +@@ -9,6 +9,7 @@ import java.util.Collection; + import java.util.Iterator; import java.util.Map; import java.util.Optional; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Predicate; import java.util.stream.Collectors; -@@ -15,11 +16,17 @@ public class BlockStateEnum & INamable> extends BlockState +@@ -17,6 +18,11 @@ public class BlockStateEnum & INamable> extends BlockState private final ImmutableSet a; private final Map b = Maps.newHashMap(); @@ -28,15 +28,8 @@ index 73623a21c5..9d8a03be8d 100644 protected BlockStateEnum(String s, Class oclass, Collection collection) { super(s, oclass); this.a = ImmutableSet.copyOf(collection); - -- for(Enum oenum : collection) { -+ this.hashCode = hashId.getAndIncrement() * 61; // Paper -+ for(T oenum : collection) { // Paper - decompile fix - String s1 = ((INamable)oenum).getName(); - if (this.b.containsKey(s1)) { - throw new IllegalArgumentException("Multiple values have the same name '" + s1 + "'"); -@@ -42,22 +49,14 @@ public class BlockStateEnum & INamable> extends BlockState - return ((INamable)oenum).getName(); +@@ -47,24 +53,14 @@ public class BlockStateEnum & INamable> extends BlockState + return ((INamable) t0).getName(); } + @Override // Paper start - override equals as BlockStateEnum is a singleton @@ -44,17 +37,19 @@ index 73623a21c5..9d8a03be8d 100644 - if (this == object) { - return true; - } else if (object instanceof BlockStateEnum && super.equals(object)) { -- BlockStateEnum blockstateenum1 = (BlockStateEnum)object; -- return this.a.equals(blockstateenum1.a) && this.b.equals(blockstateenum1.b); +- BlockStateEnum blockstateenum = (BlockStateEnum) object; +- +- return this.a.equals(blockstateenum.a) && this.b.equals(blockstateenum.b); - } else { - return false; - } -+ return this == object; ++ return this == object; + // Paper end - override equals as BlockStateEnum is a singleton } public int c() { - int i = super.c(); +- - i = 31 * i + this.a.hashCode(); - i = 31 * i + this.b.hashCode(); - return i; @@ -63,5 +58,5 @@ index 73623a21c5..9d8a03be8d 100644 public static & INamable> BlockStateEnum of(String s, Class oclass) { -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0132-Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/0132-Fix-AIOOBE-in-inventory-handling.patch index 6e4a5a54f..68469f60e 100644 --- a/Spigot-Server-Patches/0132-Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/0132-Fix-AIOOBE-in-inventory-handling.patch @@ -1,11 +1,11 @@ -From 909622fd5e599b84e0e83d593097fd87d1b2f223 Mon Sep 17 00:00:00 2001 +From bef8ebead74f5a70f28d5415fe77bb061b0cb775 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 3ff82f71b..1c881e7a7 100644 +index 6c0d105db..5874098c9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2086,7 +2086,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -18,5 +18,5 @@ index 3ff82f71b..1c881e7a7 100644 } else { Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.c()); -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0133-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0133-Configurable-packet-in-spam-threshold.patch index ba16eee6b..eaf2b8a35 100644 --- a/Spigot-Server-Patches/0133-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0133-Configurable-packet-in-spam-threshold.patch @@ -1,11 +1,11 @@ -From df1e8d3730c982c657f99cc6abb69a48c2f0c77e Mon Sep 17 00:00:00 2001 +From e5a3132bd825a7a3a89770dd9afb537e6fba7576 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 1c1ef2dc2..4c0a9f18c 100644 +index 2ae623e7d..f5bd2245a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -253,4 +253,13 @@ public class PaperConfig { @@ -23,10 +23,10 @@ index 1c1ef2dc2..4c0a9f18c 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1c881e7a7..a1a6703f6 100644 +index 5715d7ba8..c31f84a84 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1194,13 +1194,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1193,13 +1193,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; @@ -44,5 +44,5 @@ index 1c881e7a7..a1a6703f6 100644 limitedPackets = 0; return true; -- -2.19.2 +2.20.1 diff --git a/Spigot-Server-Patches/0134-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0134-Configurable-flying-kick-messages.patch index 9d9a515c1..9cfc9a80d 100644 --- a/Spigot-Server-Patches/0134-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0134-Configurable-flying-kick-messages.patch @@ -1,11 +1,11 @@ -From cc2a6e2529e1158667ebe8d690cc8be63c0f5bec Mon Sep 17 00:00:00 2001 +From 8f02577907e387752249570e682b65e4e7a8f146 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 4c0a9f18c..c278ac98d 100644 +index f5bd2245a..51b0dd972 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -262,4 +262,11 @@ public class PaperConfig { @@ -21,10 +21,10 @@ index 4c0a9f18c..c278ac98d 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 598b747ec..552f1355c 100644 +index c31f84a84..f2686f7cb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -145,7 +145,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -144,7 +144,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (this.B) { if (++this.C > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); @@ -33,7 +33,7 @@ index 598b747ec..552f1355c 100644 return; } } else { -@@ -164,7 +164,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -163,7 +163,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (this.D && this.player.getRootVehicle().bO() == this.player) { if (++this.E > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString()); @@ -43,5 +43,5 @@ index 598b747ec..552f1355c 100644 } } else { -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0135-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0135-Auto-Save-Improvements.patch index c21e3fc25..5345949f9 100644 --- a/Spigot-Server-Patches/0135-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0135-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From 64fefafc70b954dc364db2d05e3d7cf101ed823c Mon Sep 17 00:00:00 2001 +From 8d8d26a043ca64b9af562833a593222b20caec71 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:16:39 -0400 Subject: [PATCH] Auto Save Improvements @@ -64,10 +64,10 @@ index d8f258105..47bfb5b62 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 86bdd6e7f..1a8317256 100644 +index ddccdc939..0d70ce797 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -54,9 +54,9 @@ public class Chunk implements IChunkAccess { +@@ -53,9 +53,9 @@ public class Chunk implements IChunkAccess { private final TickList s; private final TickList t; private boolean u; @@ -79,7 +79,7 @@ index 86bdd6e7f..1a8317256 100644 private int y; private long z; private int A; -@@ -1072,11 +1072,11 @@ public class Chunk implements IChunkAccess { +@@ -1071,11 +1071,11 @@ public class Chunk implements IChunkAccess { if (this.v && this.world.getTime() != this.lastSaved || this.x) { return true; } @@ -96,10 +96,10 @@ index 86bdd6e7f..1a8317256 100644 public boolean isEmpty() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 516a583a8..27bed54d2 100644 +index ff6f7596c..91533f8ac 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -243,7 +243,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -240,7 +240,7 @@ public class ChunkProviderServer implements IChunkProvider { this.saveChunk(chunk, false); // Spigot chunk.a(false); ++i; @@ -109,10 +109,10 @@ index 516a583a8..27bed54d2 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 77c23884f..52dc6d83b 100644 +index 749e41aed..97714be6d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -37,6 +37,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -34,6 +34,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private static final Logger cc = LogManager.getLogger(); public String locale = null; // CraftBukkit - lowercase // Paper - default to null @@ -121,10 +121,10 @@ index 77c23884f..52dc6d83b 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 edf72fbec..dacb372a5 100644 +index 7710962ce..f09d358e2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -148,6 +148,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -143,6 +143,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 @@ -132,7 +132,7 @@ index edf72fbec..dacb372a5 100644 public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -942,22 +943,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -937,22 +938,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.m.b().a(agameprofile); } @@ -168,10 +168,10 @@ index edf72fbec..dacb372a5 100644 this.methodProfiler.enter("snooper"); if (getSnooperEnabled() && !this.snooper.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 3e4ca288d..e28485f18 100644 +index 86aa0c57a..2c3ed3723 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -342,6 +342,7 @@ public abstract class PlayerList { +@@ -341,6 +341,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -179,7 +179,7 @@ index 3e4ca288d..e28485f18 100644 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -1208,13 +1209,25 @@ public abstract class PlayerList { +@@ -1207,13 +1208,25 @@ public abstract class PlayerList { } @@ -207,10 +207,10 @@ index 3e4ca288d..e28485f18 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 b5983957b..7a765cb7b 100644 +index fa7466d64..48d70624c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -873,8 +873,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -856,8 +856,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { ChunkProviderServer chunkproviderserver = this.getChunkProvider(); if (chunkproviderserver.d()) { @@ -221,7 +221,7 @@ index b5983957b..7a765cb7b 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); } -@@ -883,6 +884,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -866,6 +867,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (iprogressupdate != null) { iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); } @@ -230,5 +230,5 @@ index b5983957b..7a765cb7b 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.a(flag); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0136-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0136-Chunk-registration-fixes.patch index b2f5bbf99..019218174 100644 --- a/Spigot-Server-Patches/0136-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0136-Chunk-registration-fixes.patch @@ -1,4 +1,4 @@ -From 95cbe99b8731468c68949457a58ff6d966608555 Mon Sep 17 00:00:00 2001 +From 9db121d4d39ef91745ee6901e0353950ff6dae5e 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 0d04b14cf..b17a8d60c 100644 +index 3d43f2937..b07229875 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1472,7 +1472,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1467,7 +1467,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } i = MathHelper.floor(entity.locX / 16.0D); @@ -21,5 +21,5 @@ index 0d04b14cf..b17a8d60c 100644 if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0138-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0138-Auto-fix-bad-Y-levels-on-player-login.patch index 598c6ad60..6057ff84b 100644 --- a/Spigot-Server-Patches/0138-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0138-Auto-fix-bad-Y-levels-on-player-login.patch @@ -1,4 +1,4 @@ -From d732d572fb35769908c123d0f61f0fc0d37db712 Mon Sep 17 00:00:00 2001 +From 2f90affa66b1be92982860f5247fa14253b7b29d 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,10 +6,10 @@ 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 8f4a1626a1..c33c6f480c 100644 +index 97714be6d..742385ad1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -190,6 +190,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -187,6 +187,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); @@ -18,5 +18,5 @@ index 8f4a1626a1..c33c6f480c 100644 if (this.bK().getForceGamemode()) { this.playerInteractManager.setGameMode(this.bK().getGamemode()); -- -2.19.1 +2.20.1 diff --git a/Spigot-Server-Patches/0139-Disable-Vanilla-Chunk-GC.patch b/Spigot-Server-Patches/0139-Disable-Vanilla-Chunk-GC.patch index 98dd91235..9b8dea1ea 100644 --- a/Spigot-Server-Patches/0139-Disable-Vanilla-Chunk-GC.patch +++ b/Spigot-Server-Patches/0139-Disable-Vanilla-Chunk-GC.patch @@ -1,4 +1,4 @@ -From bc73991ca431d8103066de1681288a381527e1f5 Mon Sep 17 00:00:00 2001 +From 66d518cbb0f9e226707ef7d0fbe875e3c7b999a1 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,18 +6,18 @@ 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 7a765cb7b..a8675b8c6 100644 +index 48d70624c..b17069e41 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -890,6 +890,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -873,6 +873,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { chunkproviderserver.a(flag); timings.worldSaveChunks.stopTiming(); // Paper // CraftBukkit - ArrayList -> Collection + /* //Paper start - disable vanilla chunk GC - java.util.Collection arraylist = chunkproviderserver.a(); - Iterator iterator = arraylist.iterator(); + java.util.Collection list = chunkproviderserver.a(); + Iterator iterator = list.iterator(); -@@ -899,7 +900,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -882,7 +883,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) { chunkproviderserver.unload(chunk); } @@ -28,5 +28,5 @@ index 7a765cb7b..a8675b8c6 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0140-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0140-Option-to-remove-corrupt-tile-entities.patch index 017ab1b68..8a7005163 100644 --- a/Spigot-Server-Patches/0140-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0140-Option-to-remove-corrupt-tile-entities.patch @@ -1,4 +1,4 @@ -From 2c00cec203c7d519a368124a199e4f9719315956 Mon Sep 17 00:00:00 2001 +From 984982d70b5d3b3fdb0b5c930d8d4a24b09628e9 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 @@ -19,10 +19,10 @@ index 47bfb5b62..e8417cb2e 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1a8317256..9d3234c1c 100644 +index 0d70ce797..6150b56e0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -844,6 +844,12 @@ public class Chunk implements IChunkAccess { +@@ -843,6 +843,12 @@ public class Chunk implements IChunkAccess { "Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); @@ -35,7 +35,7 @@ index 1a8317256..9d3234c1c 100644 // Paper end // CraftBukkit end } -@@ -853,6 +859,7 @@ public class Chunk implements IChunkAccess { +@@ -852,6 +858,7 @@ public class Chunk implements IChunkAccess { this.h.put(new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")), nbttagcompound); } @@ -44,5 +44,5 @@ index 1a8317256..9d3234c1c 100644 if (this.i) { TileEntity tileentity = (TileEntity) this.tileEntities.remove(blockposition); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0141-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0141-Add-EntityZapEvent.patch index 81549dcf3..15d614b40 100644 --- a/Spigot-Server-Patches/0141-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0141-Add-EntityZapEvent.patch @@ -1,4 +1,4 @@ -From 76212749b31aa78325f5a0500a66dc67830d247b Mon Sep 17 00:00:00 2001 +From 247e29a86fe7e1a5bdf52570faf8097bc030ca1b Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:30 -0700 Subject: [PATCH] Add EntityZapEvent @@ -22,10 +22,10 @@ index 7ef67350a..9dc2d8be2 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 d2572b3e1..ddf170180 100644 +index f8e05b75d..213d0b18c 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -607,6 +607,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -606,6 +606,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { if (!this.world.isClientSide && !this.dead) { EntityWitch entitywitch = new EntityWitch(this.world); @@ -39,10 +39,10 @@ index d2572b3e1..ddf170180 100644 entitywitch.prepare(this.world.getDamageScaler(new BlockPosition(entitywitch)), (GroupDataEntity) null, (NBTTagCompound) null); entitywitch.setNoAI(this.isNoAI()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 35992c4ba..075e6f04e 100644 +index 4d3bfd69e..b8bf1fbef 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -851,6 +851,14 @@ public class CraftEventFactory { +@@ -864,6 +864,14 @@ public class CraftEventFactory { return event; } @@ -58,5 +58,5 @@ index 35992c4ba..075e6f04e 100644 HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power); horse.getBukkitEntity().getServer().getPluginManager().callEvent(event); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0142-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0142-Don-t-load-Chunks-from-Hoppers-and-other-things.patch index 66000106e..e7e833673 100644 --- a/Spigot-Server-Patches/0142-Don-t-load-Chunks-from-Hoppers-and-other-things.patch +++ b/Spigot-Server-Patches/0142-Don-t-load-Chunks-from-Hoppers-and-other-things.patch @@ -1,4 +1,4 @@ -From 6e156b6791b9e843c2e7fe9a06b05f55cd793119 Mon Sep 17 00:00:00 2001 +From 4841e8ebb7cc1d174aff030bc4c1b5fe2692e1a0 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,11 +13,11 @@ 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 27e6d2b5f2..b3882930ea 100644 +index e94786138..c61721bc3 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -181,7 +181,12 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC - return (ITileInventory)object; +@@ -193,7 +193,12 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC + return (ITileInventory) object; } else { BlockPosition blockposition1 = blockposition.shift(k(iblockdata)); - IBlockData iblockdata1 = world.getType(blockposition1); @@ -27,9 +27,9 @@ index 27e6d2b5f2..b3882930ea 100644 + return null; + } + // Paper end + if (iblockdata1.getBlock() == this) { - BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType)iblockdata1.get(b); - if (blockpropertychesttype1 != BlockPropertyChestType.SINGLE && blockpropertychesttype != blockpropertychesttype1 && iblockdata1.get(FACING) == iblockdata.get(FACING)) { + BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType) iblockdata1.get(BlockChest.b); -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0143-Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/0143-Prevent-Auto-Save-if-Save-Queue-is-full.patch index 980920171..885e7e93c 100644 --- a/Spigot-Server-Patches/0143-Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/0143-Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -1,4 +1,4 @@ -From 7849382101c9a10a3078ff6801ebf66b81d8bb1d Mon Sep 17 00:00:00 2001 +From 008135e17f9a4a70e8cbc0593fd9c9cdfebd8f0a 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 @@ -23,10 +23,10 @@ index e8417cb2e..de59f4ce0 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 27bed54d2..9990cdbcd 100644 +index 91533f8ac..8e4c1b39a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -236,6 +236,13 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -233,6 +233,13 @@ public class ChunkProviderServer implements IChunkProvider { synchronized (this.chunkLoader) { ObjectIterator objectiterator = this.chunks.values().iterator(); @@ -41,10 +41,10 @@ index 27bed54d2..9990cdbcd 100644 Chunk chunk = (Chunk) objectiterator.next(); diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 6093ae408..f17869d4d 100644 +index 030461026..6909b9e45 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -152,6 +152,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -150,6 +150,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } @@ -54,5 +54,5 @@ index 6093ae408..f17869d4d 100644 @Nullable public Chunk a(GeneratorAccess generatoraccess, int i, int j, Consumer consumer) throws IOException { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0144-Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/0144-Chunk-Save-Stats-Debug-Option.patch index 23e6f58ca..b2f86175f 100644 --- a/Spigot-Server-Patches/0144-Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/0144-Chunk-Save-Stats-Debug-Option.patch @@ -1,4 +1,4 @@ -From 4e6ed39f4a404bdd8ed37ebb72c38d80ce475e6b Mon Sep 17 00:00:00 2001 +From 946777dc075869f97b5854d4953ec402cdb3a194 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,10 +8,10 @@ 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 9990cdbcd..b1c4eb4ae 100644 +index 8e4c1b39a..ed747bc3c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -30,6 +30,11 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -28,6 +28,11 @@ public class ChunkProviderServer implements IChunkProvider { public final LongSet unloadQueue = new LongOpenHashSet(); public final ChunkGenerator chunkGenerator; public final IChunkLoader chunkLoader; @@ -23,7 +23,7 @@ index 9990cdbcd..b1c4eb4ae 100644 public final Long2ObjectMap chunks = Long2ObjectMaps.synchronize(new ChunkMap(8192)); private Chunk lastChunk; private final ChunkTaskScheduler chunkScheduler; -@@ -239,6 +244,29 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -236,6 +241,29 @@ public class ChunkProviderServer implements IChunkProvider { // Paper start final ChunkRegionLoader chunkLoader = (ChunkRegionLoader) world.getChunkProvider().chunkLoader; final int queueSize = chunkLoader.getQueueSize(); @@ -54,10 +54,10 @@ index 9990cdbcd..b1c4eb4ae 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index f17869d4d..8eecdbd33 100644 +index 6909b9e45..48230251d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -152,7 +152,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -150,7 +150,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } @@ -72,7 +72,7 @@ index f17869d4d..8eecdbd33 100644 // CraftBukkit start - Add async variant, provide compatibility @Nullable -@@ -344,6 +350,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -342,6 +348,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier nbttagcompound) { // Spigot this.saveMap.put(chunkcoordintpair.asLong(), nbttagcompound); // Paper queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements @@ -80,7 +80,7 @@ index f17869d4d..8eecdbd33 100644 FileIOThread.a().a(this); } -@@ -371,6 +378,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -369,6 +376,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { // Paper end ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements Supplier nbttagcompound = chunk.compoundSupplier; // Spigot // Paper @@ -89,5 +89,5 @@ index f17869d4d..8eecdbd33 100644 if (nbttagcompound == null) { return true; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0146-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0146-Cache-user-authenticator-threads.patch index 0849021e4..66ef0d84f 100644 --- a/Spigot-Server-Patches/0146-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0146-Cache-user-authenticator-threads.patch @@ -1,14 +1,14 @@ -From 36b4f942b750fbc28be7fa74ea33510ca56b7222 Mon Sep 17 00:00:00 2001 +From 9f6dd6a0697949d220cb8ebe4d3b7f1c7a3aec94 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 dea401c924..19ac21e385 100644 +index 0f6ac493f..e901c066a 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 { +@@ -92,6 +92,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { } @@ -21,7 +21,7 @@ index dea401c924..19ac21e385 100644 // Spigot start public void initUUID() { -@@ -169,8 +175,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -168,8 +174,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.E().getPublic(), this.e)); } else { // Spigot start @@ -32,7 +32,7 @@ index dea401c924..19ac21e385 100644 @Override public void run() { try { -@@ -181,7 +187,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -180,7 +186,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 dea401c924..19ac21e385 100644 // Spigot end } -@@ -197,7 +204,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -196,7 +203,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 dea401c924..19ac21e385 100644 public void run() { GameProfile gameprofile = LoginListener.this.i; -@@ -244,10 +252,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -243,10 +251,8 @@ public class LoginListener implements PacketLoginInListener, ITickable { return LoginListener.this.server.S() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; } @@ -66,5 +66,5 @@ index dea401c924..19ac21e385 100644 } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0147-Optimise-removeQueue.patch b/Spigot-Server-Patches/0147-Optimise-removeQueue.patch index c41df7e0e..218c76348 100644 --- a/Spigot-Server-Patches/0147-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0147-Optimise-removeQueue.patch @@ -1,25 +1,24 @@ -From 8dc52859943820f03a34c21f12b64d68fe78f325 Mon Sep 17 00:00:00 2001 +From 042353c45f554897d7da678fc7773b646125c0e9 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 13c538043..c07332e1b 100644 +index 742385ad1..a37af03d2 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; +@@ -4,7 +4,9 @@ import com.google.common.collect.Lists; + import com.mojang.authlib.GameProfile; import io.netty.buffer.Unpooled; import io.netty.util.concurrent.Future; - import io.netty.util.concurrent.GenericFutureListener; +import java.util.ArrayDeque; // Paper - import java.util.ArrayList; import java.util.Collection; +import java.util.Deque; // Paper import java.util.Iterator; import java.util.List; import java.util.Random; -@@ -43,7 +45,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -40,7 +42,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final PlayerInteractManager playerInteractManager; public double d; public double e; @@ -28,12 +27,12 @@ index 13c538043..c07332e1b 100644 private final AdvancementDataPlayer cf; private final ServerStatisticManager cg; private float ch = Float.MIN_VALUE; -@@ -352,13 +354,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -349,13 +351,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; -- Iterator iterator = this.removeQueue.iterator(); -+ //Iterator iterator = this.removeQueue.iterator(); // Paper +- Iterator iterator = this.removeQueue.iterator(); ++ //Iterator iterator = this.removeQueue.iterator(); // Paper int j = 0; - while (iterator.hasNext() && j < i) { @@ -51,7 +50,7 @@ index 13c538043..c07332e1b 100644 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1138,7 +1147,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1140,7 +1149,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit @@ -68,5 +67,5 @@ index 13c538043..c07332e1b 100644 this.cC = entityplayer.cC; this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0149-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0149-Add-source-to-PlayerExpChangeEvent.patch index de8093cdf..eb6f088a7 100644 --- a/Spigot-Server-Patches/0149-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0149-Add-source-to-PlayerExpChangeEvent.patch @@ -1,4 +1,4 @@ -From 143891fea19188753b3a7a416f54d988c8b97571 Mon Sep 17 00:00:00 2001 +From 9b665d86432862f20fd8925e96574778337696fd Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Thu, 8 Sep 2016 08:48:33 -0700 Subject: [PATCH] Add source to PlayerExpChangeEvent @@ -18,7 +18,7 @@ index 808d1a120..3030dd9c3 100644 this.die(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 075e6f04e..2a06cbf85 100644 +index b8bf1fbef..717cd0f42 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -51,6 +51,7 @@ import org.bukkit.entity.Player; @@ -29,7 +29,7 @@ index 075e6f04e..2a06cbf85 100644 import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -820,6 +821,17 @@ public class CraftEventFactory { +@@ -833,6 +834,17 @@ public class CraftEventFactory { return event; } @@ -48,5 +48,5 @@ index 075e6f04e..2a06cbf85 100644 return handleBlockGrowEvent(world, pos, block, 3); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0150-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0150-Optimize-World.isLoaded-BlockPosition-Z.patch index 05d3e1a74..3a42dd1e2 100644 --- a/Spigot-Server-Patches/0150-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0150-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -1,4 +1,4 @@ -From 903ef5f907601b6fb1283904e19700f4b1f76212 Mon Sep 17 00:00:00 2001 +From f4f4c5e22c47e28e70a575517c6c225addb90bea 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,10 +6,10 @@ 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 3740cdf95d..785611f0e2 100644 +index b07229875..fdfa5a8a1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -274,6 +274,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -269,6 +269,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return this.getType(blockposition).isAir(); } @@ -21,5 +21,5 @@ index 3740cdf95d..785611f0e2 100644 public boolean isLoadedAndInBounds(BlockPosition blockposition) { return getWorldBorder().isInBounds(blockposition) && getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null; -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0151-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0151-Don-t-let-fishinghooks-use-portals.patch index 5bb313d8a..f8e594061 100644 --- a/Spigot-Server-Patches/0151-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0151-Don-t-let-fishinghooks-use-portals.patch @@ -1,14 +1,14 @@ -From edd57c33821768af20bf022dcce285cb205b41e6 Mon Sep 17 00:00:00 2001 +From c4ef329f02b98ce1b15206721f1cf268bfcfd05a 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 c17e41f128..a41dfb6e50 100644 +index 0004c134a..40704664b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -158,7 +158,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 c17e41f128..a41dfb6e50 100644 public DimensionManager 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 b52aaa57e3..62e8f27aa7 100644 +index aa8a14b39..16aa2b5f2 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 { @@ -35,5 +35,5 @@ index b52aaa57e3..62e8f27aa7 100644 } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0152-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0152-Add-ProjectileCollideEvent.patch index 58d50f35d..37bab01dd 100644 --- a/Spigot-Server-Patches/0152-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0152-Add-ProjectileCollideEvent.patch @@ -1,11 +1,11 @@ -From 12c01d5926cc5657e82bc0e57258c7536bbec558 Mon Sep 17 00:00:00 2001 +From 1163ba163cf37284af41818773ed7945347fcb87 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/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index cc38cfb04..46606ed5c 100644 +index 6dee9e169..2aaa27789 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -195,6 +195,16 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -46,7 +46,7 @@ index 3e3619d79..58cc4824c 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 cffb40efb..45a326779 100644 +index 16aa2b5f2..23f7d36b5 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 { @@ -67,7 +67,7 @@ index cffb40efb..45a326779 100644 vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z); } diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 11638221b..431afaf2f 100644 +index 751ea456b..bab5b89fe 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -144,6 +144,15 @@ public abstract class EntityProjectile extends Entity implements IProjectile { @@ -87,10 +87,10 @@ index 11638221b..431afaf2f 100644 if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.getBlockPosition()).getBlock() == Blocks.NETHER_PORTAL) { this.e(movingobjectposition.getBlockPosition()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2a06cbf85..464c5cfc9 100644 +index 717cd0f42..943963047 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -955,6 +955,16 @@ public class CraftEventFactory { +@@ -968,6 +968,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } @@ -108,5 +108,5 @@ index 2a06cbf85..464c5cfc9 100644 Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0153-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0153-Prevent-Pathfinding-out-of-World-Border.patch index 579482d8e..5b1f81b21 100644 --- a/Spigot-Server-Patches/0153-Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/0153-Prevent-Pathfinding-out-of-World-Border.patch @@ -1,4 +1,4 @@ -From 6cbf0d8ca037c71d47ed2b79ed80531d56268a38 Mon Sep 17 00:00:00 2001 +From 303db4ec97a30becab6cf491f99cb91bce5bf752 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,10 +6,10 @@ 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 7a4bc0fcc3..efdfa7195c 100644 +index 716d00afb..c55aadb53 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -71,6 +71,7 @@ public abstract class NavigationAbstract { +@@ -75,6 +75,7 @@ public abstract class NavigationAbstract { @Nullable public PathEntity b(BlockPosition blockposition) { @@ -17,16 +17,17 @@ index 7a4bc0fcc3..efdfa7195c 100644 if (!this.b()) { return null; } else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { -@@ -95,6 +96,7 @@ public abstract class NavigationAbstract { +@@ -101,7 +102,7 @@ public abstract class NavigationAbstract { return null; } else { BlockPosition blockposition = new BlockPosition(entity); +- + if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; } else { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index acd76e13bb..1a87480f09 100644 +index beac8ac0b..86ada40a1 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -19,7 +19,7 @@ public class WorldBorder { @@ -39,5 +40,5 @@ index acd76e13bb..1a87480f09 100644 } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0154-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0154-Bound-Treasure-Maps-to-World-Border.patch index e763b0631..50f0c01ea 100644 --- a/Spigot-Server-Patches/0154-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0154-Bound-Treasure-Maps-to-World-Border.patch @@ -1,4 +1,4 @@ -From 53f9973a0970135fccddac14441c6ab2c3aee2a4 Mon Sep 17 00:00:00 2001 +From e9d285fd56df3f5056781c229ac47d15b1848268 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,10 +11,10 @@ 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 aa640e27d4..44c742e643 100644 +index 7194c048c..2ea5ac316 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 +@@ -122,6 +122,7 @@ public abstract class StructureGenerator if (flag1 || flag2) { ChunkCoordIntPair chunkcoordintpair = this.a(chunkgenerator, seededrandom, j, k, i1, j1); @@ -23,7 +23,7 @@ index aa640e27d4..44c742e643 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 1a87480f09..057ea1c5ac 100644 +index 86ada40a1..a2e856952 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -23,6 +23,18 @@ public class WorldBorder { @@ -46,5 +46,5 @@ index 1a87480f09..057ea1c5ac 100644 return (double) chunkcoordintpair.f() > this.b() && (double) chunkcoordintpair.d() < this.d() && (double) chunkcoordintpair.g() > this.c() && (double) chunkcoordintpair.e() < this.e(); } -- -2.19.0 +2.20.1 diff --git a/Spigot-Server-Patches/0155-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0155-Configurable-Cartographer-Treasure-Maps.patch index f6b5057f1..cb178c2a8 100644 --- a/Spigot-Server-Patches/0155-Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/0155-Configurable-Cartographer-Treasure-Maps.patch @@ -1,4 +1,4 @@ -From 6cb25c00886119aea4b3cdbf46592df12c48a429 Mon Sep 17 00:00:00 2001 +From 0a247fdee9a25543901d17cb25571925233f8984 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:26:27 -0500 Subject: [PATCH] Configurable Cartographer Treasure Maps @@ -28,10 +28,10 @@ index 03b7410f5..5c50c62e5 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index ddf170180..bd799d0c6 100644 +index 213d0b18c..ebe397b15 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -753,6 +753,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -752,6 +752,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { public void a(IMerchant imerchant, MerchantRecipeList merchantrecipelist, Random random) { int i = this.a.a(random); World world = imerchant.getWorld(); @@ -40,5 +40,5 @@ index ddf170180..bd799d0c6 100644 if (blockposition != null) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0158-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0158-Properly-fix-item-duplication-bug.patch index 0d7bb8f6a..fd6df6314 100644 --- a/Spigot-Server-Patches/0158-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0158-Properly-fix-item-duplication-bug.patch @@ -1,4 +1,4 @@ -From c6826e0393670c1f2020fa57a8efa20ffc10a690 Mon Sep 17 00:00:00 2001 +From e795fb2b638a522bc6efeb69217eed8dc043b7f9 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 c2957ad2e..a615d7867 100644 +index a37af03d2..cd488d37f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1552,7 +1552,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1554,7 +1554,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,7 +19,7 @@ index c2957ad2e..a615d7867 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6530b6be8..553f76b81 100644 +index 0134fb871..d74b3c44b 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 { @@ -32,5 +32,5 @@ index 6530b6be8..553f76b81 100644 // CraftBukkit end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0160-Firework-API-s.patch b/Spigot-Server-Patches/0160-Firework-API-s.patch index efdf078c3..438fba29e 100644 --- a/Spigot-Server-Patches/0160-Firework-API-s.patch +++ b/Spigot-Server-Patches/0160-Firework-API-s.patch @@ -1,11 +1,11 @@ -From 97fdbff7671b0ebe0afce23f07c242959fb53481 Mon Sep 17 00:00:00 2001 +From d3c8e46af030489991d076c9e2cc636b93013f8f 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 1fa527fe4..3d9dd50d7 100644 +index 9b6d217df..9764c76fb 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; @@ -54,30 +54,30 @@ index 1fa527fe4..3d9dd50d7 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 936faccbf..d971bbc76 100644 +index 68bd2af26..dbb422e9d 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java -@@ -14,6 +14,7 @@ public class ItemFireworks extends Item { +@@ -16,6 +16,7 @@ public class ItemFireworks extends Item { BlockPosition blockposition = itemactioncontext.getClickPosition(); ItemStack itemstack = itemactioncontext.getItemStack(); - EntityFireworks entityfireworks = new EntityFireworks(world, (double)((float)blockposition.getX() + itemactioncontext.m()), (double)((float)blockposition.getY() + itemactioncontext.n()), (double)((float)blockposition.getZ() + itemactioncontext.o()), itemstack); + EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack); + entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper + world.addEntity(entityfireworks); itemstack.subtract(1); - } -@@ -26,6 +27,7 @@ public class ItemFireworks extends Item { - ItemStack itemstack = entityhuman.b(enumhand); +@@ -30,6 +31,7 @@ public class ItemFireworks extends Item { + if (!world.isClientSide) { EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman); + entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper + world.addEntity(entityfireworks); 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 db4e4b859..49280bd60 100644 +index 8c5d6c1d3..d4165f7e4 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -101,7 +101,7 @@ public class NBTTagCompound implements NBTBase { +@@ -107,7 +107,7 @@ public class NBTTagCompound implements NBTBase { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); } @@ -130,5 +130,5 @@ index 7b3b20682..b39e33f4f 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0163-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0163-Provide-E-TE-Chunk-count-stat-methods.patch index 721e579f6..8db5ba331 100644 --- a/Spigot-Server-Patches/0163-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0163-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From a6c308143cb36a05f085bbd4391087888252dcc7 Mon Sep 17 00:00:00 2001 +From 0a1c98cd6d921fbfffc583a8bcd6291165f93646 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,10 +7,10 @@ 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 f1320f5ac..f1a162420 100644 +index cecdc5388..864151444 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -87,6 +87,29 @@ public class CraftWorld implements World { +@@ -88,6 +88,29 @@ public class CraftWorld implements World { private int chunkLoadCount = 0; private int chunkGCTickCount; @@ -41,5 +41,5 @@ index f1320f5ac..f1a162420 100644 public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0164-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0164-Enforce-Sync-Player-Saves.patch index ae16a2a17..bd8891a6b 100644 --- a/Spigot-Server-Patches/0164-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0164-Enforce-Sync-Player-Saves.patch @@ -1,4 +1,4 @@ -From c46ecb0b1a3747bc0c0b3c67b37e2a8d739aba66 Mon Sep 17 00:00:00 2001 +From 3bffc7dc5c318939eb7b3da34574cdbe10710e66 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 1259ec9d6..b10ac733f 100644 +index 2c3ed3723..0bc27d914 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1215,6 +1215,7 @@ public abstract class PlayerList { +@@ -1214,6 +1214,7 @@ public abstract class PlayerList { } public void savePlayers(Integer interval) { @@ -18,7 +18,7 @@ index 1259ec9d6..b10ac733f 100644 long now = MinecraftServer.currentTick; MinecraftTimings.savePlayers.startTiming(); // Paper int numSaved = 0; // Paper -@@ -1226,6 +1227,7 @@ public abstract class PlayerList { +@@ -1225,6 +1226,7 @@ public abstract class PlayerList { } } MinecraftTimings.savePlayers.stopTiming(); // Paper @@ -27,5 +27,5 @@ index 1259ec9d6..b10ac733f 100644 // Paper end -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0165-Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/0165-Enforce-Sync-Chunk-Unloads.patch index 20fadd292..83956ee3d 100644 --- a/Spigot-Server-Patches/0165-Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/0165-Enforce-Sync-Chunk-Unloads.patch @@ -1,4 +1,4 @@ -From 80a09c12e7bb5c9b00b203446bb1a453a33271e1 Mon Sep 17 00:00:00 2001 +From 2e7dfd9a66cf68126c90c5a3a591f0acc5814990 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,10 +7,10 @@ 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 f1a162420..5d0e81731 100644 +index 864151444..0f3bf13ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -235,6 +235,7 @@ public class CraftWorld implements World { +@@ -236,6 +236,7 @@ public class CraftWorld implements World { } private boolean unloadChunk0(int x, int z, boolean save) { @@ -18,7 +18,7 @@ index f1a162420..5d0e81731 100644 net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false, false); if (chunk == null) { return true; -@@ -242,6 +243,7 @@ public class CraftWorld implements World { +@@ -243,6 +244,7 @@ public class CraftWorld implements World { // If chunk had previously been queued to save, must do save to avoid loss of that data return world.getChunkProvider().unloadChunk(chunk, chunk.mustSave || save); @@ -27,5 +27,5 @@ index f1a162420..5d0e81731 100644 public boolean regenerateChunk(int x, int z) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0166-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0166-Don-t-allow-entities-to-ride-themselves-572.patch index 28a9fcea0..5830330f2 100644 --- a/Spigot-Server-Patches/0166-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0166-Don-t-allow-entities-to-ride-themselves-572.patch @@ -1,14 +1,14 @@ -From 058e8cad776e0ad46d4c4d966a5beb412db85f34 Mon Sep 17 00:00:00 2001 +From 5161bfd916603c9f4b61d3553565fe0d8f4e744b 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 3c07995a1..04cd6350c 100644 +index 40704664b..e1944774c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2077,6 +2077,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2075,6 +2075,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } protected boolean addPassenger(Entity entity) { // CraftBukkit @@ -17,5 +17,5 @@ index 3c07995a1..04cd6350c 100644 throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0167-Fix-block-break-desync.patch b/Spigot-Server-Patches/0167-Fix-block-break-desync.patch index 7ab0d227d..2d70268bf 100644 --- a/Spigot-Server-Patches/0167-Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/0167-Fix-block-break-desync.patch @@ -1,14 +1,14 @@ -From 61acbcb04d8ab4e38ff284f67680f73979d5b137 Mon Sep 17 00:00:00 2001 +From 82463a1bf386bbc6ae6d966a9388f464bb9347cb 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 553f76b81..03b986bfa 100644 +index dbdd08d17..46608118e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1153,6 +1153,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1152,6 +1152,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { double d3 = d0 * d0 + d1 * d1 + d2 * d2; if (d3 > 36.0D) { @@ -18,5 +18,5 @@ index 553f76b81..03b986bfa 100644 } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) { return; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0168-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0168-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 7c6b1f531..1cc95bfbd 100644 --- a/Spigot-Server-Patches/0168-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0168-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -1,4 +1,4 @@ -From 0d70e74b76862481874c3b71e500c7b0cf6c6f1f Mon Sep 17 00:00:00 2001 +From 11b37982d9590009a29a4833d0ea71f787a27836 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 8aa6ed8d8..b8684f6a2 100644 +index dbf1089ba..66643be2b 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -451,13 +451,13 @@ public class Block implements IMaterial { +@@ -450,13 +450,13 @@ public class Block implements IMaterial { } } @@ -28,7 +28,7 @@ index 8aa6ed8d8..b8684f6a2 100644 } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 61b18ca8a..32fd5adc6 100644 +index b3fbc8249..79d8be8d4 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 3030dd9c3..404a222b4 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 45a326779..cccb19589 100644 +index 23f7d36b5..e1c685eed 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 { @@ -133,7 +133,7 @@ index 45a326779..cccb19589 100644 // CraftBukkit end if (itemstack1.getItem().a(TagsItem.FISHES)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 162de836e..284e22bbd 100644 +index f58ebe3c2..f2e38b9f3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -354,7 +354,8 @@ public abstract class EntityLiving extends Entity { @@ -160,10 +160,10 @@ index a5e1939e0..e73dba09a 100644 this.die(); diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index bd799d0c6..f80634d54 100644 +index ebe397b15..78acac4ca 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -413,7 +413,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -412,7 +412,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { } if (merchantrecipe.j()) { @@ -173,7 +173,7 @@ index bd799d0c6..f80634d54 100644 if (this.tradingPlayer instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -index 4a128f707..b87096467 100644 +index bf061cf06..55f978768 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -122,7 +122,7 @@ public class PathfinderGoalBreed extends PathfinderGoal { @@ -186,7 +186,7 @@ index 4a128f707..b87096467 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index c8cfa3abe..aa7780eff 100644 +index 32b0e7965..5b8ddc76e 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -390,7 +390,7 @@ public class PlayerInteractManager { @@ -199,7 +199,7 @@ index c8cfa3abe..aa7780eff 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java -index bbb4ee3ec..839cccbe3 100644 +index 5ac554d65..d70c4dda5 100644 --- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java +++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java @@ -9,7 +9,7 @@ import org.bukkit.event.inventory.FurnaceExtractEvent; @@ -221,10 +221,10 @@ index bbb4ee3ec..839cccbe3 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bbe9c5e89..b4f908164 100644 +index 0f3bf13ef..36d27c2a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1332,7 +1332,7 @@ public class CraftWorld implements World { +@@ -1354,7 +1354,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/0169-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0169-Cap-Entity-Collisions.patch index 3ef0a37d5..7f23a688b 100644 --- a/Spigot-Server-Patches/0169-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0169-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From 7892fe99c3195ea12ed4d882c053f2fa4bbba3c1 Mon Sep 17 00:00:00 2001 +From fa363af6a7a85bf4630df7d709e16e0d5c757ee5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jan 2017 18:07:56 -0500 Subject: [PATCH] Cap Entity Collisions @@ -27,10 +27,10 @@ index 5c50c62e5..e49eb0caf 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 04cd6350c..e26c9ee28 100644 +index e1944774c..b613d3d15 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -182,6 +182,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; public boolean fromMobSpawner; @@ -39,7 +39,7 @@ index 04cd6350c..e26c9ee28 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 83605e7c7..be0a3f38e 100644 +index f2e38b9f3..b7923a1a5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2354,8 +2354,11 @@ public abstract class EntityLiving extends Entity { @@ -56,5 +56,5 @@ index 83605e7c7..be0a3f38e 100644 this.C(entity); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0171-Shame-on-you-Mojang.patch b/Spigot-Server-Patches/0171-Shame-on-you-Mojang.patch index 393a67155..fdb99ae92 100644 --- a/Spigot-Server-Patches/0171-Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/0171-Shame-on-you-Mojang.patch @@ -1,4 +1,4 @@ -From f0c1975cdbe87b4d2bba6c6cb2fc081b0d026433 Mon Sep 17 00:00:00 2001 +From 777d98b4a8650fc1cbb0046b63c76cf2d81615d8 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,10 +12,10 @@ 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 7148ea369..6d4e82b40 100644 +index fb567f34c..e45ad95fb 100644 --- a/src/main/java/net/minecraft/server/BlockBeacon.java +++ b/src/main/java/net/minecraft/server/BlockBeacon.java -@@ -46,7 +46,7 @@ public class BlockBeacon extends BlockTileEntity { +@@ -49,7 +49,7 @@ public class BlockBeacon extends BlockTileEntity { } public static void a(World world, BlockPosition blockposition) { @@ -23,8 +23,8 @@ index 7148ea369..6d4e82b40 100644 + //HttpUtilities.a.submit(() -> { // Paper Chunk chunk = world.getChunkAtWorldCoords(blockposition); - for(int i = blockposition.getY() - 1; i >= 0; --i) { -@@ -67,7 +67,6 @@ public class BlockBeacon extends BlockTileEntity { + for (int i = blockposition.getY() - 1; i >= 0; --i) { +@@ -73,7 +73,6 @@ public class BlockBeacon extends BlockTileEntity { }); } } @@ -34,5 +34,5 @@ index 7148ea369..6d4e82b40 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0172-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0172-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 71e96d178..f68666af2 100644 --- a/Spigot-Server-Patches/0172-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0172-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,22 +1,22 @@ -From 7c287d67fafef3b966a88602b803b14f44ce4188 Mon Sep 17 00:00:00 2001 +From 8ed4562f4c90cc4a92c78531f3f207992f5c4213 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 570ddc1a8..3854464e8 100644 +index ed747bc3c..f7c433b94 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -313,7 +313,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -310,7 +310,7 @@ public class ChunkProviderServer implements IChunkProvider { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); - int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR); + int targetSize = Math.min(this.unloadQueue.size() - 100, (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive // Spigot end + Iterator iterator = this.unloadQueue.iterator(); - LongIterator longiterator = this.unloadQueue.iterator(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0174-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0174-Properly-handle-async-calls-to-restart-the-server.patch index 888a96614..9cadd9630 100644 --- a/Spigot-Server-Patches/0174-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0174-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From 8186e73d20a64b9dd3d508260bd6a88e60eea217 Mon Sep 17 00:00:00 2001 +From b2776d5425d6c74a71d747af2e7714c8ed573402 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,10 +30,10 @@ 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 dacb372a5..fd405281b 100644 +index f09d358e2..f2c172ff1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -90,6 +90,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -85,6 +85,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public final Map worldServer = Maps.newIdentityHashMap(); private PlayerList playerList; private boolean isRunning = true; @@ -41,7 +41,7 @@ index dacb372a5..fd405281b 100644 private boolean isStopped; private int ticks; protected final Proxy c; -@@ -659,7 +660,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -654,7 +655,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati if (this.playerList != null) { MinecraftServer.LOGGER.info("Saving players"); this.playerList.savePlayers(); @@ -50,7 +50,7 @@ index dacb372a5..fd405281b 100644 try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets } -@@ -709,9 +710,16 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -704,9 +705,16 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati return this.isRunning; } @@ -68,10 +68,10 @@ index dacb372a5..fd405281b 100644 private boolean canSleepForTick() { return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 320c378e0..d8ed44fe2 100644 +index 0bc27d914..128fcaf25 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1333,10 +1333,15 @@ public abstract class PlayerList { +@@ -1332,10 +1332,15 @@ public abstract class PlayerList { entityplayer.playerInteractManager.b(generatoraccess.getWorldData().getGameType()); } @@ -88,7 +88,7 @@ index 320c378e0..d8ed44fe2 100644 } // CraftBukkit end // Paper start - Remove collideRule team if it exists -@@ -1347,6 +1352,7 @@ public abstract class PlayerList { +@@ -1346,6 +1351,7 @@ public abstract class PlayerList { } // Paper end } @@ -97,16 +97,17 @@ index 320c378e0..d8ed44fe2 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 944151d14..061cbe7fc 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 +@@ -46,86 +46,123 @@ public class RestartCommand extends Command org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper try { -- if ( script.isFile() ) +- String[] split = restartScript.split( " " ); +- if ( split.length > 0 && new File( split[0] ).isFile() ) + // Paper - extract method and cleanup -+ boolean isRestarting = addShutdownHook(script); ++ boolean isRestarting = addShutdownHook(restartScript); + if (isRestarting) { + System.out.println("Attempting to restart with " + SpigotConfig.restartScript); + } else { @@ -130,7 +131,8 @@ index 947c43a5d..f15fd9f37 100644 + { + // Kick all players + for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) -+ { + { +- System.out.println( "Attempting to restart with " + restartScript ); + p.playerConnection.disconnect(SpigotConfig.restartMessage); + } + // Give the socket a chance to send the packets @@ -138,8 +140,7 @@ index 947c43a5d..f15fd9f37 100644 + { + Thread.sleep( 100 ); + } catch ( InterruptedException ex ) - { -- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript ); ++ { + } - // Disable Watchdog @@ -201,13 +202,10 @@ index 947c43a5d..f15fd9f37 100644 - String os = System.getProperty( "os.name" ).toLowerCase(java.util.Locale.ENGLISH); - if ( os.contains( "win" ) ) - { -- Runtime.getRuntime().exec( "cmd /c start " + script.getPath() ); +- Runtime.getRuntime().exec( "cmd /c start " + restartScript ); - } else - { -- Runtime.getRuntime().exec( new String[] -- { -- "sh", script.getPath() -- } ); +- Runtime.getRuntime().exec( "sh " + restartScript ); - } - } catch ( Exception e ) - { @@ -219,15 +217,9 @@ index 947c43a5d..f15fd9f37 100644 - shutdownHook.setDaemon( true ); - Runtime.getRuntime().addShutdownHook( shutdownHook ); - } else -+ // wait 10 seconds to see if we're actually going to try shutdown -+ try -+ { -+ Thread.sleep(10000); -+ } -+ catch (InterruptedException ignored) - { +- { - System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." ); -- + - // Actually shutdown - try - { @@ -235,6 +227,13 @@ index 947c43a5d..f15fd9f37 100644 - } catch ( Throwable t ) - { - } ++ // wait 10 seconds to see if we're actually going to try shutdown ++ try ++ { ++ Thread.sleep(10000); ++ } ++ catch (InterruptedException ignored) ++ { } + + // Check if we've actually hit a state where the server is going to safely shutdown @@ -265,21 +264,20 @@ index 947c43a5d..f15fd9f37 100644 + // Paper end + + // Paper - copied from above and modified to return if the hook registered -+ private static boolean addShutdownHook(final File script) { ++ private static boolean addShutdownHook(final String restartScript) { + -+ if (script.isFile()) { ++ String[] split = restartScript.split( " " ); ++ if ( split.length > 0 && new File( split[0] ).isFile() ) ++ { + Thread shutdownHook = new Thread() { + @Override + public void run() { + try { + String os = System.getProperty("os.name").toLowerCase(java.util.Locale.ENGLISH); + if (os.contains("win")) { -+ Runtime.getRuntime().exec("cmd /c start " + script.getPath()); ++ Runtime.getRuntime().exec("cmd /c start " + restartScript); + } else { -+ Runtime.getRuntime().exec(new String[] -+ { -+ "sh", script.getPath() -+ }); ++ Runtime.getRuntime().exec( "sh " + restartScript ); + } + } catch (Exception e) { + e.printStackTrace(); @@ -296,5 +294,5 @@ index 947c43a5d..f15fd9f37 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0176-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0176-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index e46bee6f5..8faba0831 100644 --- a/Spigot-Server-Patches/0176-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0176-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -1,4 +1,4 @@ -From 2567e9bea1e84723a4bd29eb7c83ff61e016e429 Mon Sep 17 00:00:00 2001 +From 20d2500c75bd049b9dc6787bdc24e193115e09f1 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 @@ -26,10 +26,10 @@ index e49eb0caf..aefb0ce97 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 16a8cee3e..86c6beefe 100644 +index f1314831f..651133eb9 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -468,7 +468,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -465,7 +465,7 @@ public abstract class EntityHuman extends EntityLiving { this.j(this.getShoulderEntityLeft()); this.j(this.getShoulderEntityRight()); if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater() || this.isPassenger()) || this.abilities.isFlying) { @@ -39,7 +39,7 @@ index 16a8cee3e..86c6beefe 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 03b986bfa..c8b251e69 100644 +index 1491de7e7..877598a54 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1756,6 +1756,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -57,5 +57,5 @@ index 03b986bfa..c8b251e69 100644 case STOP_SNEAKING: this.player.setSneaking(false); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0178-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0178-Use-TerminalConsoleAppender-for-console-improvements.patch index f5c988077..2b826be68 100644 --- a/Spigot-Server-Patches/0178-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0178-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -1,4 +1,4 @@ -From a84c70f87100764523afaf2f93bffcfdfdaad1f9 Mon Sep 17 00:00:00 2001 +From 38782ceaec1fc62dbce6fc63a0ff8c20886c2928 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,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index f0fc37abf..ea08d7d98 100644 +index 713034015..b1d860a75 100644 --- a/pom.xml +++ b/pom.xml @@ -40,10 +40,27 @@ @@ -54,7 +54,7 @@ index f0fc37abf..ea08d7d98 100644 org.ow2.asm -@@ -204,10 +221,18 @@ +@@ -198,10 +215,18 @@ META-INF/services/java.sql.Driver @@ -143,7 +143,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 7f4c76669..1007641d5 100644 +index 0ebada490..be7030d56 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 @@ -185,10 +185,10 @@ index 7f4c76669..1007641d5 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 fd405281b..9c95661a7 100644 +index f2c172ff1..3b918da4d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -61,7 +61,6 @@ import org.apache.commons.lang3.Validate; +@@ -56,7 +56,6 @@ import org.apache.commons.lang3.Validate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // CraftBukkit start @@ -196,7 +196,7 @@ index fd405281b..9c95661a7 100644 import joptsimple.OptionSet; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.CraftServer; -@@ -147,7 +146,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -142,7 +141,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public OptionSet options; public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; @@ -205,7 +205,7 @@ index fd405281b..9c95661a7 100644 public static int currentTick = 0; // Paper - Further improve tick loop public boolean serverAutoSave = false; // Paper public final Thread primaryThread; -@@ -193,7 +192,9 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -188,7 +187,9 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.ac.a((IResourcePackListener) this.al); // CraftBukkit start this.options = options; @@ -215,7 +215,7 @@ index fd405281b..9c95661a7 100644 if (System.console() == null && System.getProperty("jline.terminal") == null) { System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); Main.useJline = false; -@@ -214,6 +215,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -209,6 +210,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati LOGGER.warn((String) null, ex); } } @@ -224,7 +224,7 @@ index fd405281b..9c95661a7 100644 Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); this.serverThread = primaryThread = new Thread(this, "Server thread"); // Moved from main -@@ -877,7 +880,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -872,7 +875,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } finally { // CraftBukkit start - Restore terminal to original settings try { @@ -233,7 +233,7 @@ index fd405281b..9c95661a7 100644 } catch (Exception ignored) { } // CraftBukkit end -@@ -1365,7 +1368,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1360,7 +1363,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } public void sendMessage(IChatBaseComponent ichatbasecomponent) { @@ -243,10 +243,10 @@ index fd405281b..9c95661a7 100644 public KeyPair E() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d8ed44fe2..e7bae58fa 100644 +index fe2f13aef..07e25ce1d 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 { +@@ -77,8 +77,7 @@ public abstract class PlayerList { public PlayerList(MinecraftServer minecraftserver) { this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this); @@ -588,5 +588,5 @@ index 5cee8f00e..08b6bb7f9 100644 -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0179-provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/0179-provide-a-configurable-option-to-disable-creeper-lin.patch index f40ee740a..1e35cad29 100644 --- a/Spigot-Server-Patches/0179-provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/0179-provide-a-configurable-option-to-disable-creeper-lin.patch @@ -1,4 +1,4 @@ -From 7748db61002280fe5cce27a6c3a1a26e0cb288f0 Mon Sep 17 00:00:00 2001 +From ae11acb86e16493b74f4758d53def860e6580ac8 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 @@ -21,12 +21,12 @@ index aefb0ce97..af31030dc 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index b080fc792..fb76dc18b 100644 +index 81e602d1b..b6af42904 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 createEffectCloud() { - Collection collection = this.getEffects(); + Collection collection = this.getEffects(); - if (!collection.isEmpty()) { + if (!collection.isEmpty() && !world.paperConfig.disableCreeperLingeringEffect) { // Paper @@ -34,5 +34,5 @@ index b080fc792..fb76dc18b 100644 entityareaeffectcloud.setSource(this); // CraftBukkit -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0180-Item-canEntityPickup.patch b/Spigot-Server-Patches/0180-Item-canEntityPickup.patch index d3b5fa116..47689147b 100644 --- a/Spigot-Server-Patches/0180-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0180-Item-canEntityPickup.patch @@ -1,14 +1,14 @@ -From a0e86f8577578e900b88631dbb12e3ee8ffd4d7b Mon Sep 17 00:00:00 2001 +From f5e92a52c3e06d819b2bbf304c9eee9ad6c6397c 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 4ec79ccdb..a28aa016c 100644 +index 7401bafa9..d670b6ba4 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -529,6 +529,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -530,6 +530,11 @@ public abstract class EntityInsentient extends EntityLiving { EntityItem entityitem = (EntityItem) iterator.next(); if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.q()) { @@ -21,23 +21,23 @@ index 4ec79ccdb..a28aa016c 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 3c30cd5b3..ac0f38e12 100644 +index cad1c1a17..e343b39b5 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 { private static final DataWatcherObject b = DataWatcher.a(EntityItem.class, DataWatcherRegistry.g); - private int age; + public int age; // PAIL public int pickupDelay; + public boolean canMobPickup = true; // Paper private int e; 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 55d6bacf7..6036592f7 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 { - item.pickupDelay = Math.min(delay, Short.MAX_VALUE); +@@ -45,6 +45,16 @@ public class CraftItem extends CraftEntity implements Item { + item.age = value; } + // Paper Start @@ -54,5 +54,5 @@ index a17a537d6..1df17f09b 100644 public String toString() { return "CraftItem"; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0184-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0184-Basic-PlayerProfile-API.patch index d0955b836..613e6d4b8 100644 --- a/Spigot-Server-Patches/0184-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0184-Basic-PlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 220ba34511680c2cfa4eb0b7be73def8b83ef78a Mon Sep 17 00:00:00 2001 +From ecd540041475b9ae3053da3f2369e68e2d6eaf22 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 15 Jan 2018 22:11:48 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -429,10 +429,10 @@ index e1af5c488..0ef5ad116 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 9c95661a7..906bd973d 100644 +index 3b918da4d..d8e82a83c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1189,7 +1189,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1184,7 +1184,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati */ // CraftBukkit end String s1 = "."; // PAIL? @@ -441,7 +441,7 @@ index 9c95661a7..906bd973d 100644 MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); UserCache usercache = new UserCache(gameprofilerepository, new File(s1, MinecraftServer.a.getName())); -@@ -1638,6 +1638,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1633,6 +1633,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.G = i; } @@ -450,10 +450,10 @@ index 9c95661a7..906bd973d 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 7d9edb9a6..355875a98 100644 +index 9bf2521be..059665836 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 { +@@ -43,7 +43,7 @@ public class UserCache { public static final SimpleDateFormat a = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); private static boolean c; @@ -462,7 +462,7 @@ index 7d9edb9a6..355875a98 100644 private final Map e = Maps.newHashMap(); private final Deque f = new java.util.concurrent.LinkedBlockingDeque(); // CraftBukkit private final GameProfileRepository g; -@@ -166,6 +166,13 @@ public class UserCache { +@@ -165,6 +165,13 @@ public class UserCache { return usercache_usercacheentry == null ? null : usercache_usercacheentry.a(); } @@ -476,7 +476,7 @@ index 7d9edb9a6..355875a98 100644 @Nullable public GameProfile getProfile(UUID uuid) { return a(uuid); } // Paper - OBFHELPER @Nullable public synchronized GameProfile a(UUID uuid) { // Paper - synchronize -@@ -275,7 +282,7 @@ public class UserCache { +@@ -274,7 +281,7 @@ public class UserCache { class UserCacheEntry { @@ -523,5 +523,5 @@ index e08da05d4..b5d0886df 100644 // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0185-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0185-Shoulder-Entities-Release-API.patch index ba71eef1d..33f5a5be4 100644 --- a/Spigot-Server-Patches/0185-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0185-Shoulder-Entities-Release-API.patch @@ -1,14 +1,14 @@ -From 80ab0c3282b4be60a0f0703fd4341aae2bc71fed Mon Sep 17 00:00:00 2001 +From 5453e0ce51d21305e13c653786e92a6d324354be 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 86c6beefe..d6333d9bb 100644 +index 651133eb9..ca6b9063b 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1826,21 +1826,48 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1823,21 +1823,48 @@ public abstract class EntityHuman extends EntityLiving { } // CraftBukkit end } @@ -99,5 +99,5 @@ index be00d79e8..755d288ed 100644 public boolean discoverRecipe(NamespacedKey recipe) { return discoverRecipes(Arrays.asList(recipe)) != 0; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0187-Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/0187-Block-player-logins-during-server-shutdown.patch index 5c5cf0fde..8dbe562a2 100644 --- a/Spigot-Server-Patches/0187-Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/0187-Block-player-logins-during-server-shutdown.patch @@ -1,14 +1,14 @@ -From c69d35dbafb176fa11f092431c37e66d8824d2b1 Mon Sep 17 00:00:00 2001 +From 2a4dc5a6b1147aa81b3c974bd8f8712ed1dc6575 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 9f6b73d80..af5c699fe 100644 +index e901c066a..852dc7162 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 { +@@ -49,6 +49,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { } public void tick() { @@ -22,5 +22,5 @@ index 9f6b73d80..af5c699fe 100644 this.b(); } else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0188-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0188-Entity-fromMobSpawner.patch index 8ca59c2a0..e0f27a098 100644 --- a/Spigot-Server-Patches/0188-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0188-Entity-fromMobSpawner.patch @@ -1,14 +1,14 @@ -From 13bc4086ea4079765780171471980e6003f2a62d Mon Sep 17 00:00:00 2001 +From bdcc7ab68ac909dae02fa27d4590110abf4ab73a 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 e26c9ee28..07a64966e 100644 +index b613d3d15..139207f33 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -182,6 +182,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 e26c9ee28..07a64966e 100644 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1650,6 +1651,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1648,6 +1649,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 e26c9ee28..07a64966e 100644 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1797,6 +1802,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1795,6 +1800,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)); } @@ -64,5 +64,5 @@ index 2858f11ee..5689f8390 100644 // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0189-Fix-Anvil-Level-sync-to-client.patch b/Spigot-Server-Patches/0189-Fix-Anvil-Level-sync-to-client.patch index bcfa733f7..f35135f9d 100644 --- a/Spigot-Server-Patches/0189-Fix-Anvil-Level-sync-to-client.patch +++ b/Spigot-Server-Patches/0189-Fix-Anvil-Level-sync-to-client.patch @@ -1,4 +1,4 @@ -From 704e788ddc7c522ef2437e1e3f0cfbd9ada64b85 Mon Sep 17 00:00:00 2001 +From b78600496783d86fb9eae76f64adbaa0b7a05fd7 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 a5ac893c4..a7b04a967 100644 +index a6ac51614..1560dd382 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -375,9 +375,9 @@ public class ContainerAnvil extends Container { @@ -26,7 +26,7 @@ index a5ac893c4..a7b04a967 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 05070285b..0df834fc1 100644 +index 0575e31f6..d6fa84a72 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1431,6 +1431,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -42,5 +42,5 @@ index 05070285b..0df834fc1 100644 return true; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0190-Add-missing-coverages-for-getTileEntity-in-order-to-.patch b/Spigot-Server-Patches/0190-Add-missing-coverages-for-getTileEntity-in-order-to-.patch index de3bd233c..438b26186 100644 --- a/Spigot-Server-Patches/0190-Add-missing-coverages-for-getTileEntity-in-order-to-.patch +++ b/Spigot-Server-Patches/0190-Add-missing-coverages-for-getTileEntity-in-order-to-.patch @@ -1,4 +1,4 @@ -From a9c576e831952dc4651dbad0ca7e64f188a4f94a Mon Sep 17 00:00:00 2001 +From 3b8c3dfe31ca21cb9577cb9eb83cd5069b33d73c 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,10 +6,10 @@ 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 b5b1a2637..b80315bc5 100644 +index b17069e41..44b003325 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 { +@@ -217,6 +217,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { result = fixTileEntity(pos, type, result); } } @@ -24,5 +24,5 @@ index b5b1a2637..b80315bc5 100644 return result; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0193-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0193-Implement-getI18NDisplayName.patch index 74bce8178..456c352b9 100644 --- a/Spigot-Server-Patches/0193-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0193-Implement-getI18NDisplayName.patch @@ -1,4 +1,4 @@ -From 22cff63dd8b19e091581b367580ce88e89a22a75 Mon Sep 17 00:00:00 2001 +From 726405ea60af24ba1dfaf572412e33a555147028 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 23:59:38 -0400 Subject: [PATCH] Implement getI18NDisplayName @@ -8,16 +8,16 @@ 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/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java -index 0648c76a0..bea146630 100644 +index 747b8ad4d..4c5556a09 100644 --- a/src/main/java/net/minecraft/server/LocaleLanguage.java +++ b/src/main/java/net/minecraft/server/LocaleLanguage.java -@@ -39,10 +39,12 @@ public class LocaleLanguage { +@@ -44,10 +44,12 @@ public class LocaleLanguage { } + public static LocaleLanguage getInstance() { return a(); } // Paper - OBFHELPER public static LocaleLanguage a() { - return c; + return LocaleLanguage.c; } + public synchronized String translateKey(String key) { return a(key); } // Paper - OBFHELPER @@ -48,5 +48,5 @@ index f5fa58d6c..3a6e6f687 100644 // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0194-GH-806-Respect-saving-disabled-before-unloading-all-.patch b/Spigot-Server-Patches/0194-GH-806-Respect-saving-disabled-before-unloading-all-.patch index 99261cb67..f6deab268 100644 --- a/Spigot-Server-Patches/0194-GH-806-Respect-saving-disabled-before-unloading-all-.patch +++ b/Spigot-Server-Patches/0194-GH-806-Respect-saving-disabled-before-unloading-all-.patch @@ -1,4 +1,4 @@ -From 7e329c1d9bf4348638bc615cbfcc9a1bae32453a Mon Sep 17 00:00:00 2001 +From 43787fb84844cd102edae334a8b12d0198373999 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,10 +9,10 @@ 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 c3ac66d35..5935bae58 100644 +index ab4f3b722..e428d4485 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -190,7 +190,7 @@ public class PlayerChunkMap { +@@ -186,7 +186,7 @@ public class PlayerChunkMap { try (Timing ignored = world.timings.doChunkMapUnloadChunks.startTiming()) { // Paper WorldProvider worldprovider = this.world.worldProvider; @@ -22,5 +22,5 @@ index c3ac66d35..5935bae58 100644 } } // Paper timing -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0195-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0195-ProfileWhitelistVerifyEvent.patch index 919e51a2e..097e8231e 100644 --- a/Spigot-Server-Patches/0195-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0195-ProfileWhitelistVerifyEvent.patch @@ -1,14 +1,14 @@ -From 63e0e80ed62f23b45e71807d7247928949feb339 Mon Sep 17 00:00:00 2001 +From d92c32d4f54c681035e0d860ed7cd1e28ddbac94 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 fb9b0835b..64a86b699 100644 +index 52b90e12b..102b7f3b2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -544,9 +544,9 @@ public abstract class PlayerList { +@@ -543,9 +543,9 @@ public abstract class PlayerList { // return chatmessage; if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot @@ -20,7 +20,7 @@ index fb9b0835b..64a86b699 100644 } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); -@@ -1172,9 +1172,25 @@ public abstract class PlayerList { +@@ -1171,9 +1171,25 @@ public abstract class PlayerList { this.server.getCommandDispatcher().a(entityplayer); } @@ -48,5 +48,5 @@ index fb9b0835b..64a86b699 100644 public boolean isOp(GameProfile gameprofile) { return this.operators.d(gameprofile) || this.server.H() && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().u() && this.server.G().equalsIgnoreCase(gameprofile.getName()) || this.u; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0199-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0199-Fix-MC-117075-TE-Unload-Lag-Spike.patch index a21500af1..b8cf62cdb 100644 --- a/Spigot-Server-Patches/0199-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0199-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -1,14 +1,14 @@ -From 0297f85dc1ab08552c0c9e13f9e018b2a7810bc9 Mon Sep 17 00:00:00 2001 +From 20c5fa0a3fe5ea037392f045c3557fb14ffa5cd5 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 65973edfc..cb62af425 100644 +index fdfa5a8a1..4f261554c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1273,7 +1273,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1268,7 +1268,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.methodProfiler.exitEnter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { @@ -22,5 +22,5 @@ index 65973edfc..cb62af425 100644 this.tileEntityListUnload.clear(); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0200-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0200-Allow-specifying-a-custom-authentication-servers-dow.patch index 123781dcf..4510f7448 100644 --- a/Spigot-Server-Patches/0200-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0200-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -1,4 +1,4 @@ -From 879525f34fe5bcee534a7b250b04d87a6190503e Mon Sep 17 00:00:00 2001 +From 1d672bef8f838967fd754efea8cd01512173a4d4 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 @@ -27,10 +27,10 @@ index 3f59e060b..305a1258f 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 90d1096e5..b682b3a43 100644 +index 852dc7162..74bc08f85 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -240,6 +240,10 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -239,6 +239,10 @@ public class LoginListener implements PacketLoginInListener, ITickable { LoginListener.this.i = LoginListener.this.a(gameprofile); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else { @@ -42,5 +42,5 @@ index 90d1096e5..b682b3a43 100644 LoginListener.c.error("Couldn't verify username because servers are unavailable"); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0203-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0203-Handle-plugin-prefixes-using-Log4J-configuration.patch index 08412e823..8554cd3b1 100644 --- a/Spigot-Server-Patches/0203-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/0203-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -1,4 +1,4 @@ -From 23440a8f025c817ae8d4040543e1b98c74a271d6 Mon Sep 17 00:00:00 2001 +From 254f000eeb860e7d9f988b3d332a0be70a1c0aa4 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,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index f34ca2285..70966a76a 100644 +index 73237ae8e..33ccbaea7 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ @@ -28,10 +28,10 @@ index f34ca2285..70966a76a 100644 org.apache.logging.log4j diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9dca5aeda..9584950c6 100644 +index fe3bad583..56f135f24 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -292,7 +292,7 @@ public class SpigotConfig +@@ -291,7 +291,7 @@ public class SpigotConfig private static void playerSample() { playerSample = getInt( "settings.sample-count", 12 ); @@ -70,5 +70,5 @@ index 08b6bb7f9..9f8334376 100644 -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0206-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0206-Add-PlayerJumpEvent.patch index bc6622ba3..e96ca630f 100644 --- a/Spigot-Server-Patches/0206-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0206-Add-PlayerJumpEvent.patch @@ -1,14 +1,14 @@ -From e2f61ee9a4bb38cdfd61fc9340e1b7042b04d1a6 Mon Sep 17 00:00:00 2001 +From 18e19dd85f511e0d940ef1ceffd5a6c5698cc11c 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 d6333d9bb..96e3d20e3 100644 +index ca6b9063b..7343eb25c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1478,6 +1478,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1475,6 +1475,7 @@ public abstract class EntityHuman extends EntityLiving { return 0; } @@ -17,10 +17,10 @@ index d6333d9bb..96e3d20e3 100644 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 c8b251e69..00751a9d9 100644 +index 691c16271..067de3b5f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -59,6 +59,8 @@ import org.bukkit.inventory.CraftingInventory; +@@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.util.NumberConversions; @@ -29,7 +29,7 @@ index c8b251e69..00751a9d9 100644 import co.aikar.timings.MinecraftTimings; // Paper // CraftBukkit end -@@ -873,7 +875,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -872,7 +874,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { d8 = d5 - this.p; d9 = d6 - this.q; if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { @@ -66,5 +66,5 @@ index c8b251e69..00751a9d9 100644 this.player.move(EnumMoveType.PLAYER, d7, d8, d9); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0207-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0207-handle-PacketPlayInKeepAlive-async.patch index b0eb0381a..49c31a6b5 100644 --- a/Spigot-Server-Patches/0207-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0207-handle-PacketPlayInKeepAlive-async.patch @@ -1,4 +1,4 @@ -From f71671bbb061fadb6bc835be690aec6bb587835b Mon Sep 17 00:00:00 2001 +From d7412aafd5f494f209d87fa9c316b395cc3d86e6 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,7 +15,7 @@ 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 5076b9627..fb63496a0 100644 +index 8cd898a94..a781ca166 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 { @@ -40,5 +40,5 @@ index 5076b9627..fb63496a0 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0208-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0208-Expose-client-protocol-version-and-virtual-host.patch index adb3cf25d..9673bdab7 100644 --- a/Spigot-Server-Patches/0208-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0208-Expose-client-protocol-version-and-virtual-host.patch @@ -1,4 +1,4 @@ -From 6bf21e9e7e77096e056c5631818d9a490dc849b6 Mon Sep 17 00:00:00 2001 +From f350e382a24cf186d3b9797c1aab1b7c9004960f 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 @@ -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 b4917c91b..25049a351 100644 +index 93ca93b64..e732d55f9 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,10 +84,10 @@ index b4917c91b..25049a351 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 26da89724..4f3f88ff6 100644 +index e2fc41d6d..2ff2549d0 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> { +@@ -62,6 +62,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { private float t; private int u; private boolean v; @@ -111,7 +111,7 @@ index 7acdac55e..f1a3be69d 100644 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0df834fc1..8046a2a5f 100644 +index d6fa84a72..eb0330ee1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -176,6 +176,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -136,5 +136,5 @@ index 0df834fc1..8046a2a5f 100644 public double getEyeHeight(boolean ignorePose) { if (ignorePose) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0209-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0209-revert-serverside-behavior-of-keepalives.patch index fc0d85ef1..7bf5c6a0d 100644 --- a/Spigot-Server-Patches/0209-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0209-revert-serverside-behavior-of-keepalives.patch @@ -1,4 +1,4 @@ -From 4f61d9e0c6247790014a1d359cdf9c132a199dde Mon Sep 17 00:00:00 2001 +From c8116b786630c8cac6f0ae44373e9c34213b9a11 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 15 Oct 2017 00:29:07 +0100 Subject: [PATCH] revert serverside behavior of keepalives @@ -17,10 +17,10 @@ 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 fb63496a0..921e1ec9e 100644 +index 7a6e9132c..8def17495 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -71,7 +71,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { private final MinecraftServer minecraftServer; public EntityPlayer player; private int e; @@ -29,7 +29,7 @@ index fb63496a0..921e1ec9e 100644 private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER // CraftBukkit start - multithreaded fields -@@ -102,6 +102,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -101,6 +101,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { private int E; private int receivedMovePackets; private int processedMovePackets; @@ -37,7 +37,7 @@ index fb63496a0..921e1ec9e 100644 public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { this.minecraftServer = minecraftserver; -@@ -180,18 +181,26 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -179,18 +180,26 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } this.minecraftServer.methodProfiler.enter("keepAlive"); @@ -74,5 +74,5 @@ index fb63496a0..921e1ec9e 100644 this.minecraftServer.methodProfiler.exit(); // CraftBukkit start -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0211-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0211-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 8571c4037..c50a96d33 100644 --- a/Spigot-Server-Patches/0211-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0211-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -1,4 +1,4 @@ -From 810b13008981b065074f558ab5e3e406504f9c9a Mon Sep 17 00:00:00 2001 +From b1d6423949e3b375ceef052ea5778ae7afc19391 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,10 +6,10 @@ 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 96e3d20e3..4aa8e85ab 100644 +index 7343eb25c..610e76328 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -992,6 +992,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -989,6 +989,15 @@ public abstract class EntityHuman extends EntityLiving { this.k = 0; } @@ -25,7 +25,7 @@ index 96e3d20e3..4aa8e85ab 100644 public void attack(Entity entity) { if (entity.bk()) { if (!entity.t(this)) { -@@ -1016,7 +1025,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1013,7 +1022,7 @@ public abstract class EntityHuman extends EntityLiving { int i = b0 + EnchantmentManager.b((EntityLiving) this); if (this.isSprinting() && flag) { @@ -34,7 +34,7 @@ index 96e3d20e3..4aa8e85ab 100644 ++i; flag1 = true; } -@@ -1094,7 +1103,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1091,7 +1100,7 @@ public abstract class EntityHuman extends EntityLiving { } } @@ -43,7 +43,7 @@ index 96e3d20e3..4aa8e85ab 100644 this.dl(); } -@@ -1124,15 +1133,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1121,15 +1130,15 @@ public abstract class EntityHuman extends EntityLiving { } if (flag2) { @@ -62,7 +62,7 @@ index 96e3d20e3..4aa8e85ab 100644 } } -@@ -1188,7 +1197,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1185,7 +1194,7 @@ public abstract class EntityHuman extends EntityLiving { this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value } else { @@ -72,10 +72,10 @@ index 96e3d20e3..4aa8e85ab 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 44ed34174..c1ede0651 100644 +index 4f261554c..88300e2e5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -954,6 +954,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -949,6 +949,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.a(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1); } @@ -89,5 +89,5 @@ index 44ed34174..c1ede0651 100644 for (int i = 0; i < this.v.size(); ++i) { ((IWorldAccess) this.v.get(i)).a(entityhuman, soundeffect, soundcategory, d0, d1, d2, f, f1); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0212-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0212-Option-for-maximum-exp-value-when-merging-orbs.patch index 40682dcc4..b9879e3a2 100644 --- a/Spigot-Server-Patches/0212-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0212-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -1,4 +1,4 @@ -From 74eddc1deef9efd69230110de71d669ff4e975ce Mon Sep 17 00:00:00 2001 +From 47927bae1594244801c9463f4be46f1fbe21814a 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 @@ -20,10 +20,10 @@ index af31030dc..b6764c7ec 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 464c5cfc9..14df8e80b 100644 +index 943963047..ea4262154 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -390,16 +390,32 @@ public class CraftEventFactory { +@@ -389,16 +389,32 @@ public class CraftEventFactory { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { @@ -57,8 +57,8 @@ index 464c5cfc9..14df8e80b 100644 + + } // Paper end - End iteration skip check - All tweaking ends here } - } // Spigot end - + // Spigot end + } else { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0213-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0213-Add-PlayerArmorChangeEvent.patch index cafea882c..c769458c5 100644 --- a/Spigot-Server-Patches/0213-Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/0213-Add-PlayerArmorChangeEvent.patch @@ -1,11 +1,11 @@ -From 5c51a9da0fcb134769342e0df890ca2eba28db0f Mon Sep 17 00:00:00 2001 +From 3d2a61c0fcd768b1206f3ac3b45b092a47c2a109 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 a6457e870..fadf1df28 100644 +index 6e96cea08..ffff7390e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1,5 +1,6 @@ @@ -30,11 +30,11 @@ index a6457e870..fadf1df28 100644 if (!itemstack.isEmpty()) { this.getAttributeMap().a(itemstack.a(enumitemslot)); diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java -index a13515a7f..bad1020c0 100644 +index a9a133993..8f4b5dca9 100644 --- a/src/main/java/net/minecraft/server/EnumItemSlot.java +++ b/src/main/java/net/minecraft/server/EnumItemSlot.java -@@ -20,6 +20,7 @@ public enum EnumItemSlot { - this.j = s1; +@@ -16,6 +16,7 @@ public enum EnumItemSlot { + this.j = s; } + public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER @@ -42,5 +42,5 @@ index a13515a7f..bad1020c0 100644 return this.g; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0214-Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/0214-Prevent-logins-from-being-processed-when-the-player-.patch index a78fe5ca7..d6ef2206f 100644 --- a/Spigot-Server-Patches/0214-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/0214-Prevent-logins-from-being-processed-when-the-player-.patch @@ -1,4 +1,4 @@ -From e106aa50619ecca4bba2cfefef7aa059f6e71cb3 Mon Sep 17 00:00:00 2001 +From 86fdd97563ac2a97f7eb6157b30d794b6774d469 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,10 +6,10 @@ 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 b682b3a43..30be39b0c 100644 +index 74bc08f85..15c01333e 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 { +@@ -56,7 +56,11 @@ public class LoginListener implements PacketLoginInListener, ITickable { } // Paper end if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) { @@ -23,5 +23,5 @@ index b682b3a43..30be39b0c 100644 EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId()); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0215-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0215-use-CB-BlockState-implementations-for-captured-block.patch index c42faf879..d3c0d8ac8 100644 --- a/Spigot-Server-Patches/0215-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0215-use-CB-BlockState-implementations-for-captured-block.patch @@ -1,4 +1,4 @@ -From 9b9fe2b3f6f190b099ab4e5400f6a60cd2ac759d Mon Sep 17 00:00:00 2001 +From 07f232b3d10c3ec618d75a831c74f61476134e3a 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,10 +18,10 @@ 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 15e07ce84..2ddc3f050 100644 +index 88300e2e5..f637aed77 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -401,7 +401,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -396,7 +396,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit start - capture blockstates CraftBlockState blockstate = null; if (this.captureBlockStates) { @@ -31,5 +31,5 @@ index 15e07ce84..2ddc3f050 100644 } // CraftBukkit end -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0217-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0217-AsyncTabCompleteEvent.patch index 85d5e63da..3bfd03a07 100644 --- a/Spigot-Server-Patches/0217-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0217-AsyncTabCompleteEvent.patch @@ -1,4 +1,4 @@ -From 329d98d1c8a9fa4db98a61786037815ef3d5cde5 Mon Sep 17 00:00:00 2001 +From 1345d01ce3b92d6c6a1d347dddb3140bbdf03241 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Nov 2017 13:19:58 -0500 Subject: [PATCH] AsyncTabCompleteEvent @@ -14,10 +14,10 @@ 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 921e1ec9e..f74e642b8 100644 +index 8def17495..1a2e8a8da 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -508,10 +508,10 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -507,10 +507,10 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } public void a(PacketPlayInTabComplete packetplayintabcomplete) { @@ -30,10 +30,11 @@ index 921e1ec9e..f74e642b8 100644 return; } // CraftBukkit end -@@ -521,12 +521,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -520,12 +520,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { stringreader.skip(); } +- ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); + // Paper start - async tab completion + com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event; + java.util.List completions = new java.util.ArrayList<>(); @@ -46,7 +47,7 @@ index 921e1ec9e..f74e642b8 100644 + if (!event.isHandled()) { + if (!event.isCancelled()) { + // Paper end - async tab completion - ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); ++ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer @@ -125,5 +126,5 @@ index 1e3aae3b8..95d13c146 100644 Waitable> waitable = new Waitable>() { @Override -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0220-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0220-ExperienceOrbMergeEvent.patch index 14a38560a..f2f38128a 100644 --- a/Spigot-Server-Patches/0220-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0220-ExperienceOrbMergeEvent.patch @@ -1,4 +1,4 @@ -From 057183312e4a71d698e6238a1d15ed5674587de7 Mon Sep 17 00:00:00 2001 +From faebfc4f844215b7c279659f879bbbd2b1023e2e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:57:26 -0500 Subject: [PATCH] ExperienceOrbMergeEvent @@ -8,10 +8,10 @@ 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/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 14df8e80b..9578e9d2e 100644 +index ea4262154..a7c0f8dd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -400,7 +400,7 @@ public class CraftEventFactory { +@@ -399,7 +399,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start @@ -21,5 +21,5 @@ index 14df8e80b..9578e9d2e 100644 if ((int) newTotal < 0) continue; // Overflow if (maxValue > 0 && newTotal > (long)maxValue) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0221-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0221-Ability-to-apply-mending-to-XP-API.patch index 031cd1d3d..9941f616a 100644 --- a/Spigot-Server-Patches/0221-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0221-Ability-to-apply-mending-to-XP-API.patch @@ -1,4 +1,4 @@ -From f4958d9d4612617fd65171cd018b29a9000af5fd Mon Sep 17 00:00:00 2001 +From ac4b5a6cfef69ce824ffac274175e930cbce739e 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,17 +10,17 @@ 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 e1ea8da88..f1921e151 100644 +index 108ec49aa..72f0bec4e 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java -@@ -223,6 +223,7 @@ public class EnchantmentManager { +@@ -242,6 +242,7 @@ public class EnchantmentManager { return getEnchantmentLevel(Enchantments.CHANNELING, itemstack) > 0; } + public static ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) { return b(enchantment, entityliving); } // Paper - OBFHELPER public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) { - List list = enchantment.a(entityliving);// Paper - decompile fix - if (list.isEmpty()) { + List list = enchantment.a(entityliving); + diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java index 4bcae2c21..09d85764b 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -39,7 +39,7 @@ index 4bcae2c21..09d85764b 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 8046a2a5f..45f7a4143 100644 +index eb0330ee1..5a01466e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1023,8 +1023,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -84,5 +84,5 @@ index 8046a2a5f..45f7a4143 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0222-Configurable-Chunks-Sends-per-Tick-setting.patch b/Spigot-Server-Patches/0222-Configurable-Chunks-Sends-per-Tick-setting.patch index e320c226c..e736ee779 100644 --- a/Spigot-Server-Patches/0222-Configurable-Chunks-Sends-per-Tick-setting.patch +++ b/Spigot-Server-Patches/0222-Configurable-Chunks-Sends-per-Tick-setting.patch @@ -1,4 +1,4 @@ -From 4cbdcadcd9ba0fee0c8d637e33a81ef921f4568c Mon Sep 17 00:00:00 2001 +From a15b922aa1526f9dbc543fc0a36b69d11931206b 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 @@ -26,10 +26,10 @@ index b6764c7ec..29cb718fb 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 5935bae58..b1ece38b2 100644 +index e428d4485..f481e5a4f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -168,7 +168,7 @@ public class PlayerChunkMap { +@@ -164,7 +164,7 @@ public class PlayerChunkMap { } if (!this.g.isEmpty()) { @@ -39,5 +39,5 @@ index 5935bae58..b1ece38b2 100644 Iterator iterator2 = this.g.iterator(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0223-Configurable-Max-Chunk-Gens-per-Tick.patch b/Spigot-Server-Patches/0223-Configurable-Max-Chunk-Gens-per-Tick.patch index a9cf55ed1..7b0e3941f 100644 --- a/Spigot-Server-Patches/0223-Configurable-Max-Chunk-Gens-per-Tick.patch +++ b/Spigot-Server-Patches/0223-Configurable-Max-Chunk-Gens-per-Tick.patch @@ -1,4 +1,4 @@ -From 38f954aac3cbf55ef4c2ab8a91559775e2dcc5c0 Mon Sep 17 00:00:00 2001 +From c703e646937694eef89f39aca50807f9c6cac216 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 @@ -33,30 +33,30 @@ index 29cb718fb..695bdf2e6 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 5497a458d..db43a8a9a 100644 +index b9d90c4fb..7d3f846a1 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -19,6 +19,7 @@ public class PlayerChunk { +@@ -21,6 +21,7 @@ public class PlayerChunk { private int h; private long i; private boolean done; + boolean chunkExists; // Paper - public PlayerChunk(PlayerChunkMap playerchunkmap, int ix, int j) { + public PlayerChunk(PlayerChunkMap playerchunkmap, int i, int j) { this.playerChunkMap = playerchunkmap; -@@ -26,6 +27,7 @@ public class PlayerChunk { - ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); - this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); -+ this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), ix, j); // Paper +@@ -29,6 +30,7 @@ public class PlayerChunk { + + chunkproviderserver.a(i, j); + this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); ++ this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper markChunkUsed(); // Paper - delay chunk unloads } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index b1ece38b2..27343174d 100644 +index f481e5a4f..679488a3c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -136,6 +136,7 @@ public class PlayerChunkMap { +@@ -132,6 +132,7 @@ public class PlayerChunkMap { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); @@ -64,7 +64,7 @@ index b1ece38b2..27343174d 100644 // Spigot end Iterator iterator1 = this.h.iterator(); -@@ -145,6 +146,11 @@ public class PlayerChunkMap { +@@ -141,6 +142,11 @@ public class PlayerChunkMap { if (playerchunk1.f() == null) { boolean flag = playerchunk1.a(PlayerChunkMap.b); @@ -107,5 +107,5 @@ index 193c3621c..cf1258c55 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0229-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/0229-PlayerAdvancementCriterionGrantEvent.patch index 6eb36a20a..05b1c6281 100644 --- a/Spigot-Server-Patches/0229-PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-Server-Patches/0229-PlayerAdvancementCriterionGrantEvent.patch @@ -1,14 +1,14 @@ -From 0b6035594dd684f00ad974a6eccc316657341c06 Mon Sep 17 00:00:00 2001 +From a3bd481882e2f69ddb4d1cff0cc7736c9f148d56 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 9b5a4f469..5cb3a605d 100644 +index 519bccdad..c7ad71c5f 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 { +@@ -228,6 +228,12 @@ public class AdvancementDataPlayer { boolean flag1 = advancementprogress.isDone(); if (advancementprogress.a(s)) { @@ -22,5 +22,5 @@ index 9b5a4f469..5cb3a605d 100644 this.i.add(advancement); flag = true; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0230-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0230-Add-ArmorStand-Item-Meta.patch index 5e370672b..2ec04c096 100644 --- a/Spigot-Server-Patches/0230-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0230-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From 0159128a90741991f54ab7f3851bfe6435d27ffd Mon Sep 17 00:00:00 2001 +From 2993601294994d6c7a4ce83f3e427f21cc9c5cdd 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 @@ -40,10 +40,10 @@ index d1a546c8f..284630f74 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..0e8acf12e +index 000000000..c00b89c8d --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -@@ -0,0 +1,309 @@ +@@ -0,0 +1,311 @@ +package org.bukkit.craftbukkit.inventory; + +import com.destroystokyo.paper.inventory.meta.ArmorStandMeta; @@ -55,6 +55,8 @@ index 000000000..0e8acf12e +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.NBTBase; +import net.minecraft.server.NBTTagCompound; ++ ++import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; @@ -224,7 +226,7 @@ index 000000000..0e8acf12e + + if (tag.hasKey(ENTITY_TAG.NBT)) { + entityTag = tag.getCompound(ENTITY_TAG.NBT); -+ MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, CraftMagicNumbers.DATA_VERSION); ++ MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, Bukkit.getUnsafe().getDataVersion()); + + if (entityTag.hasKey(INVISIBLE.NBT)) { + invisible = entityTag.getBoolean(INVISIBLE.NBT); @@ -354,7 +356,7 @@ index 000000000..0e8acf12e + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c00ced8e8..197563552 100644 +index 1c94fd908..05d3ff969 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -155,6 +155,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @@ -365,7 +367,7 @@ index c00ced8e8..197563552 100644 .put(CraftMetaItem.class, "UNSPECIFIC") .build(); -@@ -1280,7 +1281,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1286,7 +1287,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { CraftMetaCharge.EXPLOSION.NBT, CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMetaKnowledgeBook.BOOK_RECIPES.NBT, @@ -414,5 +416,5 @@ index 65b8123a8..0ad0004b9 100644 assertThat("Forgotten test?", providers, hasSize(ItemStackTest.COMPOUND_MATERIALS.length - 4/* Normal item meta, skulls, eggs and tile entities */)); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0233-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0233-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 8436b9302..39bddd4c3 100644 --- a/Spigot-Server-Patches/0233-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/0233-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -1,4 +1,4 @@ -From 9be837a19033cb6b1fb3b5e48593cd0dd20c86c3 Mon Sep 17 00:00:00 2001 +From 98c9114ac7b3c07e14234080c7ef7871b9d8792c 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. @@ -21,10 +21,10 @@ index 313dd9891..56226bc86 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 4aa8e85ab..d5adc0a24 100644 +index 610e76328..149731353 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1032,6 +1032,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1029,6 +1029,7 @@ public abstract class EntityHuman extends EntityLiving { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.z_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving; @@ -33,5 +33,5 @@ index 4aa8e85ab..d5adc0a24 100644 if (flag2) { f *= 1.5F; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0235-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0235-Prevent-Frosted-Ice-from-loading-holding-chunks.patch index 5686f1817..494f1d54d 100644 --- a/Spigot-Server-Patches/0235-Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ b/Spigot-Server-Patches/0235-Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -1,32 +1,32 @@ -From f6be9923bfdf606012746f71fbb32ffb06ddc952 Mon Sep 17 00:00:00 2001 +From dd443010b1ebb8d120b26a24dccf8c1f10caf5bb 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 598621fbb..5c5b3a531 100644 +index 792a69ad5..fa7407ba6 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java -@@ -16,7 +16,8 @@ public class BlockIceFrost extends BlockIce { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); -- IBlockData iblockdata1 = world.getType(blockposition$b); -+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition$b); // Paper - don't load chunks +@@ -25,7 +25,8 @@ public class BlockIceFrost extends BlockIce { + EnumDirection enumdirection = aenumdirection[j]; + + blockposition_b.g(blockposition).c(enumdirection); +- IBlockData iblockdata1 = world.getType(blockposition_b); ++ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_b); // Paper - don't load chunks + if (iblockdata1 == null) continue; // Paper - if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) { - world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay - } -@@ -53,7 +54,7 @@ public class BlockIceFrost extends BlockIce { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); -- if (iblockaccess.getType(blockposition$b).getBlock() == this) { -+ if (((World) iblockaccess).getBlockIfLoaded(blockposition$b) == this) { // Paper - don't load chunks + + if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) { + world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay +@@ -87,7 +88,7 @@ public class BlockIceFrost extends BlockIce { + EnumDirection enumdirection = aenumdirection[l]; + + blockposition_b.g(blockposition).c(enumdirection); +- if (iblockaccess.getType(blockposition_b).getBlock() == this) { ++ if (((World) iblockaccess).getBlockIfLoaded(blockposition_b) == this) { // Paper - don't load chunks ++j; if (j >= i) { boolean flag = false; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0236-Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/0236-Disable-Explicit-Network-Manager-Flushing.patch index 4973796d6..17e44dd2e 100644 --- a/Spigot-Server-Patches/0236-Disable-Explicit-Network-Manager-Flushing.patch +++ b/Spigot-Server-Patches/0236-Disable-Explicit-Network-Manager-Flushing.patch @@ -1,4 +1,4 @@ -From 0019dfaa0a4e8fb508ad9e9298822ec3bae74686 Mon Sep 17 00:00:00 2001 +From da2021ad134355be28703552fa4fb8ffe062cfb8 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,10 +12,10 @@ 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 4f3f88ff6..f8facddb4 100644 +index 2ff2549d0..4a50aab51 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> { +@@ -65,6 +65,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { // Paper start - NetworkClient implementation public int protocolVersion; public java.net.InetSocketAddress virtualHost; @@ -23,7 +23,7 @@ index 4f3f88ff6..f8facddb4 100644 // Paper end public NetworkManager(EnumProtocolDirection enumprotocoldirection) { -@@ -238,7 +239,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -237,7 +238,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } if (this.channel != null) { @@ -33,5 +33,5 @@ index 4f3f88ff6..f8facddb4 100644 if (this.u++ % 20 == 0) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0237-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0237-Implement-extended-PaperServerListPingEvent.patch index 6b28250e4..b63cb3392 100644 --- a/Spigot-Server-Patches/0237-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0237-Implement-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From 3e4d2f1027bb17badd21e471bbe0f2ad900a24bf Mon Sep 17 00:00:00 2001 +From 8126973d504b4841430b8c737eb0d76fe14a557e Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -177,7 +177,7 @@ index 000000000..26e3031d2 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 906bd973d..9b823d4ca 100644 +index d8e82a83c..a55ab0fd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,6 +1,7 @@ @@ -188,7 +188,7 @@ index 906bd973d..9b823d4ca 100644 import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -@@ -943,7 +944,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -938,7 +939,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati if (i - this.Y >= 5000000000L) { this.Y = i; this.m.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); @@ -221,7 +221,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 c338d09bf..087f5fe0d 100644 +index aa125a52d..ea52e89bd 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 { @@ -232,7 +232,7 @@ index c338d09bf..087f5fe0d 100644 public ServerPing.ServerPingPlayerSample b() { return this.b; } -@@ -156,10 +157,12 @@ public class ServerPing { +@@ -160,10 +161,12 @@ public class ServerPing { return this.b; } @@ -246,10 +246,10 @@ index c338d09bf..087f5fe0d 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9584950c6..eed96c60c 100644 +index 56f135f24..9c442dee2 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -291,7 +291,7 @@ public class SpigotConfig +@@ -290,7 +290,7 @@ public class SpigotConfig public static int playerSample; private static void playerSample() { @@ -259,5 +259,5 @@ index 9584950c6..eed96c60c 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0239-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/0239-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index a7346fea2..be3992691 100644 --- a/Spigot-Server-Patches/0239-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/0239-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -1,4 +1,4 @@ -From f7d0b364eb1ef2d4246d44382e38511d771dee26 Mon Sep 17 00:00:00 2001 +From 02923a0060670bc76eef8a1a74bd53b02fe42234 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 30be39b0c..ca3a211a5 100644 +index 15c01333e..da5a7b3e9 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -1,5 +1,7 @@ @@ -17,7 +17,7 @@ index 30be39b0c..ca3a211a5 100644 import com.mojang.authlib.GameProfile; import com.mojang.authlib.exceptions.AuthenticationUnavailableException; import io.netty.channel.ChannelFuture; -@@ -20,6 +22,7 @@ import org.apache.logging.log4j.LogManager; +@@ -19,6 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // CraftBukkit start @@ -25,7 +25,7 @@ index 30be39b0c..ca3a211a5 100644 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; -@@ -280,8 +283,16 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -279,8 +282,16 @@ public class LoginListener implements PacketLoginInListener, ITickable { java.util.UUID uniqueId = i.getId(); final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; @@ -44,5 +44,5 @@ index 30be39b0c..ca3a211a5 100644 if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) { final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0241-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0241-Player.setPlayerProfile-API.patch index efe521fcb..73635e7a9 100644 --- a/Spigot-Server-Patches/0241-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0241-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 897d4808a90fc03d824d304830659d3f6b35ee49 Mon Sep 17 00:00:00 2001 +From 0f2b7a3412a884f55e3589c9d892c9d76d4026cb Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:29:48 -0400 Subject: [PATCH] Player.setPlayerProfile API @@ -6,10 +6,10 @@ 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 d5adc0a24..507641fc6 100644 +index 149731353..cae5d323e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -66,7 +66,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -63,7 +63,7 @@ public abstract class EntityHuman extends EntityLiving { protected int bZ; protected float ca = 0.02F; private int g; @@ -19,10 +19,10 @@ index d5adc0a24..507641fc6 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 ca3a211a5..58a2f3d28 100644 +index da5a7b3e9..c5801122d 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 { +@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener, ITickable { public final NetworkManager networkManager; private LoginListener.EnumProtocolState g; private int h; @@ -31,7 +31,7 @@ index ca3a211a5..58a2f3d28 100644 private final String j; private SecretKey loginKey; private EntityPlayer l; -@@ -284,12 +284,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -283,12 +283,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; // Paper start @@ -48,7 +48,7 @@ index ca3a211a5..58a2f3d28 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 45f7a4143..b1cba904e 100644 +index 5a01466e2..5945089fb 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 @@ @@ -139,5 +139,5 @@ index 45f7a4143..b1cba904e 100644 public void removeDisconnectingPlayer(Player player) { hiddenPlayers.remove(player.getUniqueId()); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0242-Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/0242-Fix-Dragon-Server-Crashes.patch index fffa6ffc4..ea6a31ee7 100644 --- a/Spigot-Server-Patches/0242-Fix-Dragon-Server-Crashes.patch +++ b/Spigot-Server-Patches/0242-Fix-Dragon-Server-Crashes.patch @@ -1,4 +1,4 @@ -From cf49a77d720e289f094cb4e31e44d3053ef90e90 Mon Sep 17 00:00:00 2001 +From c723aaf4cf2e41f4ddced72a54686523ebe8fccc 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,18 +7,18 @@ 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 da89a69ed..45f96078c 100644 +index 1180e7bc1..1906bcfc9 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -@@ -49,7 +49,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded - double d2 = this.a.bD.locY + (double)(this.a.bD.length / 2.0F); - BlockPosition.MutableBlockPosition blockposition$mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); +@@ -51,7 +51,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded + double d2 = this.a.bD.locY + (double) (this.a.bD.length / 2.0F); + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); -- while(this.a.world.isEmpty(blockposition$mutableblockposition)) { -+ while(this.a.world.isEmpty(blockposition$mutableblockposition) && d2 > 0) { // Paper +- while (this.a.world.isEmpty(blockposition_mutableblockposition)) { ++ while (this.a.world.isEmpty(blockposition_mutableblockposition ) && d2 > 0) { // Paper --d2; - blockposition$mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); + blockposition_mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0246-Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/0246-Call-PaperServerListPingEvent-for-legacy-pings.patch index 506a290e3..ebb84dc89 100644 --- a/Spigot-Server-Patches/0246-Call-PaperServerListPingEvent-for-legacy-pings.patch +++ b/Spigot-Server-Patches/0246-Call-PaperServerListPingEvent-for-legacy-pings.patch @@ -1,4 +1,4 @@ -From 6dee247ee43798b736446d22975f00d91b2ab921 Mon Sep 17 00:00:00 2001 +From bc85306ab6c9b3b7dc491341fad4753155a7d9bf 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 @@ -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 976888b66..48e7ae2d5 100644 +index 2a99f34df..2a30af7de 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -1,5 +1,7 @@ @@ -106,7 +106,7 @@ index 976888b66..48e7ae2d5 100644 switch (i) { case 0: LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); -- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()}); // CraftBukkit +- s = String.format("%s\u00a7%d\u00a7%d", event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()); // CraftBukkit + // Paper start - Call PaperServerListPingEvent and use results + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null); + if (event == null) { @@ -121,7 +121,7 @@ index 976888b66..48e7ae2d5 100644 } LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); -- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { 127, minecraftserver.getVersion(), event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()}); // CraftBukkit +- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, minecraftserver.getVersion(), event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()); // CraftBukkit + // Paper start - Call PaperServerListPingEvent and use results + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 127, null); // Paper + if (event == null) { @@ -153,5 +153,5 @@ index 976888b66..48e7ae2d5 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0250-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0250-Configurable-sprint-interruption-on-attack.patch index d9dee1a86..4c86c2318 100644 --- a/Spigot-Server-Patches/0250-Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/0250-Configurable-sprint-interruption-on-attack.patch @@ -1,4 +1,4 @@ -From f4100dc6bb306ce750f2369a5802dad3590effa7 Mon Sep 17 00:00:00 2001 +From 3f5a8b894d2cb8f863f1066c08474c1e92728613 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 @@ -20,10 +20,10 @@ index 56226bc86..6bb54fcbd 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 507641fc6..2bab2ab92 100644 +index cae5d323e..260478166 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1084,7 +1084,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1081,7 +1081,11 @@ public abstract class EntityHuman extends EntityLiving { this.motX *= 0.6D; this.motZ *= 0.6D; @@ -37,5 +37,5 @@ index 507641fc6..2bab2ab92 100644 if (flag3) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0251-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0251-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index f68763d17..6f1a31dda 100644 --- a/Spigot-Server-Patches/0251-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0251-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -1,11 +1,11 @@ -From b4306a885ddf71c79918aabff5fdb6865f2327b8 Mon Sep 17 00:00:00 2001 +From f873cffebca4f0b1919d9c2f17ce0700200582b4 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 371513042..871dea68f 100644 +index 21570ceb7..dfd64d1f5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2483,7 +2483,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -18,5 +18,5 @@ index 371513042..871dea68f 100644 SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); this.server.getPluginManager().callEvent(event); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0252-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0252-EndermanEscapeEvent.patch index 3958e5f49..e0870455f 100644 --- a/Spigot-Server-Patches/0252-EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/0252-EndermanEscapeEvent.patch @@ -1,4 +1,4 @@ -From a1c129eac9366b285b7b4a5bed20576929f97195 Mon Sep 17 00:00:00 2001 +From ca6893396d1e8de4d24ee5b0a93039d12b86d2e0 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 db618ae68..5d5c21bba 100644 +index d5d1be8b6..8949529e6 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -1,6 +1,7 @@ @@ -19,7 +19,7 @@ index db618ae68..5d5c21bba 100644 import java.util.Random; import java.util.UUID; import java.util.function.Function; -@@ -56,6 +57,12 @@ public class EntityEnderman extends EntityMonster { +@@ -48,6 +49,12 @@ public class EntityEnderman extends EntityMonster { setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); } @@ -32,7 +32,7 @@ index db618ae68..5d5c21bba 100644 @Override public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { if (!super.setGoalTarget(entityliving, reason, fireEvent)) { -@@ -168,7 +175,7 @@ public class EntityEnderman extends EntityMonster { +@@ -160,7 +167,7 @@ public class EntityEnderman extends EntityMonster { if (this.world.L() && this.ticksLived >= this.bE + 600) { float f = this.az(); @@ -41,7 +41,7 @@ index db618ae68..5d5c21bba 100644 this.setGoalTarget((EntityLiving) null); this.dz(); } -@@ -247,7 +254,7 @@ public class EntityEnderman extends EntityMonster { +@@ -239,7 +246,7 @@ public class EntityEnderman extends EntityMonster { public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable(damagesource)) { return false; @@ -50,7 +50,7 @@ index db618ae68..5d5c21bba 100644 for (int i = 0; i < 64; ++i) { if (this.dz()) { return true; -@@ -258,7 +265,7 @@ public class EntityEnderman extends EntityMonster { +@@ -250,7 +257,7 @@ public class EntityEnderman extends EntityMonster { } else { boolean flag = super.damageEntity(damagesource, f); @@ -59,7 +59,7 @@ index db618ae68..5d5c21bba 100644 this.dz(); } -@@ -347,7 +354,7 @@ public class EntityEnderman extends EntityMonster { +@@ -339,7 +346,7 @@ public class EntityEnderman extends EntityMonster { static class PathfinderGoalPlayerWhoLookedAtTarget extends PathfinderGoalNearestAttackableTarget { @@ -68,7 +68,7 @@ index db618ae68..5d5c21bba 100644 private EntityHuman j; private int k; private int l; -@@ -399,7 +406,7 @@ public class EntityEnderman extends EntityMonster { +@@ -391,7 +398,7 @@ public class EntityEnderman extends EntityMonster { } else { if (this.d != null) { if (this.i.f((EntityHuman) this.d)) { @@ -78,5 +78,5 @@ index db618ae68..5d5c21bba 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0253-Enderman.teleportRandomly.patch b/Spigot-Server-Patches/0253-Enderman.teleportRandomly.patch index 37a8ade3a..df4764999 100644 --- a/Spigot-Server-Patches/0253-Enderman.teleportRandomly.patch +++ b/Spigot-Server-Patches/0253-Enderman.teleportRandomly.patch @@ -1,4 +1,4 @@ -From 156fe49755603c461fdce079f0c681401edd58b3 Mon Sep 17 00:00:00 2001 +From f2a03bf6e79f1691db683285e1a911c8df456791 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:29:44 -0400 Subject: [PATCH] Enderman.teleportRandomly() @@ -6,10 +6,10 @@ 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 5d5c21bba..d4f7805bb 100644 +index 8949529e6..233568cc1 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 { +@@ -176,6 +176,7 @@ public class EntityEnderman extends EntityMonster { super.mobTick(); } @@ -30,5 +30,5 @@ index b81693d9f..9bc6a6c0c 100644 IBlockData blockData = getHandle().getCarried(); return (blockData == null) ? Material.AIR.getNewData((byte) 0) : CraftMagicNumbers.getMaterial(blockData); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0255-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0255-Expand-World.spawnParticle-API-and-add-Builder.patch index b7a34554c..f5eae2103 100644 --- a/Spigot-Server-Patches/0255-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0255-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From f8709649cb9c3da028d7044b2c7a100169adba61 Mon Sep 17 00:00:00 2001 +From 43819e2b05eb9c6001e91e7895223842e997af52 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 @@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle. 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 5f386ff04..55e45dbb1 100644 +index 44b003325..ed833ffd6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1207,12 +1207,17 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1190,12 +1190,17 @@ public class WorldServer extends World implements IAsyncTaskHandler { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -34,10 +34,10 @@ index 5f386ff04..55e45dbb1 100644 if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b4f908164..d3be0211f 100644 +index 36d27c2a3..d06496762 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1739,11 +1739,17 @@ public class CraftWorld implements World { +@@ -1761,11 +1761,17 @@ public class CraftWorld implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/Spigot-Server-Patches/0256-EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/0256-EndermanAttackPlayerEvent.patch index 77ab04d4b..0e2592333 100644 --- a/Spigot-Server-Patches/0256-EndermanAttackPlayerEvent.patch +++ b/Spigot-Server-Patches/0256-EndermanAttackPlayerEvent.patch @@ -1,4 +1,4 @@ -From 53f0c76aa8b97792b8279381a85ccaf2fa690725 Mon Sep 17 00:00:00 2001 +From 2adf65a4aa830a89ec79a5b94bf515a5eb29d94b Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 May 2018 20:18:54 -0400 Subject: [PATCH] EndermanAttackPlayerEvent @@ -8,10 +8,10 @@ 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 d4f7805bb..d5c55d50e 100644 +index 233568cc1..139a70ca3 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 { +@@ -127,7 +127,15 @@ public class EntityEnderman extends EntityMonster { this.setCarried(iblockdata); } @@ -28,5 +28,5 @@ index d4f7805bb..d5c55d50e 100644 if (itemstack.getItem() == Blocks.CARVED_PUMPKIN.getItem()) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0257-WitchConsumePotionEvent.patch b/Spigot-Server-Patches/0257-WitchConsumePotionEvent.patch index 18aa362aa..111f8870f 100644 --- a/Spigot-Server-Patches/0257-WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/0257-WitchConsumePotionEvent.patch @@ -1,4 +1,4 @@ -From a823f8da82b3c4a701a5a3b744be38f77542d48b Mon Sep 17 00:00:00 2001 +From 26d079a08350eced70d6ca1f352a07ee74d2450d Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 May 2018 20:35:16 -0400 Subject: [PATCH] WitchConsumePotionEvent @@ -6,22 +6,22 @@ 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 093c7de52..f7d809444 100644 +index eaae9ea9a..0d579c7e4 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 { this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a); if (itemstack.getItem() == Items.POTION) { -- List list = PotionUtil.getEffects(itemstack); +- List list = PotionUtil.getEffects(itemstack); + // Paper start + com.destroystokyo.paper.event.entity.WitchConsumePotionEvent event = new com.destroystokyo.paper.event.entity.WitchConsumePotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); + -+ List list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null; ++ List list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null; + // Paper end if (list != null) { Iterator iterator = list.iterator(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0259-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0259-Allow-spawning-Item-entities-with-World.spawnEntity.patch index d6750c240..323d925cf 100644 --- a/Spigot-Server-Patches/0259-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0259-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -1,4 +1,4 @@ -From ecb315e97bab98133c73a2c6a5852646c6d3e4b6 Mon Sep 17 00:00:00 2001 +From 910391e6e6bdf76769a34ec6b860b5f0579f9bb0 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 d3be0211f..b50785aa0 100644 +index d06496762..a436ded60 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1048,6 +1048,10 @@ public class CraftWorld implements World { +@@ -1070,6 +1070,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/0260-Configurable-Villages-loading-chunks-for-door-checks.patch b/Spigot-Server-Patches/0260-Configurable-Villages-loading-chunks-for-door-checks.patch index 956aabbf8..1a2d83c05 100644 --- a/Spigot-Server-Patches/0260-Configurable-Villages-loading-chunks-for-door-checks.patch +++ b/Spigot-Server-Patches/0260-Configurable-Villages-loading-chunks-for-door-checks.patch @@ -1,4 +1,4 @@ -From 08d5af6c98be159bee0271797d26563fdd1814f9 Mon Sep 17 00:00:00 2001 +From f7f2d007e5e3d22d55540e90008f7ff619be130e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 00:32:22 -0400 Subject: [PATCH] Configurable Villages loading chunks for door checks @@ -23,19 +23,19 @@ index 9aba755a4..2033ace4f 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -index d14a9e3a3..0be1bf0d9 100644 +index 7a9fb9753..e40cd4186 100644 --- a/src/main/java/net/minecraft/server/PersistentVillage.java +++ b/src/main/java/net/minecraft/server/PersistentVillage.java -@@ -123,7 +123,7 @@ public class PersistentVillage extends PersistentBase { - for(int j = -4; j < 4; ++j) { - for(int k = -16; k < 16; ++k) { - blockposition$mutableblockposition.g(blockposition).d(i, j, k); -- IBlockData iblockdata = this.world.getType(blockposition$mutableblockposition); -+ IBlockData iblockdata = this.world.paperConfig.villagesLoadChunks ? this.world.getType(blockposition$mutableblockposition) : this.world.getTypeIfLoaded(blockposition$mutableblockposition); // Paper +@@ -136,7 +136,7 @@ public class PersistentVillage extends PersistentBase { + for (int j = -4; j < 4; ++j) { + for (int k = -16; k < 16; ++k) { + blockposition_mutableblockposition.g(blockposition).d(i, j, k); +- IBlockData iblockdata = this.world.getType(blockposition_mutableblockposition); ++ IBlockData iblockdata = this.world.paperConfig.villagesLoadChunks ? this.world.getType(blockposition_mutableblockposition) : this.world.getTypeIfLoaded(blockposition_mutableblockposition); // Paper + if (this.a(iblockdata)) { - VillageDoor villagedoor = this.c(blockposition$mutableblockposition); - if (villagedoor == null) { -@@ -193,7 +193,7 @@ public class PersistentVillage extends PersistentBase { + VillageDoor villagedoor = this.c(blockposition_mutableblockposition); +@@ -228,7 +228,7 @@ public class PersistentVillage extends PersistentBase { } private boolean a(IBlockData iblockdata) { @@ -45,7 +45,7 @@ index d14a9e3a3..0be1bf0d9 100644 public void a(NBTTagCompound nbttagcompound) { diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index a8ca29d37..02d8d9749 100644 +index c99d4debc..c63f70b1f 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -11,10 +11,10 @@ import javax.annotation.Nullable; @@ -99,10 +99,10 @@ index a8ca29d37..02d8d9749 100644 return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false; diff --git a/src/main/java/net/minecraft/server/VillageDoor.java b/src/main/java/net/minecraft/server/VillageDoor.java -index 62771547f..74ac3c1ba 100644 +index 33ad5faa3..1edffc462 100644 --- a/src/main/java/net/minecraft/server/VillageDoor.java +++ b/src/main/java/net/minecraft/server/VillageDoor.java -@@ -59,6 +59,7 @@ public class VillageDoor { +@@ -55,6 +55,7 @@ public class VillageDoor { return this.f; } @@ -110,7 +110,7 @@ index 62771547f..74ac3c1ba 100644 public BlockPosition d() { return this.a; } -@@ -75,10 +76,12 @@ public class VillageDoor { +@@ -71,10 +72,12 @@ public class VillageDoor { return this.c.getAdjacentZ() * 2; } @@ -124,5 +124,5 @@ index 62771547f..74ac3c1ba 100644 this.d = i; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0262-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0262-ItemStack-getMaxItemUseDuration.patch index 959977452..8a9e1f90c 100644 --- a/Spigot-Server-Patches/0262-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0262-ItemStack-getMaxItemUseDuration.patch @@ -1,4 +1,4 @@ -From 022de98bb6050d8e9e9e32b31fb68000d42ffd4c Mon Sep 17 00:00:00 2001 +From d0e12406e3b5a779929007d5132ffd5108eb58a6 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 f7ac69456..16d0c2662 100644 +index c08c1e8e4..8f2b0742d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -524,6 +524,7 @@ public final class ItemStack { +@@ -527,6 +527,7 @@ public final class ItemStack { this.getItem().b(this, world, entityhuman); } diff --git a/Spigot-Server-Patches/0265-Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/0265-Properly-remove-entities-on-dimension-teleport.patch index e66e9a984..16b37a7fc 100644 --- a/Spigot-Server-Patches/0265-Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/0265-Properly-remove-entities-on-dimension-teleport.patch @@ -1,4 +1,4 @@ -From 50aa3a863c329e3f0fb655a6414d40eb6ed6845f Mon Sep 17 00:00:00 2001 +From ab5a860741bd1befed79f88e1314c120dc62d65d 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 7c558c355..d033969cd 100644 +index 139207f33..df7a1a47e 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 +@@ -2592,7 +2592,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end */ @@ -35,10 +35,10 @@ index 7c558c355..d033969cd 100644 this.world.methodProfiler.enter("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 55e45dbb1..91850fded 100644 +index ed833ffd6..8082de88f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1021,6 +1021,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1004,6 +1004,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } protected void c(Entity entity) { @@ -47,5 +47,5 @@ index 55e45dbb1..91850fded 100644 this.entitiesById.d(entity.getId()); this.entitiesByUUID.remove(entity.getUniqueID()); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0267-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0267-Configurable-Alternative-LootPool-Luck-Formula.patch index 8bb220060..cf1dd5e09 100644 --- a/Spigot-Server-Patches/0267-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/0267-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -1,4 +1,4 @@ -From b91e19596e9c455a5893b65fa23a1bcb9d5bb686 Mon Sep 17 00:00:00 2001 +From c8284559251c0f3e8d9451c4a7e95b3a5b006599 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 @@ -53,13 +53,13 @@ index 5c18e5770..48b0a742a 100644 + } } diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 8daccdd6e..c2a4ed6cf 100644 +index 3e313bba7..80f9f9a25 100644 --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java -@@ -13,8 +13,8 @@ import java.util.Collection; - import java.util.Random; +@@ -14,8 +14,8 @@ import java.util.Random; public abstract class LootSelectorEntry { + - protected final int c; - protected final int d; + protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER @@ -67,11 +67,11 @@ index 8daccdd6e..c2a4ed6cf 100644 protected final LootItemCondition[] e; protected LootSelectorEntry(int i, int j, LootItemCondition[] alootitemcondition) { -@@ -24,8 +24,34 @@ public abstract class LootSelectorEntry { +@@ -25,8 +25,34 @@ public abstract class LootSelectorEntry { } public int a(float f) { -- return Math.max(MathHelper.d((float)this.c + (float)this.d * f), 0); +- return Math.max(MathHelper.d((float) this.c + (float) this.d * f), 0); + // Paper start - Offer an alternative loot formula to refactor how luck bonus applies + // SEE: https://luckformula.emc.gs for details and data + if (lastLuck != null && lastLuck == f) { @@ -101,8 +101,8 @@ index 8daccdd6e..c2a4ed6cf 100644 + private int lastWeight = 0; + // Paper end - public abstract void a(Collection var1, Random var2, LootTableInfo var3); + public abstract void a(Collection collection, Random random, LootTableInfo loottableinfo); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0270-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/0270-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index aca01660e..4beb8c364 100644 --- a/Spigot-Server-Patches/0270-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/0270-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -1,4 +1,4 @@ -From 1a9a6679427f52fe5262edb0a31b9cb71b981f0f Mon Sep 17 00:00:00 2001 +From fd52f1040f689774b9105819a6593fca83013006 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,10 +6,10 @@ 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 1a1619260..c8cdd990e 100644 +index 5a21aed43..4d9f3d369 100644 --- a/src/main/java/net/minecraft/server/RecipeBookServer.java +++ b/src/main/java/net/minecraft/server/RecipeBookServer.java -@@ -79,6 +79,10 @@ public class RecipeBookServer extends RecipeBook { +@@ -78,6 +78,10 @@ public class RecipeBookServer extends RecipeBook { while (iterator.hasNext()) { MinecraftKey minecraftkey = (MinecraftKey) iterator.next(); @@ -20,7 +20,7 @@ index 1a1619260..c8cdd990e 100644 nbttaglist.add((NBTBase) (new NBTTagString(minecraftkey.toString()))); } -@@ -89,6 +93,10 @@ public class RecipeBookServer extends RecipeBook { +@@ -88,6 +92,10 @@ public class RecipeBookServer extends RecipeBook { while (iterator1.hasNext()) { MinecraftKey minecraftkey1 = (MinecraftKey) iterator1.next(); @@ -32,5 +32,5 @@ index 1a1619260..c8cdd990e 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0272-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0272-PlayerReadyArrowEvent.patch index a9b2fc1d9..c8ecc2e08 100644 --- a/Spigot-Server-Patches/0272-PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/0272-PlayerReadyArrowEvent.patch @@ -1,4 +1,4 @@ -From 6a1faac5ed0df41c015eb1859f952485bac1774b Mon Sep 17 00:00:00 2001 +From 763454b873fec72403fa9d124df105c9daf6be35 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 152b179ce..797e9ecf1 100644 +index 1eadc4371..80f112d99 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index 152b179ce..797e9ecf1 100644 + boolean flag = !this.a(entityhuman, itemstack).isEmpty(); // Paper if (!entityhuman.abilities.canInstantlyBuild && !flag) { - return flag ? new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack) : new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); + return flag ? new InteractionResultWrapper<>(EnumInteractionResult.PASS, itemstack) : new InteractionResultWrapper<>(EnumInteractionResult.FAIL, itemstack); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0275-Expand-Explosions-API.patch b/Spigot-Server-Patches/0275-Expand-Explosions-API.patch index 529b6ceab..d3a9d65a0 100644 --- a/Spigot-Server-Patches/0275-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0275-Expand-Explosions-API.patch @@ -1,4 +1,4 @@ -From 424a73b6b937df0974e5bb448020f4efb3ab1e8b Mon Sep 17 00:00:00 2001 +From 0e16be3c8535594ae8167bc60e9b0d7cf5e4b1a6 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 b50785aa0..142ba2c0a 100644 +index a436ded60..35f8f93c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -517,6 +517,11 @@ public class CraftWorld implements World { +@@ -539,6 +539,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/0277-RangedEntity-API.patch b/Spigot-Server-Patches/0277-RangedEntity-API.patch index 9182cdffa..b5a68e03c 100644 --- a/Spigot-Server-Patches/0277-RangedEntity-API.patch +++ b/Spigot-Server-Patches/0277-RangedEntity-API.patch @@ -1,4 +1,4 @@ -From 96e4498b872011add7476c3d221f0f75c9ee8658 Mon Sep 17 00:00:00 2001 +From 86975a3f763aea0432c2ea606d4aff04ee33c683 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 26 Jun 2018 22:00:49 -0400 Subject: [PATCH] RangedEntity API @@ -32,18 +32,18 @@ index 000000000..696660b08 + } +} diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java -index 1b06ce853..94533d19a 100644 +index 4fd69850f..b763bd11d 100644 --- a/src/main/java/net/minecraft/server/IRangedEntity.java +++ b/src/main/java/net/minecraft/server/IRangedEntity.java -@@ -1,7 +1,7 @@ - package net.minecraft.server; +@@ -2,7 +2,7 @@ package net.minecraft.server; public interface IRangedEntity { -- void a(EntityLiving var1, float var2); -+ void a(EntityLiving var1, float var2);default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper OBF HELPER -- void s(boolean var1); -+ void s(boolean var1); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER +- void a(EntityLiving entityliving, float f); ++ void a(EntityLiving entityliving, float f); default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper - OBFHELPER + +- void s(boolean flag); ++ void s(boolean flag); default void setChargingAttack(boolean flag) { s(flag); } // Paper - OBFHELPER } 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 @@ -159,5 +159,5 @@ index 3df0fcb9b..a1d04ff28 100644 private BossBar bossBar; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0279-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0278-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 61% rename from Spigot-Server-Patches/0279-Add-config-to-disable-ender-dragon-legacy-check.patch rename to Spigot-Server-Patches/0278-Add-config-to-disable-ender-dragon-legacy-check.patch index d59343e35..9624e8cee 100644 --- a/Spigot-Server-Patches/0279-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0278-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -1,4 +1,4 @@ -From b62d50045a2dd2fceb8f8cb4a6327091d6f4e3c7 Mon Sep 17 00:00:00 2001 +From 90ed98347acb886351bbc2fc37e14f9e64715e95 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 @@ -19,25 +19,26 @@ index 875650b8d..74185b31f 100644 + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 1e22aa531..e6da1c30f 100644 +index a6259d9e6..aad7ce93f 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java -@@ -27,16 +27,21 @@ public class EnderDragonBattle { +@@ -28,10 +28,10 @@ public class EnderDragonBattle { private int h; private int i; private int j; -+ private void setDragonKilled(boolean dragonKilled) { this.k = dragonKilled; } // Paper - OBFHELPER - private boolean k; +- private boolean k; ++ private boolean k; private void setDragonKilled(boolean dragonKilled) { this.k = dragonKilled; } // Paper - OBFHELPER private boolean l; private UUID m; -- private boolean n = true; -+ private boolean n = true; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER +- private boolean n; ++ private boolean n; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER private BlockPosition o; private EnumDragonRespawn p; private int q; - private List r; - - public EnderDragonBattle(WorldServer worldserver, NBTTagCompound nbttagcompound) { +@@ -41,6 +41,10 @@ public class EnderDragonBattle { + this.bossBattle = (BossBattleServer) (new BossBattleServer(new ChatMessage("entity.minecraft.ender_dragon", new Object[0]), BossBattle.BarColor.PINK, BossBattle.BarStyle.PROGRESS)).setPlayMusic(true).c(true); + this.e = Lists.newArrayList(); + this.n = true; + // Paper start + setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon); + if (!scanForLegacyFight()) setDragonKilled(true); @@ -45,15 +46,6 @@ index 1e22aa531..e6da1c30f 100644 this.d = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("DragonUUID")) { -@@ -293,7 +298,7 @@ public class EnderDragonBattle { - hashset.add(entityplayer); - } - -- HashSet hashset1 = Sets.newHashSet(this.bossBattle.getPlayers()); -+ HashSet hashset1 = Sets.newHashSet(this.bossBattle.getPlayers()); // Paper - decomp fix - hashset1.removeAll(hashset); - - for(EntityPlayer entityplayer1 : hashset1) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0278-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-Server-Patches/0278-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch deleted file mode 100644 index 9ed80ce91..000000000 --- a/Spigot-Server-Patches/0278-Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From cac46f6bb9e69438928374d87044a6fdf8c38f3d 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 - projectile has hit - - -diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7061075b5..0dd52f859 100644 ---- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -995,7 +995,7 @@ public class CraftEventFactory { - hitBlock = entity.getBukkitEntity().getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); - } - -- ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock); -+ ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock, position.direction == null ? null : CraftBlock.notchToBlockFace(position.direction)); // Paper - add BlockFace parameter - entity.world.getServer().getPluginManager().callEvent(event); - return event; - } --- -2.20.0 - diff --git a/Spigot-Server-Patches/0280-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0279-Implement-World.getEntity-UUID-API.patch similarity index 82% rename from Spigot-Server-Patches/0280-Implement-World.getEntity-UUID-API.patch rename to Spigot-Server-Patches/0279-Implement-World.getEntity-UUID-API.patch index a882446bf..f13d5ce64 100644 --- a/Spigot-Server-Patches/0280-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0279-Implement-World.getEntity-UUID-API.patch @@ -1,14 +1,14 @@ -From 79205c69704678c69f4b4c8cca5bef5bdea6a0d2 Mon Sep 17 00:00:00 2001 +From bb7bf7e2a58190bf61bb7a89b204dca34e778826 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 142ba2c0a..d9385aa7a 100644 +index 35f8f93c6..2fca59f8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -868,6 +868,14 @@ public class CraftWorld implements World { +@@ -890,6 +890,14 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0281-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0280-InventoryCloseEvent-Reason-API.patch similarity index 89% rename from Spigot-Server-Patches/0281-InventoryCloseEvent-Reason-API.patch rename to Spigot-Server-Patches/0280-InventoryCloseEvent-Reason-API.patch index a9a0959c5..080eb733f 100644 --- a/Spigot-Server-Patches/0281-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0280-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From 3ef70ba8a64895af46384d4159caccdf87796247 Mon Sep 17 00:00:00 2001 +From a4ed51d175388603e513944bf0bb3c68139ce9e6 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 9d3234c1c..9b88a4190 100644 +index 6150b56e0..3ca579e38 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -944,7 +944,7 @@ public class Chunk implements IChunkAccess { +@@ -943,7 +943,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -19,7 +19,7 @@ index 9d3234c1c..9b88a4190 100644 } } } -@@ -969,7 +969,7 @@ public class Chunk implements IChunkAccess { +@@ -968,7 +968,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -29,10 +29,10 @@ index 9d3234c1c..9b88a4190 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 82e85a035..752848323 100644 +index 260478166..9b8833fed 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -161,7 +161,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -158,7 +158,7 @@ public abstract class EntityHuman extends EntityLiving { this.dg(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { @@ -41,7 +41,7 @@ index 82e85a035..752848323 100644 this.activeContainer = this.defaultContainer; } -@@ -363,6 +363,13 @@ public abstract class EntityHuman extends EntityLiving { +@@ -360,6 +360,13 @@ public abstract class EntityHuman extends EntityLiving { return this.getHealth() <= 0.0F || this.isSleeping(); } @@ -56,10 +56,10 @@ index 82e85a035..752848323 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 5bd65ddbb..bf842a0a9 100644 +index cd488d37f..1054367d0 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -347,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -344,7 +344,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end if (!this.world.isClientSide && !this.activeContainer.canUse(this)) { @@ -68,16 +68,16 @@ index 5bd65ddbb..bf842a0a9 100644 this.activeContainer = this.defaultContainer; } -@@ -553,7 +553,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -555,7 +555,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + if (!event.getKeepInventory()) { this.inventory.clear(); } - -- this.closeInventory(); +- + this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DEATH); // Paper this.setSpectatorTarget(this); // Remove spectated target // CraftBukkit end -@@ -865,7 +865,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -867,7 +867,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.a((new ChatMessage("container.spectatorCantOpen", new Object[0])).a(EnumChatFormat.RED), true); } else { if (this.activeContainer != this.defaultContainer) { @@ -86,7 +86,7 @@ index 5bd65ddbb..bf842a0a9 100644 } if (iinventory instanceof ITileInventory) { -@@ -931,7 +931,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -933,7 +933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -95,7 +95,7 @@ index 5bd65ddbb..bf842a0a9 100644 } this.nextContainerCounter(); -@@ -996,7 +996,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -998,7 +998,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } public void closeInventory() { @@ -110,7 +110,7 @@ index 5bd65ddbb..bf842a0a9 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 159a30e0e..a66f8ab2c 100644 +index dfd64d1f5..3c9cfad9c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2019,7 +2019,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -123,10 +123,10 @@ index 159a30e0e..a66f8ab2c 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 08bbd86d1..6311c9f87 100644 +index 8131ad08f..fac8f83af 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -423,7 +423,7 @@ public abstract class PlayerList { +@@ -422,7 +422,7 @@ public abstract class PlayerList { entityplayer.a(StatisticList.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it @@ -155,7 +155,7 @@ index 707091754..c9cbf6979 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 8699cc72f..0f1d700c7 100644 +index 1ddb6f99f..5792a7538 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -740,7 +740,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,10 +168,10 @@ index 8699cc72f..0f1d700c7 100644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0dd52f859..dcd628104 100644 +index 6c105ef74..83f7116f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1085,8 +1085,19 @@ public class CraftEventFactory { +@@ -1099,8 +1099,19 @@ public class CraftEventFactory { return event; } @@ -193,5 +193,5 @@ index 0dd52f859..dcd628104 100644 human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity()); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0282-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/0281-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch similarity index 89% rename from Spigot-Server-Patches/0282-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch rename to Spigot-Server-Patches/0281-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index ceb46eba6..d4ab8eb74 100644 --- a/Spigot-Server-Patches/0282-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/0281-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -1,4 +1,4 @@ -From 4e1aa38e484da825d02fb5435097c2516e3ea234 Mon Sep 17 00:00:00 2001 +From 194a295182c17f0e74b68286d465126fc28cc2d1 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,10 +10,10 @@ 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 9b88a4190..6c9d7df20 100644 +index 3ca579e38..1c1f39524 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -724,6 +724,7 @@ public class Chunk implements IChunkAccess { +@@ -723,6 +723,7 @@ public class Chunk implements IChunkAccess { ((HeightMap) this.heightMap.get(heightmap_type)).a(along); } @@ -22,10 +22,10 @@ index 9b88a4190..6c9d7df20 100644 this.a(entity, entity.chunkY); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0ca1816cb..7711b2eff 100644 +index f637aed77..84efc1cc3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1192,12 +1192,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1187,12 +1187,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc int j; // Paper start - Set based removal lists for (Entity e : this.g) { @@ -42,7 +42,7 @@ index 0ca1816cb..7711b2eff 100644 } for (Entity e : this.g) { -@@ -1258,12 +1261,17 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1253,12 +1256,17 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.methodProfiler.exit(); this.methodProfiler.enter("remove"); if (entity.dead) { @@ -61,7 +61,7 @@ index 0ca1816cb..7711b2eff 100644 guardEntityList = false; // Spigot this.entityList.remove(this.tickPosition--); // CraftBukkit - Use field for loop variable -@@ -1308,7 +1316,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1303,7 +1311,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc BlockPosition blockposition = tileentity.getPosition(); // Paper start - Skip ticking in chunks scheduled for unload @@ -70,7 +70,7 @@ index 0ca1816cb..7711b2eff 100644 boolean shouldTick = chunk != null; if(this.paperConfig.skipEntityTickingInChunksScheduledForUnload) shouldTick = shouldTick && chunk.scheduledForUnload == null; -@@ -1344,8 +1352,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1339,8 +1347,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); //this.tileEntityList.remove(tileentity); // Paper - remove unused list @@ -85,5 +85,5 @@ index 0ca1816cb..7711b2eff 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0283-Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/0282-Configurable-Bed-Search-Radius.patch similarity index 98% rename from Spigot-Server-Patches/0283-Configurable-Bed-Search-Radius.patch rename to Spigot-Server-Patches/0282-Configurable-Bed-Search-Radius.patch index 3329d96c8..dd2cc1874 100644 --- a/Spigot-Server-Patches/0283-Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/0282-Configurable-Bed-Search-Radius.patch @@ -1,4 +1,4 @@ -From c67f05080f86570908b8e71f87484372bbe3b7c6 Mon Sep 17 00:00:00 2001 +From 27493cc4d5dbc4979536427a27c72212d0521c03 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:22:06 -0400 Subject: [PATCH] Configurable Bed Search Radius @@ -101,5 +101,5 @@ index 06f627002..d81a2db6c 100644 return iblockaccess.getType(blockposition.down()).q() && !iblockaccess.getType(blockposition).getMaterial().isBuildable() && !iblockaccess.getType(blockposition.up()).getMaterial().isBuildable(); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0284-Vex-getSummoner-API.patch b/Spigot-Server-Patches/0283-Vex-getSummoner-API.patch similarity index 94% rename from Spigot-Server-Patches/0284-Vex-getSummoner-API.patch rename to Spigot-Server-Patches/0283-Vex-getSummoner-API.patch index 3d632f7b9..8a2f61b09 100644 --- a/Spigot-Server-Patches/0284-Vex-getSummoner-API.patch +++ b/Spigot-Server-Patches/0283-Vex-getSummoner-API.patch @@ -1,4 +1,4 @@ -From cdf23d76a567bbe5173d53ed24d192ca4471198d Mon Sep 17 00:00:00 2001 +From acaa925fc0a60fa1089fdba56b3197f7d74b20b3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 15:30:22 -0400 Subject: [PATCH] Vex#getSummoner API @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getSummoner 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 b83826b18..90028c802 100644 +index 388d34126..c3864b869 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 { @@ -47,5 +47,5 @@ index 787a41e01..927ed9a9a 100644 public String toString() { return "CraftVex"; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0285-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0284-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 92% rename from Spigot-Server-Patches/0285-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to Spigot-Server-Patches/0284-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 24df10a4b..66c354d83 100644 --- a/Spigot-Server-Patches/0285-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0284-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -1,4 +1,4 @@ -From e42d82959a7bf4c09b1b36f3aa18e7434ee3c4d0 Mon Sep 17 00:00:00 2001 +From fe70b467258a4cf6619c3c2df43f70f7dd74b319 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,7 +16,7 @@ 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 30d5c1734..e204dbe21 100644 +index 3c9cfad9c..5aca8d1f2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1934,6 +1934,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -28,5 +28,5 @@ index 30d5c1734..e204dbe21 100644 } // CraftBukkit end -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0286-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0285-Don-t-change-the-Entity-Random-seed-for-squids.patch similarity index 87% rename from Spigot-Server-Patches/0286-Don-t-change-the-Entity-Random-seed-for-squids.patch rename to Spigot-Server-Patches/0285-Don-t-change-the-Entity-Random-seed-for-squids.patch index 55b96f93a..df935506e 100644 --- a/Spigot-Server-Patches/0286-Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/0285-Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -1,11 +1,11 @@ -From 5ce33612445c4672c447d2efc855486b879f3bbd Mon Sep 17 00:00:00 2001 +From e1ff26f4ec7d8088d2961c986f9b60c1e4b1c530 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 a5edc5bc2..12aaab90a 100644 +index b9c76325d..ab79317a2 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 { @@ -18,5 +18,5 @@ index a5edc5bc2..12aaab90a 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0287-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0286-Re-add-vanilla-entity-warnings-for-duplicates.patch similarity index 87% rename from Spigot-Server-Patches/0287-Re-add-vanilla-entity-warnings-for-duplicates.patch rename to Spigot-Server-Patches/0286-Re-add-vanilla-entity-warnings-for-duplicates.patch index afdd5c89c..033a52f80 100644 --- a/Spigot-Server-Patches/0287-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0286-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -1,4 +1,4 @@ -From fe3396599073a4dd6b3f69921d54017523938b5c Mon Sep 17 00:00:00 2001 +From ff239ddd9650abfd150fdbad1be84f0df823f04e 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,10 +8,10 @@ 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 91850fded..45851cd0c 100644 +index 8082de88f..702a5d9d6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -987,7 +987,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -970,7 +970,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { @@ -22,5 +22,5 @@ index 91850fded..45851cd0c 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0288-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch b/Spigot-Server-Patches/0287-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch similarity index 87% rename from Spigot-Server-Patches/0288-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch rename to Spigot-Server-Patches/0287-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch index e989b66cf..e790963bb 100644 --- a/Spigot-Server-Patches/0288-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch +++ b/Spigot-Server-Patches/0287-Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch @@ -1,4 +1,4 @@ -From 43c7596b978dcbe81872177d170fed143666f568 Mon Sep 17 00:00:00 2001 +From 4bdb7307f4c4f3e07590359da354c417abdcd6a0 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,10 +12,10 @@ 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 a28aa016c..d92b6a6ea 100644 +index d670b6ba4..8317ecea8 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -633,6 +633,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -634,6 +634,8 @@ public abstract class EntityInsentient extends EntityLiving { if (this.persistent) { this.ticksFarFromPlayer = 0; } else { @@ -25,5 +25,5 @@ index a28aa016c..d92b6a6ea 100644 if (entityhuman != null && entityhuman.affectsSpawning) { // Paper - Affects Spawning API -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0289-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/0288-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 89% rename from Spigot-Server-Patches/0289-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to Spigot-Server-Patches/0288-Avoid-item-merge-if-stack-size-above-max-stack-size.patch index 3a55d6b54..d65cef338 100644 --- a/Spigot-Server-Patches/0289-Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/0288-Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -1,11 +1,11 @@ -From a5cceec9307d5362b29f671904840bdd61cd9abb Mon Sep 17 00:00:00 2001 +From b1305dada61e75f04e84c20141fa9e1228db873e 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/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 0b4cab0af..7264773ef 100644 +index 2b67fa834..d11e4d3d8 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -173,6 +173,10 @@ public class EntityItem extends Entity { @@ -20,5 +20,5 @@ index 0b4cab0af..7264773ef 100644 double radius = world.spigotConfig.itemMerge; Iterator iterator = this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius)).iterator(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0290-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0289-Use-asynchronous-Log4j-2-loggers.patch similarity index 93% rename from Spigot-Server-Patches/0290-Use-asynchronous-Log4j-2-loggers.patch rename to Spigot-Server-Patches/0289-Use-asynchronous-Log4j-2-loggers.patch index 1a62a79f5..d7acc5519 100644 --- a/Spigot-Server-Patches/0290-Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/0289-Use-asynchronous-Log4j-2-loggers.patch @@ -1,4 +1,4 @@ -From f88d82ab0d6f8d8ab30383396e41b6cb588fdc32 Mon Sep 17 00:00:00 2001 +From 72ec2db42dcc489106778c2daacaee412cd9aece 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 @@ -30,5 +30,5 @@ index 000000000..ee7c90784 @@ -0,0 +1 @@ +Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0291-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0290-add-more-information-to-Entity.toString.patch similarity index 74% rename from Spigot-Server-Patches/0291-add-more-information-to-Entity.toString.patch rename to Spigot-Server-Patches/0290-add-more-information-to-Entity.toString.patch index f5fa5198c..29d828446 100644 --- a/Spigot-Server-Patches/0291-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0290-add-more-information-to-Entity.toString.patch @@ -1,4 +1,4 @@ -From c0d4e8c4a2cdc7120103013c003c1c0e9de279f1 Mon Sep 17 00:00:00 2001 +From 12b4c5e65ba1a4454c7f301123063d17b058213f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:13:28 -0400 Subject: [PATCH] add more information to Entity.toString() @@ -6,18 +6,18 @@ 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 d033969cd..9f1610326 100644 +index df7a1a47e..969e43ed1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2497,7 +2497,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2495,7 +2495,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(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ}); +- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ); + 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) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0292-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0291-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 89% rename from Spigot-Server-Patches/0292-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to Spigot-Server-Patches/0291-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 1f9d5df8a..81807d24f 100644 --- a/Spigot-Server-Patches/0292-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0291-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -1,4 +1,4 @@ -From f94015c93adb20a5fc3b30b9b1ca3dcf3064159f Mon Sep 17 00:00:00 2001 +From 8c270b75c708abd1ce8b5cfe1c04e7be8f75e95b 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 @@ -6,10 +6,10 @@ 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 9f1610326..1581edc4a 100644 +index 969e43ed1..8bab03bd0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected CraftEntity bukkitEntity; EntityTrackerEntry tracker; // Paper @@ -18,10 +18,10 @@ index 9f1610326..1581edc4a 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7711b2eff..67ef109a5 100644 +index 84efc1cc3..601fe77c5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -115,6 +115,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -110,6 +110,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public boolean pvpMode; public boolean keepSpawnInMemory = true; public ChunkGenerator generator; @@ -30,10 +30,10 @@ index 7711b2eff..67ef109a5 100644 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 45851cd0c..f37e85eb0 100644 +index 702a5d9d6..be475288e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -55,6 +55,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -51,6 +51,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { // CraftBukkit start public final DimensionManager dimension; @@ -43,7 +43,7 @@ index 45851cd0c..f37e85eb0 100644 // Add env and gen to constructor public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, PersistentCollection persistentcollection, WorldData worlddata, DimensionManager dimensionmanager, MethodProfiler methodprofiler, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -@@ -975,7 +978,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -958,7 +961,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { private boolean j(Entity entity) { if (entity.dead) { @@ -57,7 +57,7 @@ index 45851cd0c..f37e85eb0 100644 return false; } else { UUID uuid = entity.getUniqueID(); -@@ -987,8 +995,15 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -970,8 +978,15 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { @@ -75,7 +75,7 @@ index 45851cd0c..f37e85eb0 100644 return false; } -@@ -1005,7 +1020,25 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -988,7 +1003,25 @@ public class WorldServer extends World implements IAsyncTaskHandler { protected void b(Entity entity) { super.b(entity); this.entitiesById.a(entity.getId(), entity); @@ -103,5 +103,5 @@ index 45851cd0c..f37e85eb0 100644 if (aentity != null) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0293-EnderDragon-Events.patch b/Spigot-Server-Patches/0292-EnderDragon-Events.patch similarity index 84% rename from Spigot-Server-Patches/0293-EnderDragon-Events.patch rename to Spigot-Server-Patches/0292-EnderDragon-Events.patch index 8244089cc..3150ae43b 100644 --- a/Spigot-Server-Patches/0293-EnderDragon-Events.patch +++ b/Spigot-Server-Patches/0292-EnderDragon-Events.patch @@ -1,14 +1,14 @@ -From c0149cb74524b73b11a7d9b475c24bbd4105c836 Mon Sep 17 00:00:00 2001 +From 5d3ce3987e9a094bc2a9e87ca46b25c08ca09861 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 45f96078c..fed3e9daf 100644 +index 1906bcfc9..50d291139 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -@@ -61,7 +61,9 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded +@@ -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)); @@ -18,7 +18,7 @@ index 45f96078c..fed3e9daf 100644 } } -@@ -71,6 +73,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded +@@ -73,6 +75,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded ++this.c; } @@ -27,24 +27,24 @@ index 45f96078c..fed3e9daf 100644 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 8dd378826..ddbd90032 100644 +index e74258676..141ba1e5e 100644 --- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java +++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java -@@ -57,7 +57,9 @@ public class DragonControllerStrafe extends AbstractDragonController { - this.a.world.a((EntityHuman)null, 1017, new BlockPosition(this.a), 0); +@@ -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()) { + 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 e746a6a0d..366ebb8d2 100644 +index 7df8fd4d7..c0d66a023 100644 --- a/src/main/java/net/minecraft/server/EntityDragonFireball.java +++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java -@@ -32,8 +32,10 @@ public class EntityDragonFireball extends EntityFireball { +@@ -39,8 +39,10 @@ public class EntityDragonFireball extends EntityFireball { } } @@ -56,5 +56,5 @@ index e746a6a0d..366ebb8d2 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0294-PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/0293-PlayerElytraBoostEvent.patch similarity index 88% rename from Spigot-Server-Patches/0294-PlayerElytraBoostEvent.patch rename to Spigot-Server-Patches/0293-PlayerElytraBoostEvent.patch index d15259bbf..544b96bc5 100644 --- a/Spigot-Server-Patches/0294-PlayerElytraBoostEvent.patch +++ b/Spigot-Server-Patches/0293-PlayerElytraBoostEvent.patch @@ -1,17 +1,17 @@ -From caf72921abadbe4f2d25b8c8c4f854c10bdc234c Mon Sep 17 00:00:00 2001 +From 767d0000bd7293945276b8b4a7b60a1295b20f6d 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 d971bbc76..4ce9c6089 100644 +index dbb422e9d..13938775b 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java -@@ -28,9 +28,15 @@ public class ItemFireworks extends Item { - if (!world.isClientSide) { +@@ -33,9 +33,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); @@ -28,5 +28,5 @@ index d971bbc76..4ce9c6089 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0295-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0294-PlayerLaunchProjectileEvent.patch similarity index 81% rename from Spigot-Server-Patches/0295-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0294-PlayerLaunchProjectileEvent.patch index eb610bbed..0d6000a08 100644 --- a/Spigot-Server-Patches/0295-PlayerLaunchProjectileEvent.patch +++ b/Spigot-Server-Patches/0294-PlayerLaunchProjectileEvent.patch @@ -1,31 +1,27 @@ -From 76d7a27d33147add3dd195d96c3c052341a4985d Mon Sep 17 00:00:00 2001 +From ef42b2e74c1447362e02453981a5bfe7c9c7d461 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 21 Jul 2018 03:11:03 -0500 Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java -index adc38763b..776c86f1f 100644 +index 18e8825c4..5f3926d83 100644 --- a/src/main/java/net/minecraft/server/ItemEgg.java +++ b/src/main/java/net/minecraft/server/ItemEgg.java -@@ -7,15 +7,34 @@ public class ItemEgg extends Item { - +@@ -9,16 +9,34 @@ public class ItemEgg extends Item { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //if (!entityhuman.abilities.canInstantlyBuild) { -+ // itemstack.subtract(1); -+ //} -+ // -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start - moved down + if (!entityhuman.abilities.canInstantlyBuild) { + itemstack.subtract(1); + } + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { EntityEgg entityegg = new EntityEgg(world, entityhuman); + entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); - world.addEntity(entityegg); + // Paper start @@ -49,7 +45,7 @@ index adc38763b..776c86f1f 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java -index 876384f37..8b8bc8ec1 100644 +index 3672996c2..719210da1 100644 --- a/src/main/java/net/minecraft/server/ItemEnderPearl.java +++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java @@ -14,7 +14,19 @@ public class ItemEnderPearl extends Item { @@ -95,29 +91,26 @@ index 876384f37..8b8bc8ec1 100644 + // Paper end entityhuman.b(StatisticList.ITEM_USED.b(this)); - return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack); + return new InteractionResultWrapper<>(EnumInteractionResult.SUCCESS, itemstack); diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java -index b167c5441..42a0329c2 100644 +index d26b42f71..23b06169e 100644 --- a/src/main/java/net/minecraft/server/ItemExpBottle.java +++ b/src/main/java/net/minecraft/server/ItemExpBottle.java -@@ -7,15 +7,34 @@ public class ItemExpBottle extends Item { +@@ -8,17 +8,34 @@ public class ItemExpBottle extends Item { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } +- ++ /* // Paper start + if (!entityhuman.abilities.canInstantlyBuild) { + itemstack.subtract(1); + } -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //if (!entityhuman.abilities.canInstantlyBuild) { -+ // itemstack.subtract(1); -+ //} -+ // -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman); + entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F); - world.addEntity(entitythrownexpbottle); + // Paper start @@ -141,20 +134,18 @@ index b167c5441..42a0329c2 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -index ab7807d83..46c64c760 100644 +index a74c803e7..8d882b81b 100644 --- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java +++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -@@ -7,12 +7,37 @@ public class ItemLingeringPotion extends ItemPotion { +@@ -8,14 +8,38 @@ public class ItemLingeringPotion extends ItemPotion { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -+ -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start + ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { + // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet + ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -163,6 +154,7 @@ index ab7807d83..46c64c760 100644 + } + // Paper end EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1); + entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); - world.addEntity(entitypotion); + // Paper start @@ -186,7 +178,7 @@ index ab7807d83..46c64c760 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemSnowball.java b/src/main/java/net/minecraft/server/ItemSnowball.java -index 332145c32..5c23c9ae0 100644 +index d8879e084..95194ccdc 100644 --- a/src/main/java/net/minecraft/server/ItemSnowball.java +++ b/src/main/java/net/minecraft/server/ItemSnowball.java @@ -21,15 +21,23 @@ public class ItemSnowball extends Item { @@ -219,19 +211,18 @@ index 332145c32..5c23c9ae0 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java -index 426b42a12..a4e2f70c7 100644 +index 87e2825a8..2bddefb80 100644 --- a/src/main/java/net/minecraft/server/ItemSplashPotion.java +++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java -@@ -7,12 +7,36 @@ public class ItemSplashPotion extends ItemPotion { +@@ -8,14 +8,38 @@ public class ItemSplashPotion extends ItemPotion { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved sound down, clone handled diff -+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -+ //world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start + ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { + // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet + ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -240,6 +231,7 @@ index 426b42a12..a4e2f70c7 100644 + } + // Paper end EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1); + entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); - world.addEntity(entitypotion); + // Paper start @@ -263,5 +255,5 @@ index 426b42a12..a4e2f70c7 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0296-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0295-Duplicate-UUID-Resolve-Option.patch similarity index 93% rename from Spigot-Server-Patches/0296-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0295-Duplicate-UUID-Resolve-Option.patch index 224efed5b..3abc32a2c 100644 --- a/Spigot-Server-Patches/0296-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0295-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From 3d3653b83b8c5299747f3636891adf061080ac5e Mon Sep 17 00:00:00 2001 +From 14e444b2fe2042407cbc1c10dd4a4d6d9caba4b8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -81,7 +81,7 @@ index 92acfa6fb..05509e4fd 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c9d7df20..55cb7b88e 100644 +index 1c1f39524..edae53b82 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,10 @@ @@ -95,7 +95,7 @@ index 6c9d7df20..55cb7b88e 100644 import com.destroystokyo.paper.exception.ServerInternalException; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -42,6 +47,7 @@ public class Chunk implements IChunkAccess { +@@ -41,6 +46,7 @@ public class Chunk implements IChunkAccess { public final World world; public final Map heightMap; public Long scheduledForUnload; // Paper - delay chunk unloads @@ -103,7 +103,7 @@ index 6c9d7df20..55cb7b88e 100644 public final int locX; public final int locZ; private boolean l; -@@ -692,6 +698,7 @@ public class Chunk implements IChunkAccess { +@@ -691,6 +697,7 @@ public class Chunk implements IChunkAccess { if (i != this.locX || j != this.locZ) { Chunk.d.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.locX, this.locZ, entity); entity.die(); @@ -111,9 +111,9 @@ index 6c9d7df20..55cb7b88e 100644 } int k = MathHelper.floor(entity.locY / 16.0D); -@@ -881,6 +888,50 @@ public class Chunk implements IChunkAccess { +@@ -879,6 +886,50 @@ public class Chunk implements IChunkAccess { + for (int j = 0; j < i; ++j) { - // CraftBukkit start List entityslice = aentityslice[j]; // Spigot + // Paper start + DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; @@ -160,13 +160,13 @@ index 6c9d7df20..55cb7b88e 100644 + } + // Paper end + // CraftBukkit start List toRemove = new LinkedList<>(); - this.world.a(entityslice.stream().filter((entity) -> { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1581edc4a..07cd5aa28 100644 +index 8bab03bd0..3e6a36af6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2722,6 +2722,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2720,6 +2720,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }); } @@ -175,10 +175,10 @@ index 1581edc4a..07cd5aa28 100644 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 67ef109a5..66d2026d0 100644 +index 601fe77c5..4df291f0d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -75,7 +75,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -70,7 +70,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } }; // Spigot end @@ -188,10 +188,10 @@ index 67ef109a5..66d2026d0 100644 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 f37e85eb0..af9cdd9dc 100644 +index be475288e..e7dbd730c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -41,7 +41,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -37,7 +37,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { private final MinecraftServer server; public EntityTracker tracker; private final PlayerChunkMap manager; @@ -200,7 +200,7 @@ index f37e85eb0..af9cdd9dc 100644 public boolean savingDisabled; private boolean J; private int emptyTime; -@@ -995,7 +995,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -978,7 +978,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { @@ -209,7 +209,7 @@ index f37e85eb0..af9cdd9dc 100644 WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper -@@ -1026,7 +1026,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1009,7 +1009,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); @@ -219,5 +219,5 @@ index f37e85eb0..af9cdd9dc 100644 logger.error("Overwrote an existing entity " + old + " with " + entity); if (DEBUG_ENTITIES) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0297-Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/0296-Speedup-BlockPos-by-fixing-inlining.patch similarity index 78% rename from Spigot-Server-Patches/0297-Speedup-BlockPos-by-fixing-inlining.patch rename to Spigot-Server-Patches/0296-Speedup-BlockPos-by-fixing-inlining.patch index 7980a86d7..378c70241 100644 --- a/Spigot-Server-Patches/0297-Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/0296-Speedup-BlockPos-by-fixing-inlining.patch @@ -1,4 +1,4 @@ -From c7b1bc2d0b88a3154270b0502c355c2cf10a15a3 Mon Sep 17 00:00:00 2001 +From 5ac6c5d4c6873c58978ed4f46cfe790a59c15b36 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,12 +21,12 @@ 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 339e2da6b..8dbb4864e 100644 +index 4c7793f86..cc17a414f 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -6,22 +6,22 @@ import javax.annotation.concurrent.Immutable; - @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; @@ -55,8 +55,8 @@ index 339e2da6b..8dbb4864e 100644 } public BaseBlockPosition(double d0, double d1, double d2) { -@@ -57,17 +57,19 @@ public class BaseBlockPosition implements Comparable { - } +@@ -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() { @@ -77,47 +77,46 @@ index 339e2da6b..8dbb4864e 100644 } + // Paper end - public BaseBlockPosition d(BaseBlockPosition baseblockposition1) { - return new BaseBlockPosition(this.getY() * baseblockposition1.getZ() - this.getZ() * baseblockposition1.getY(), this.getZ() * baseblockposition1.getX() - this.getX() * baseblockposition1.getZ(), this.getX() * baseblockposition1.getY() - this.getY() * baseblockposition1.getX()); + 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 e980e31fc..ae162f615 100644 +index a4c282220..f260068c6 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -201,18 +201,20 @@ public class BlockPosition extends BaseBlockPosition { +@@ -202,18 +202,18 @@ public class BlockPosition extends BaseBlockPosition { if (this.g == null) { - this.g = new BlockPosition.MutableBlockPosition(ix, jx, kx); + 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 - use x/y/z - return (BlockPosition.MutableBlockPosition)this.endOfData(); ++ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { + return (BlockPosition.MutableBlockPosition) this.endOfData(); } else { - if (this.g.b < l) { - ++this.g.b; - } else if (this.g.c < i1) { -- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler +- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler - ++this.g.c; - } else if (this.g.d < j1) { -- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler -- this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler +- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler +- this.g.c = j; // Paper - decompile fix 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 = ix; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler + ++this.g.y; + } else if (this.g.z < j1) { -+ this.g.x = ix; // Paper - decompile fix Readd line removed by the decompiler -+ this.g.y = jx; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.y = j; // Paper - decompile fix Readd line removed by the decompiler + ++this.g.z; -+ // Paper end } return this.g; -@@ -225,10 +227,12 @@ public class BlockPosition extends BaseBlockPosition { - +@@ -296,11 +296,12 @@ public class BlockPosition extends BaseBlockPosition { + } public static class MutableBlockPosition extends BlockPosition { +- + // Paper start - comment out + /* protected int b; @@ -128,7 +127,7 @@ index e980e31fc..ae162f615 100644 @Override public boolean isValidLocation() { return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256; -@@ -237,6 +241,7 @@ public class BlockPosition extends BaseBlockPosition { +@@ -309,6 +310,7 @@ public class BlockPosition extends BaseBlockPosition { public boolean isInvalidYLocation() { return c < 0 || c >= 256; } @@ -136,7 +135,7 @@ index e980e31fc..ae162f615 100644 // Paper end public MutableBlockPosition() { -@@ -248,10 +253,13 @@ public class BlockPosition extends BaseBlockPosition { +@@ -320,10 +322,13 @@ public class BlockPosition extends BaseBlockPosition { } public MutableBlockPosition(int i, int j, int k) { @@ -152,7 +151,7 @@ index e980e31fc..ae162f615 100644 } public BlockPosition a(double d0, double d1, double d2) { -@@ -270,6 +278,8 @@ public class BlockPosition extends BaseBlockPosition { +@@ -342,6 +347,8 @@ public class BlockPosition extends BaseBlockPosition { return super.a(enumblockrotation).h(); } @@ -161,7 +160,7 @@ index e980e31fc..ae162f615 100644 public int getX() { return this.b; } -@@ -280,13 +290,16 @@ public class BlockPosition extends BaseBlockPosition { +@@ -352,13 +359,16 @@ public class BlockPosition extends BaseBlockPosition { public int getZ() { return this.d; @@ -182,7 +181,7 @@ index e980e31fc..ae162f615 100644 return this; } -@@ -304,15 +317,15 @@ public class BlockPosition extends BaseBlockPosition { +@@ -376,15 +386,15 @@ public class BlockPosition extends BaseBlockPosition { } public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { @@ -202,5 +201,5 @@ index e980e31fc..ae162f615 100644 public BlockPosition toBlockPosition() { return h(); } // Paper - OBFHELPER -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0298-Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/0297-Don-t-save-Proto-Chunks.patch similarity index 80% rename from Spigot-Server-Patches/0298-Don-t-save-Proto-Chunks.patch rename to Spigot-Server-Patches/0297-Don-t-save-Proto-Chunks.patch index acf8e7908..9c44ccb46 100644 --- a/Spigot-Server-Patches/0298-Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/0297-Don-t-save-Proto-Chunks.patch @@ -1,4 +1,4 @@ -From 2db9c766c78caaeabd0d2e76a48aed03e7e45ee5 Mon Sep 17 00:00:00 2001 +From 7fa718550cc7347b5daafb23d3e246f3460e7557 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 @@ -8,10 +8,10 @@ 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 34ddf655e..3b36a32c6 100644 +index 48230251d..4d619eb4c 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -300,6 +300,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -298,6 +298,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict { @@ -20,11 +20,11 @@ index 34ddf655e..3b36a32c6 100644 world.checkSession(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 772382144..9deab61fc 100644 +index 70a95c263..56958a5ce 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -@@ -24,7 +24,7 @@ public class ChunkTaskScheduler extends Scheduler.a scheduler_a) { ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); - return !protochunk.ab_() && !protochunk.h(); @@ -32,7 +32,7 @@ index 772382144..9deab61fc 100644 } }; -@@ -88,6 +88,7 @@ public class ChunkTaskScheduler extends Scheduler Date: Mon, 23 Jul 2018 13:08:19 -0400 Subject: [PATCH] Optimize RegistryID.c() @@ -6,31 +6,31 @@ 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 d03ac0e70..9242999f7 100644 +index 5a5c464ea..37641fa86 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java -@@ -13,12 +13,14 @@ public class RegistryID implements Registry { +@@ -14,12 +14,14 @@ public class RegistryID implements Registry { 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]); + 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]); + this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.usedIds = new java.util.BitSet(); // Paper } - public int getId(@Nullable K object) { -@@ -41,9 +43,14 @@ public class RegistryID implements Registry { + public int getId(@Nullable K k0) { +@@ -43,9 +45,14 @@ public class RegistryID implements Registry { } private int c() { + // Paper start + /* - while(this.e < this.d.length && this.d[this.e] != null) { + while (this.e < this.d.length && this.d[this.e] != null) { ++this.e; } + */ @@ -39,24 +39,24 @@ index d03ac0e70..9242999f7 100644 return this.e; } -@@ -56,6 +63,7 @@ public class RegistryID implements Registry { - this.d = (K[])(new Object[i]); +@@ -59,6 +66,7 @@ public class RegistryID implements Registry { + 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) { -@@ -80,6 +88,7 @@ public class RegistryID implements Registry { - this.b[l] = object; - this.c[l] = i; - this.d[i] = object; + for (int j = 0; j < ak.length; ++j) { + if (ak[j] != null) { +@@ -84,6 +92,7 @@ public class RegistryID implements Registry { + 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; -@@ -140,6 +149,7 @@ public class RegistryID implements Registry { - Arrays.fill(this.d, (Object)null); +@@ -148,6 +157,7 @@ public class RegistryID implements Registry { + Arrays.fill(this.d, (Object) null); this.e = 0; this.f = 0; + this.usedIds.clear(); // Paper @@ -64,5 +64,5 @@ index d03ac0e70..9242999f7 100644 public int b() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0300-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0299-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 91% rename from Spigot-Server-Patches/0300-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to Spigot-Server-Patches/0299-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 12ffd1055..46ac7ecab 100644 --- a/Spigot-Server-Patches/0300-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0299-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -1,4 +1,4 @@ -From 0e020af7c41d390ecfeef912bca874a9384f938f Mon Sep 17 00:00:00 2001 +From f96de9ff9ddbffb8ba3556b206e7a01f7b37908b 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 @@ -21,10 +21,10 @@ index 05509e4fd..4059c7a72 100644 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 66d2026d0..858cc1b97 100644 +index 4df291f0d..074d14b19 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1547,6 +1547,14 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1542,6 +1542,14 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } @@ -40,5 +40,5 @@ index 66d2026d0..858cc1b97 100644 int i = MathHelper.floor(axisalignedbb.minX); int j = MathHelper.f(axisalignedbb.maxX); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0301-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0300-Vanished-players-don-t-have-rights.patch similarity index 82% rename from Spigot-Server-Patches/0301-Vanished-players-don-t-have-rights.patch rename to Spigot-Server-Patches/0300-Vanished-players-don-t-have-rights.patch index a2e7d8764..9e650d5a0 100644 --- a/Spigot-Server-Patches/0301-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0300-Vanished-players-don-t-have-rights.patch @@ -1,14 +1,14 @@ -From e5678439f8c0fd79df801804cf2caafe0bd58575 Mon Sep 17 00:00:00 2001 +From a37e87b1a301c08889b8477557a30a4757c8d905 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 07cd5aa28..fe0590dea 100644 +index 3e6a36af6..12ab5def2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -94,7 +94,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -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; @@ -31,23 +31,11 @@ index 85d364b8f..ff6c8e2b5 100644 org.bukkit.entity.Player player = (blockactioncontext.getEntity() instanceof EntityPlayer) ? (org.bukkit.entity.Player) blockactioncontext.getEntity().getBukkitEntity() : null; BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn); -diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java -index c6ec1a782..6c61718b2 100644 ---- a/src/main/java/net/minecraft/server/VoxelShape.java -+++ b/src/main/java/net/minecraft/server/VoxelShape.java -@@ -24,6 +24,7 @@ public abstract class VoxelShape { - return i <= 0 ? Double.NEGATIVE_INFINITY : this.a(enumdirection$enumaxis, i); - } - -+ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER - public AxisAlignedBB a() { - if (this.isEmpty()) { - throw new UnsupportedOperationException("No bounds for empty shape."); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 858cc1b97..78e85aacf 100644 +index 074d14b19..93b0544e0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1529,6 +1529,37 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1524,6 +1524,37 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } @@ -61,7 +49,7 @@ index 858cc1b97..78e85aacf 100644 + if (voxelshape.isEmpty()) { + return true; + } else { -+ List list = this.getEntities((Entity) null, voxelshape.getBounds()); ++ List list = this.getEntities((Entity) null, voxelshape.getBoundingBox()); + + for (int i = 0; i < list.size(); ++i) { + Entity entity1 = (Entity) list.get(i); @@ -86,10 +74,10 @@ index 858cc1b97..78e85aacf 100644 if (voxelshape.isEmpty()) { 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 dcd628104..41b05f231 100644 +index 83f7116f4..fa3bb1047 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -976,6 +976,14 @@ public class CraftEventFactory { +@@ -989,6 +989,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); @@ -105,5 +93,5 @@ index dcd628104..41b05f231 100644 return event; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0302-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0301-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch similarity index 78% rename from Spigot-Server-Patches/0302-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch rename to Spigot-Server-Patches/0301-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index 95921dc68..e2b42da57 100644 --- a/Spigot-Server-Patches/0302-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/0301-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -1,4 +1,4 @@ -From 3256f4669f790f59a0308f9dba3aea4436da54bd Mon Sep 17 00:00:00 2001 +From 413e10660968d6a4ce03ffd138b806ae1ed99fe6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:18:31 -0400 Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it @@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 55cb7b88e..f7990fbdb 100644 +index edae53b82..42b76b212 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -717,6 +717,7 @@ public class Chunk implements IChunkAccess { +@@ -716,6 +716,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.locZ; this.entitySlices[k].add(entity); // Paper start @@ -17,7 +17,7 @@ index 55cb7b88e..f7990fbdb 100644 if (entity instanceof EntityItem) { itemCounts[k]++; } else if (entity instanceof IInventory) { -@@ -748,6 +749,7 @@ public class Chunk implements IChunkAccess { +@@ -747,6 +748,7 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -26,5 +26,5 @@ index 55cb7b88e..f7990fbdb 100644 itemCounts[i]--; } else if (entity instanceof IInventory) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0303-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch similarity index 90% rename from Spigot-Server-Patches/0303-Add-some-Debug-to-Chunk-Entity-slices.patch rename to Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch index 402370f68..ae3247b00 100644 --- a/Spigot-Server-Patches/0303-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -1,4 +1,4 @@ -From 158100d122f5fd7e1c280aed126c53675bcc0a3a Mon Sep 17 00:00:00 2001 +From 668a1de336154c1375df2341f437b33e9f398e05 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 @@ -9,10 +9,10 @@ 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 f7990fbdb..4f01140e7 100644 +index 42b76b212..ca236a315 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -715,8 +715,34 @@ public class Chunk implements IChunkAccess { +@@ -714,8 +714,34 @@ public class Chunk implements IChunkAccess { entity.chunkX = this.locX; entity.chunkY = k; entity.chunkZ = this.locZ; @@ -48,7 +48,7 @@ index f7990fbdb..4f01140e7 100644 this.markDirty(); if (entity instanceof EntityItem) { itemCounts[k]++; -@@ -746,9 +772,13 @@ public class Chunk implements IChunkAccess { +@@ -745,9 +771,13 @@ public class Chunk implements IChunkAccess { i = this.entitySlices.length - 1; } // Paper start @@ -64,7 +64,7 @@ index f7990fbdb..4f01140e7 100644 this.markDirty(); if (entity instanceof EntityItem) { itemCounts[i]--; -@@ -1029,6 +1059,7 @@ public class Chunk implements IChunkAccess { +@@ -1028,6 +1058,7 @@ public class Chunk implements IChunkAccess { } // Spigot End entity.setCurrentChunk(null); // Paper @@ -73,10 +73,10 @@ index f7990fbdb..4f01140e7 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fe0590dea..469dce5df 100644 +index 12ab5def2..50e616179 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -64,6 +64,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -62,6 +62,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } }; @@ -85,5 +85,5 @@ index fe0590dea..469dce5df 100644 static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0304-Optimize-Region-File-Cache.patch b/Spigot-Server-Patches/0303-Optimize-Region-File-Cache.patch similarity index 96% rename from Spigot-Server-Patches/0304-Optimize-Region-File-Cache.patch rename to Spigot-Server-Patches/0303-Optimize-Region-File-Cache.patch index dc0e3bd37..4cf7dc317 100644 --- a/Spigot-Server-Patches/0304-Optimize-Region-File-Cache.patch +++ b/Spigot-Server-Patches/0303-Optimize-Region-File-Cache.patch @@ -1,4 +1,4 @@ -From 11658c58e5db3b36e30ccd8c4dfd2f9d047856bc Mon Sep 17 00:00:00 2001 +From 70b73f56aafb1a6e9209bb568fd46fdb7cbf64bf Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 23:40:04 -0400 Subject: [PATCH] Optimize Region File Cache @@ -32,7 +32,7 @@ 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 c0ab543b9..15666325e 100644 +index 964996976..d07222239 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -99,7 +99,7 @@ public class RegionFileCache { @@ -63,5 +63,5 @@ index c0ab543b9..15666325e 100644 return regionfile != null ? regionfile.d(i & 31, j & 31) : false; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0305-EntityTransformedEvent.patch b/Spigot-Server-Patches/0304-EntityTransformedEvent.patch similarity index 94% rename from Spigot-Server-Patches/0305-EntityTransformedEvent.patch rename to Spigot-Server-Patches/0304-EntityTransformedEvent.patch index 03d68ea2d..86ad1faed 100644 --- a/Spigot-Server-Patches/0305-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0304-EntityTransformedEvent.patch @@ -1,11 +1,11 @@ -From a1fbd733a1332a7d08ee3237f698543e58b590e1 Mon Sep 17 00:00:00 2001 +From a787531bca729b1e9196c01ce456cd7f7ad2f234 Mon Sep 17 00:00:00 2001 From: Anthony MacAllister Date: Thu, 26 Jul 2018 15:30:03 -0400 Subject: [PATCH] EntityTransformedEvent diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java -index 175235a75..dab644930 100644 +index 141c17bf8..dde9f1e61 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -53,6 +53,7 @@ public class EntityMushroomCow extends EntityCow { @@ -17,10 +17,10 @@ index 175235a75..dab644930 100644 this.die(); // CraftBukkit - from above diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index a11e66262..e4a570e01 100644 +index 78acac4ca..f01e776fe 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -625,6 +625,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -624,6 +624,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) { return; } @@ -29,7 +29,7 @@ index a11e66262..e4a570e01 100644 // CraftBukkit end this.die(); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index dc00725f9..823d4be7f 100644 +index 5bba50461..33b343c14 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -247,6 +247,7 @@ public class EntityZombie extends EntityMonster { @@ -49,7 +49,7 @@ index dc00725f9..823d4be7f 100644 this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index d2b2cc2fd..ab1b3ab5e 100644 +index c6198626a..86e5fbcda 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -139,6 +139,7 @@ public class EntityZombieVillager extends EntityZombie { @@ -61,5 +61,5 @@ index d2b2cc2fd..ab1b3ab5e 100644 this.world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason // CraftBukkit end -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0306-SkeletonHorse-Additions.patch b/Spigot-Server-Patches/0305-SkeletonHorse-Additions.patch similarity index 92% rename from Spigot-Server-Patches/0306-SkeletonHorse-Additions.patch rename to Spigot-Server-Patches/0305-SkeletonHorse-Additions.patch index 8b085c531..642a450c3 100644 --- a/Spigot-Server-Patches/0306-SkeletonHorse-Additions.patch +++ b/Spigot-Server-Patches/0305-SkeletonHorse-Additions.patch @@ -1,15 +1,15 @@ -From bc07d0b9a025fa6b155ec03ca6e649bc8347b107 Mon Sep 17 00:00:00 2001 +From 8afe439962f5ff13b6945d644dea1611b974a6ce Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 27 Jul 2018 22:36:31 -0500 Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index e3690db47..ba6c0e96a 100644 +index 06f37f28a..eae2b2665 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -@@ -5,7 +5,7 @@ import javax.annotation.Nullable; - public class EntityHorseSkeleton extends EntityHorseAbstract { +@@ -6,7 +6,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { + private final PathfinderGoalHorseTrap bM = new PathfinderGoalHorseTrap(this); private boolean bN; - private int bO; @@ -71,5 +71,5 @@ index e822c2200..496d0c0ca 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0307-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0306-Prevent-Saving-Bad-entities-to-chunks.patch similarity index 90% rename from Spigot-Server-Patches/0307-Prevent-Saving-Bad-entities-to-chunks.patch rename to Spigot-Server-Patches/0306-Prevent-Saving-Bad-entities-to-chunks.patch index 8a2236395..e302601f3 100644 --- a/Spigot-Server-Patches/0307-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0306-Prevent-Saving-Bad-entities-to-chunks.patch @@ -1,4 +1,4 @@ -From 2177df0325fe26a4da9122530cf377a106bcef93 Mon Sep 17 00:00:00 2001 +From 1f19a5ad7d76ab730f70a476f397eab9c0e33a30 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 @@ -18,10 +18,10 @@ 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 3b36a32c6..7c77d384b 100644 +index 4d619eb4c..8d7309bb0 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -563,11 +563,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -561,11 +561,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { Iterator iterator; @@ -44,7 +44,7 @@ index 3b36a32c6..7c77d384b 100644 NBTTagCompound nbttagcompound1 = new NBTTagCompound(); if (entity.d(nbttagcompound1)) { -@@ -576,6 +587,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -574,6 +585,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } } } @@ -57,5 +57,5 @@ index 3b36a32c6..7c77d384b 100644 nbttagcompound.set("Entities", nbttaglist1); NBTTagList nbttaglist2 = new NBTTagList(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0308-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0307-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 98% rename from Spigot-Server-Patches/0308-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to Spigot-Server-Patches/0307-Don-t-call-getItemMeta-on-hasItemMeta.patch index aefd5b0ed..9b1790520 100644 --- a/Spigot-Server-Patches/0308-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0307-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -1,4 +1,4 @@ -From 581d00244c23273c5ed641f733abfe77ac24636c Mon Sep 17 00:00:00 2001 +From 6f951c08506ab811908bc19c17634c2f8c4ce97a Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Thu, 26 Jul 2018 14:10:23 +0200 Subject: [PATCH] Don't call getItemMeta on hasItemMeta @@ -84,5 +84,5 @@ index 0ad0004b9..7455461f1 100644 public void testBlockStateMeta() { List queue = new ArrayList<>(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0309-Always-process-chunk-removal-in-removeEntity.patch b/Spigot-Server-Patches/0308-Always-process-chunk-removal-in-removeEntity.patch similarity index 84% rename from Spigot-Server-Patches/0309-Always-process-chunk-removal-in-removeEntity.patch rename to Spigot-Server-Patches/0308-Always-process-chunk-removal-in-removeEntity.patch index 334ad2e32..92a83239e 100644 --- a/Spigot-Server-Patches/0309-Always-process-chunk-removal-in-removeEntity.patch +++ b/Spigot-Server-Patches/0308-Always-process-chunk-removal-in-removeEntity.patch @@ -1,4 +1,4 @@ -From 878acd1cb814ad0b38a0d3c210dd5b388d8ec459 Mon Sep 17 00:00:00 2001 +From bf37a721e1cd38719fcfe7f2773280578e372da2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 12:09:20 -0400 Subject: [PATCH] Always process chunk removal in removeEntity @@ -8,10 +8,10 @@ which can keep them in the chunk when they shouldnt be if done during entity ticking. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 78e85aacf..f5f1452b7 100644 +index 93b0544e0..2dd617de9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1107,7 +1107,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1102,7 +1102,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.everyoneSleeping(); } @@ -20,7 +20,7 @@ index 78e85aacf..f5f1452b7 100644 int i = entity.chunkX; int j = entity.chunkZ; -@@ -1115,6 +1115,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1110,6 +1110,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.getChunkAt(i, j).b(entity); } @@ -29,5 +29,5 @@ index 78e85aacf..f5f1452b7 100644 int index = this.entityList.indexOf(entity); if (index != -1) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0310-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0309-Ignore-Dead-Entities-in-entityList-iteration.patch similarity index 85% rename from Spigot-Server-Patches/0310-Ignore-Dead-Entities-in-entityList-iteration.patch rename to Spigot-Server-Patches/0309-Ignore-Dead-Entities-in-entityList-iteration.patch index 40f55b59c..668a80426 100644 --- a/Spigot-Server-Patches/0310-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0309-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -1,4 +1,4 @@ -From 872ce010ad9229fda6204d6bf8731b13d863786f Mon Sep 17 00:00:00 2001 +From 5ee90c9c958827da1f346eb10357632e3b363611 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 12:18:27 -0400 Subject: [PATCH] Ignore Dead Entities in entityList iteration @@ -23,10 +23,10 @@ index 56700fc59..9b9c8361e 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 469dce5df..f1abcadcc 100644 +index 50e616179..cc30f19f0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -123,6 +123,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -121,6 +121,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected boolean F; private boolean az; public boolean dead; @@ -35,10 +35,10 @@ index 469dce5df..f1abcadcc 100644 public float length; public float J; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 31bc34239..6958f00d7 100644 +index 2dd617de9..2e6b00541 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1046,6 +1046,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1041,6 +1041,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } entity.valid = true; // CraftBukkit @@ -46,7 +46,7 @@ index 31bc34239..6958f00d7 100644 new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1114,6 +1115,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1109,6 +1110,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (entity.inChunk && this.isChunkLoaded(i, j, true)) { this.getChunkAt(i, j).b(entity); } @@ -54,15 +54,15 @@ index 31bc34239..6958f00d7 100644 if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above // CraftBukkit start - Decrement loop variable field if we've already ticked this entity -@@ -2324,6 +2326,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2319,6 +2321,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); + if (entity.shouldBeRemoved) continue; // Paper - if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { - arraylist.add(entity); -@@ -2410,6 +2413,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc + if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { // CraftBukkit - decompile error + list.add((T) entity); // CraftBukkit - decompile error +@@ -2405,6 +2408,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -71,10 +71,10 @@ index 31bc34239..6958f00d7 100644 if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d9385aa7a..ee2b443dd 100644 +index 2fca59f8f..3fdd12ec0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -612,6 +612,7 @@ public class CraftWorld implements World { +@@ -634,6 +634,7 @@ public class CraftWorld implements World { for (Object o : world.entityList) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -82,7 +82,7 @@ index d9385aa7a..ee2b443dd 100644 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -630,6 +631,7 @@ public class CraftWorld implements World { +@@ -652,6 +653,7 @@ public class CraftWorld implements World { for (Object o : world.entityList) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -90,7 +90,7 @@ index d9385aa7a..ee2b443dd 100644 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -654,6 +656,7 @@ public class CraftWorld implements World { +@@ -676,6 +678,7 @@ public class CraftWorld implements World { for (Object entity: world.entityList) { if (entity instanceof net.minecraft.server.Entity) { @@ -98,7 +98,7 @@ index d9385aa7a..ee2b443dd 100644 Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -676,6 +679,7 @@ public class CraftWorld implements World { +@@ -698,6 +701,7 @@ public class CraftWorld implements World { for (Object entity: world.entityList) { if (entity instanceof net.minecraft.server.Entity) { diff --git a/Spigot-Server-Patches/0311-Provide-option-to-use-a-versioned-world-folder-for-t.patch b/Spigot-Server-Patches/0310-Provide-option-to-use-a-versioned-world-folder-for-t.patch similarity index 97% rename from Spigot-Server-Patches/0311-Provide-option-to-use-a-versioned-world-folder-for-t.patch rename to Spigot-Server-Patches/0310-Provide-option-to-use-a-versioned-world-folder-for-t.patch index 25397d16d..c5722f04e 100644 --- a/Spigot-Server-Patches/0311-Provide-option-to-use-a-versioned-world-folder-for-t.patch +++ b/Spigot-Server-Patches/0310-Provide-option-to-use-a-versioned-world-folder-for-t.patch @@ -1,4 +1,4 @@ -From 276442b97bb4fff3381cb42d9c0edfda338dd59b Mon Sep 17 00:00:00 2001 +From 8222de7ca5f4e939f901f04d36d4107fba3e2e8e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 29 Jul 2018 15:48:50 -0400 Subject: [PATCH] Provide option to use a versioned world folder for testing @@ -59,10 +59,10 @@ index 48b0a742a..f0b87972d 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index a2d65c6df..41a7103ef 100644 +index 8d7309bb0..450c9e79b 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -59,8 +59,55 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -57,8 +57,55 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { private PersistentStructureLegacy e; // private boolean f; // CraftBukkit private static final double SAVE_QUEUE_TARGET_SIZE = 625; // Spigot @@ -118,7 +118,7 @@ index a2d65c6df..41a7103ef 100644 this.c = file; this.d = datafixer; } -@@ -98,11 +145,18 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -96,11 +143,18 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public boolean chunkExists(int x, int z) { @@ -220,5 +220,5 @@ index 577ba1b5f..31119ba69 100644 this.baseDir.mkdirs(); this.playerDir = new File(this.baseDir, "playerdata"); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0312-MC-111480-Start-Entity-ID-s-at-1.patch b/Spigot-Server-Patches/0311-MC-111480-Start-Entity-ID-s-at-1.patch similarity index 86% rename from Spigot-Server-Patches/0312-MC-111480-Start-Entity-ID-s-at-1.patch rename to Spigot-Server-Patches/0311-MC-111480-Start-Entity-ID-s-at-1.patch index c8f335a96..68210ad8a 100644 --- a/Spigot-Server-Patches/0312-MC-111480-Start-Entity-ID-s-at-1.patch +++ b/Spigot-Server-Patches/0311-MC-111480-Start-Entity-ID-s-at-1.patch @@ -1,4 +1,4 @@ -From 01d62016db82ecdc43d5fe0bc9783fca0dd71bb2 Mon Sep 17 00:00:00 2001 +From bfd5ce7a6f18c70be376c9ac0deda74de4a6b1ba Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 29 Jul 2018 22:58:47 -0400 Subject: [PATCH] MC-111480: Start Entity ID's at 1 @@ -7,10 +7,10 @@ DataWatchers that store Entity ID's treat 0 as special, and can break things such as Elytra Fireworks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index df23b5c4f..b284524be 100644 +index cc30f19f0..a9b0f8497 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 +@@ -90,7 +90,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private static final List a = Collections.emptyList(); private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); private static double c = 1.0D; @@ -20,5 +20,5 @@ index df23b5c4f..b284524be 100644 private int id; public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0313-Implement-Expanded-ArmorStand-API.patch b/Spigot-Server-Patches/0312-Implement-Expanded-ArmorStand-API.patch similarity index 98% rename from Spigot-Server-Patches/0313-Implement-Expanded-ArmorStand-API.patch rename to Spigot-Server-Patches/0312-Implement-Expanded-ArmorStand-API.patch index 97f8ebb3e..bc0c7b5f2 100644 --- a/Spigot-Server-Patches/0313-Implement-Expanded-ArmorStand-API.patch +++ b/Spigot-Server-Patches/0312-Implement-Expanded-ArmorStand-API.patch @@ -1,4 +1,4 @@ -From 3aea822ceb36857019ae4d7305b522effb714adf Mon Sep 17 00:00:00 2001 +From 44cc35dd1cec5cad93e1c521d870a4d040f96761 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Thu, 26 Jul 2018 02:25:46 -0400 Subject: [PATCH] Implement Expanded ArmorStand API @@ -8,7 +8,7 @@ Add the following: - Enable/Disable slot interactions diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 4ecf34a40..1dcc482c0 100644 +index 694df9e18..c604182dd 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -36,7 +36,7 @@ public class EntityArmorStand extends EntityLiving { @@ -126,5 +126,5 @@ index 124c3185b..9f5c3b92e 100644 // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0314-AnvilDamageEvent.patch b/Spigot-Server-Patches/0313-AnvilDamageEvent.patch similarity index 86% rename from Spigot-Server-Patches/0314-AnvilDamageEvent.patch rename to Spigot-Server-Patches/0313-AnvilDamageEvent.patch index b7d5e74b1..9ba07aef1 100644 --- a/Spigot-Server-Patches/0314-AnvilDamageEvent.patch +++ b/Spigot-Server-Patches/0313-AnvilDamageEvent.patch @@ -1,16 +1,16 @@ -From 055444613695d1d6a438acf7346af18b272b8152 Mon Sep 17 00:00:00 2001 +From f126252bb10fc5177e8e8ab43b65910ae5bb9167 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 20 Jul 2018 23:37:03 -0500 Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java -index a7b04a967..c8f988c2c 100644 +index 1560dd382..d206e0465 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -74,6 +74,16 @@ public class ContainerAnvil extends Container { if (!world.isClientSide) { - if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman.getRandom().nextFloat() < 0.12F) { + if (!entityhuman1.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman1.getRandom().nextFloat() < 0.12F) { IBlockData iblockdata1 = BlockAnvil.a_(iblockdata); + // Paper start + com.destroystokyo.paper.event.block.AnvilDamagedEvent event = new com.destroystokyo.paper.event.block.AnvilDamagedEvent(getBukkitView(), iblockdata1 != null ? org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(iblockdata1) : null); @@ -26,5 +26,5 @@ index a7b04a967..c8f988c2c 100644 if (iblockdata1 == null) { world.setAir(blockposition); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0315-World-EntityHuman-Lookup-Optimizations.patch b/Spigot-Server-Patches/0314-World-EntityHuman-Lookup-Optimizations.patch similarity index 84% rename from Spigot-Server-Patches/0315-World-EntityHuman-Lookup-Optimizations.patch rename to Spigot-Server-Patches/0314-World-EntityHuman-Lookup-Optimizations.patch index 34bec873b..f5b99a30c 100644 --- a/Spigot-Server-Patches/0315-World-EntityHuman-Lookup-Optimizations.patch +++ b/Spigot-Server-Patches/0314-World-EntityHuman-Lookup-Optimizations.patch @@ -1,22 +1,22 @@ -From ff7290686a5717b69809c1b5ad3a73c0b78ac56d Mon Sep 17 00:00:00 2001 +From 39148659a11dc6f6d5ec7bb3fb4397c25b8e991a Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 30 Jul 2018 02:42:49 -0400 Subject: [PATCH] World EntityHuman Lookup Optimizations diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 762ae7366..5e61826f6 100644 +index 2e6b00541..0d112016f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -81,6 +81,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -76,6 +76,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc private final List c = Lists.newArrayList(); private final Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper public final List players = Lists.newArrayList(); + public final Map playersByName = Maps.newHashMap(); // Paper - World EntityHuman Lookup Optimizations public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); + protected final IntHashMap entitiesById = new IntHashMap<>(); private final long F = 16777215L; -@@ -1030,6 +1031,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1025,6 +1026,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc EntityHuman entityhuman = (EntityHuman) entity; this.players.add(entityhuman); @@ -25,7 +25,7 @@ index 762ae7366..5e61826f6 100644 this.everyoneSleeping(); } -@@ -1072,6 +1075,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1067,6 +1070,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc entity.die(); if (entity instanceof EntityHuman) { this.players.remove(entity); @@ -33,7 +33,7 @@ index 762ae7366..5e61826f6 100644 // Spigot start for ( WorldPersistentData worldData : worldMaps.worldMap.values() ) { -@@ -1105,6 +1109,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1100,6 +1104,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc entity.die(); if (entity instanceof EntityHuman) { this.players.remove(entity); @@ -41,7 +41,7 @@ index 762ae7366..5e61826f6 100644 this.everyoneSleeping(); } -@@ -2675,6 +2680,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2670,6 +2675,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @Nullable public EntityHuman a(String s) { @@ -50,7 +50,7 @@ index 762ae7366..5e61826f6 100644 for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); -@@ -2684,10 +2691,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2679,10 +2686,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } return null; @@ -66,7 +66,7 @@ index 762ae7366..5e61826f6 100644 for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); -@@ -2697,6 +2709,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2692,6 +2704,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } return null; @@ -78,5 +78,5 @@ index 762ae7366..5e61826f6 100644 public void checkSession() throws ExceptionWorldConflict { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0316-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0315-Add-TNTPrimeEvent.patch similarity index 97% rename from Spigot-Server-Patches/0316-Add-TNTPrimeEvent.patch rename to Spigot-Server-Patches/0315-Add-TNTPrimeEvent.patch index be7126ebf..72334ac58 100644 --- a/Spigot-Server-Patches/0316-Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/0315-Add-TNTPrimeEvent.patch @@ -1,11 +1,11 @@ -From 5f2e9e30f6d4d0087e575529aa57aec91a281b7a Mon Sep 17 00:00:00 2001 +From 5f1451b3b8e9c4216cd1d58a9917023311766232 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Mon, 16 Jul 2018 00:05:05 +0300 Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 35a265fa2..3bacd8958 100644 +index 3f421d46a..0fbcd352c 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -16,7 +16,7 @@ index 35a265fa2..3bacd8958 100644 import java.util.Map; import java.util.Random; import java.util.Map.Entry; -@@ -234,12 +235,19 @@ public class BlockFire extends Block { +@@ -233,12 +234,19 @@ public class BlockFire extends Block { world.setTypeAndData(blockposition, (IBlockData) this.a((IBlockAccess) world, blockposition).set(BlockFire.AGE, l), 3); } else { @@ -112,7 +112,7 @@ index f97fccf56..c821e6b3b 100644 world.setAir(blockposition); } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 473773724..a49f1208b 100644 +index 79d8be8d4..fcc82d8eb 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -9,6 +9,7 @@ import org.apache.logging.log4j.Logger; @@ -136,5 +136,5 @@ index 473773724..a49f1208b 100644 this.world.setAir(new BlockPosition(blockX, blockY, blockZ)); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0317-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0316-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 92% rename from Spigot-Server-Patches/0317-Break-up-and-make-tab-spam-limits-configurable.patch rename to Spigot-Server-Patches/0316-Break-up-and-make-tab-spam-limits-configurable.patch index 9476aed18..10763a71a 100644 --- a/Spigot-Server-Patches/0317-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0316-Break-up-and-make-tab-spam-limits-configurable.patch @@ -1,4 +1,4 @@ -From a6dfbe7df018ab757f1530a220ce2e6783bf0825 Mon Sep 17 00:00:00 2001 +From 7e3c7a77ce227e39ccd52ca8a180f06578678877 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 29 Jul 2018 05:02:15 +0100 Subject: [PATCH] Break up and make tab spam limits configurable @@ -45,18 +45,18 @@ index f0b87972d..a92914576 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 16d8a56b1..f2f977fff 100644 +index efcb82877..8899ad0f6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start - multithreaded fields private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); + private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits // CraftBukkit end private int j; - private final IntHashMap k = new IntHashMap(); -@@ -205,6 +206,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + private final IntHashMap k = new IntHashMap<>(); +@@ -204,6 +205,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.minecraftServer.methodProfiler.exit(); // CraftBukkit start for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; @@ -64,7 +64,7 @@ index 16d8a56b1..f2f977fff 100644 /* Use thread-safe field access instead if (this.chatThrottle > 0) { --this.chatThrottle; -@@ -510,7 +512,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -509,7 +511,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { public void a(PacketPlayInTabComplete packetplayintabcomplete) { // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start @@ -74,5 +74,5 @@ index 16d8a56b1..f2f977fff 100644 return; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0318-Make-portal-teleportation-adjustment-math-more-accur.patch b/Spigot-Server-Patches/0317-Make-portal-teleportation-adjustment-math-more-accur.patch similarity index 86% rename from Spigot-Server-Patches/0318-Make-portal-teleportation-adjustment-math-more-accur.patch rename to Spigot-Server-Patches/0317-Make-portal-teleportation-adjustment-math-more-accur.patch index d6f2656c2..1fc97006a 100644 --- a/Spigot-Server-Patches/0318-Make-portal-teleportation-adjustment-math-more-accur.patch +++ b/Spigot-Server-Patches/0317-Make-portal-teleportation-adjustment-math-more-accur.patch @@ -1,14 +1,14 @@ -From d7b5f8d2bb11e9fd2f230fd0e1c2f9c8d6ad15b5 Mon Sep 17 00:00:00 2001 +From e51147bb0227c0433e18d89fbbf9e470a541669b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 31 Jul 2018 19:32:57 -0500 Subject: [PATCH] Make portal teleportation adjustment math more accurate diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java -index 44c91ba26..c6933c1a3 100644 +index 13f0fb0b6..ce7181127 100644 --- a/src/main/java/net/minecraft/server/EnumDirection.java +++ b/src/main/java/net/minecraft/server/EnumDirection.java -@@ -95,6 +95,7 @@ public enum EnumDirection implements INamable { +@@ -82,6 +82,7 @@ public enum EnumDirection implements INamable { return this.i; } @@ -16,16 +16,16 @@ index 44c91ba26..c6933c1a3 100644 public EnumDirection.EnumAxisDirection c() { return this.l; } -@@ -103,6 +104,7 @@ public enum EnumDirection implements INamable { +@@ -90,6 +91,7 @@ public enum EnumDirection implements INamable { return fromType1(this.h); } + public final EnumDirection rotateY() { return e(); } // Paper - OBFHELPER public EnumDirection e() { - switch(this) { + switch (this) { case NORTH: -@@ -317,6 +319,7 @@ public enum EnumDirection implements INamable { - this.d = s1; +@@ -255,6 +257,7 @@ public enum EnumDirection implements INamable { + this.d = s; } + public final int getOffset() { return a(); } // Paper - OBFHELPER @@ -33,17 +33,17 @@ index 44c91ba26..c6933c1a3 100644 return this.c; } diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index d53d0c242..49fba0979 100644 +index 52918b971..8bb2593aa 100644 --- a/src/main/java/net/minecraft/server/MathHelper.java +++ b/src/main/java/net/minecraft/server/MathHelper.java -@@ -83,6 +83,7 @@ public class MathHelper { - } +@@ -81,6 +81,7 @@ public class MathHelper { + return f < f1 ? f1 : (f > f2 ? f2 : f); } + public static double clamp(double d0, double d1, double d2) { return a(d0, d1, d2); } // Paper - OBFHELPER public static double a(double d0, double d1, double d2) { - if (d0 < d1) { - return d1; + return d0 < d1 ? d1 : (d0 > d2 ? d2 : d0); + } diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java index a24bd02d5..d30a8a6bd 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -79,10 +79,10 @@ index a24bd02d5..d30a8a6bd 100644 float f1 = 0.0F; float f2 = 0.0F; diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java -index 78234cbdd..daeb3f83e 100644 +index 8ba4da0ea..8716f5fd9 100644 --- a/src/main/java/net/minecraft/server/ShapeDetector.java +++ b/src/main/java/net/minecraft/server/ShapeDetector.java -@@ -139,6 +139,7 @@ public class ShapeDetector { +@@ -140,6 +140,7 @@ public class ShapeDetector { return this.c; } @@ -91,5 +91,5 @@ index 78234cbdd..daeb3f83e 100644 return this.e; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0319-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0318-Add-hand-to-bucket-events.patch similarity index 97% rename from Spigot-Server-Patches/0319-Add-hand-to-bucket-events.patch rename to Spigot-Server-Patches/0318-Add-hand-to-bucket-events.patch index 67004e527..d1d8dd790 100644 --- a/Spigot-Server-Patches/0319-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0318-Add-hand-to-bucket-events.patch @@ -1,4 +1,4 @@ -From ba4ec600e42e8a8fb436f0cc63fa4e3de22cddb0 Mon Sep 17 00:00:00 2001 +From f9d0f4a174d7953eab8c74a20b20747ee80d25a0 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Thu, 2 Aug 2018 08:44:35 -0500 Subject: [PATCH] Add hand to bucket events @@ -18,13 +18,13 @@ index 5ac88166f..5874d2993 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java -index 6e12bf84f..5d8568a1c 100644 +index 6f5dda880..a064897fc 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -35,7 +35,7 @@ public class ItemBucket extends Item { if (iblockdata.getBlock() instanceof IFluidSource) { // CraftBukkit start - FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).a(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); + FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).removeFluid(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); - PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, dummyFluid.b()); + PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, dummyFluid.b(), enumhand); // Paper - add enumHand @@ -67,7 +67,7 @@ index 6e12bf84f..5d8568a1c 100644 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 41b05f231..c6cd2f3be 100644 +index fa3bb1047..a2841ee53 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -229,6 +229,20 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0320-MC-135506-Experience-should-save-as-Integers.patch b/Spigot-Server-Patches/0319-MC-135506-Experience-should-save-as-Integers.patch similarity index 91% rename from Spigot-Server-Patches/0320-MC-135506-Experience-should-save-as-Integers.patch rename to Spigot-Server-Patches/0319-MC-135506-Experience-should-save-as-Integers.patch index 945c695d0..fd4fd6d5f 100644 --- a/Spigot-Server-Patches/0320-MC-135506-Experience-should-save-as-Integers.patch +++ b/Spigot-Server-Patches/0319-MC-135506-Experience-should-save-as-Integers.patch @@ -1,11 +1,11 @@ -From 7187d073d6fc4d78549afbc0c0cfa9def3a50ed5 Mon Sep 17 00:00:00 2001 +From 2c72d20e4e8a288b3cfb72c67123c5a2a7e4623c Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Aug 2018 00:04:54 -0400 Subject: [PATCH] MC-135506: Experience should save as Integers diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 69d4dc9ab..80edbf481 100644 +index 09d85764b..3606b1014 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -205,14 +205,14 @@ public class EntityExperienceOrb extends Entity { @@ -26,5 +26,5 @@ index 69d4dc9ab..80edbf481 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0321-Entity-add-to-world-fixes.patch b/Spigot-Server-Patches/0320-Entity-add-to-world-fixes.patch similarity index 90% rename from Spigot-Server-Patches/0321-Entity-add-to-world-fixes.patch rename to Spigot-Server-Patches/0320-Entity-add-to-world-fixes.patch index 2bc642350..d9d2c3d3b 100644 --- a/Spigot-Server-Patches/0321-Entity-add-to-world-fixes.patch +++ b/Spigot-Server-Patches/0320-Entity-add-to-world-fixes.patch @@ -1,4 +1,4 @@ -From 230019864ac37b09b4b61f018ae1becd1e9d185b Mon Sep 17 00:00:00 2001 +From 5f6398c14a4543338fd3755149367528da13c794 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Aug 2018 22:47:46 -0400 Subject: [PATCH] Entity add to world fixes @@ -14,7 +14,7 @@ Fix this by differing entity add to world for all entities at the same time the original entity is dead, overwrite it as the logic does for unloaod queued entities. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 37bb6f40c..55104d00f 100644 +index ca236a315..edf4d9130 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -26,11 +26,10 @@ index 37bb6f40c..55104d00f 100644 import java.util.HashMap; import java.util.UUID; // Paper end -@@ -964,16 +966,16 @@ public class Chunk implements IChunkAccess { - } - } +@@ -964,15 +966,16 @@ public class Chunk implements IChunkAccess { // Paper end -- + + // CraftBukkit start - List toRemove = new LinkedList<>(); - this.world.a(entityslice.stream().filter((entity) -> { - if (this.needsDecoration && !CraftEventFactory.doEntityAddEventCalling(this.world, entity, CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { // Only call for new chunks @@ -54,10 +53,10 @@ index 37bb6f40c..55104d00f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5e61826f6..bd6f64e52 100644 +index 0d112016f..187506b57 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1037,6 +1037,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1032,6 +1032,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } this.getChunkAt(i, j).a(entity); @@ -65,7 +64,7 @@ index 5e61826f6..bd6f64e52 100644 this.entityList.add(entity); this.b(entity); return true; -@@ -2442,9 +2443,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2437,9 +2438,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return j; } @@ -80,10 +79,10 @@ index 5e61826f6..bd6f64e52 100644 this.b(entity); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index af9cdd9dc..10630ac96 100644 +index e7dbd730c..bd17e4cec 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -991,7 +991,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -974,7 +974,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.entitiesByUUID.containsKey(uuid)) { Entity entity1 = (Entity) this.entitiesByUUID.get(uuid); @@ -93,5 +92,5 @@ index af9cdd9dc..10630ac96 100644 } else { if (!(entity instanceof EntityHuman)) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0322-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0321-Fix-client-rendering-skulls-from-same-user.patch similarity index 88% rename from Spigot-Server-Patches/0322-Fix-client-rendering-skulls-from-same-user.patch rename to Spigot-Server-Patches/0321-Fix-client-rendering-skulls-from-same-user.patch index 9619cb572..97fdbe1f5 100644 --- a/Spigot-Server-Patches/0322-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0321-Fix-client-rendering-skulls-from-same-user.patch @@ -1,4 +1,4 @@ -From 5e227d9c66176d90820491e6cbe6148bc3c7c6c4 Mon Sep 17 00:00:00 2001 +From 6f0fd4eca259760779e5acfbbe94fc8556634067 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Nov 2016 00:40:42 -0500 Subject: [PATCH] Fix client rendering skulls from same user @@ -12,7 +12,7 @@ This allows the client to render multiple skull textures from the same user, for when different skins were used when skull was made. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index a1ec3879b..36c8644e2 100644 +index 8f2b0742d..e0091358a 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -44,7 +44,7 @@ public final class ItemStack { @@ -62,19 +62,28 @@ index d05f1e02c..b95836d44 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index af382815f..22a262bb6 100644 +index f2159bc2d..18ef7232e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -33,6 +33,7 @@ public class PacketPlayOutMapChunk implements Packet { - int j = blockposition.getY() >> 4; +@@ -38,6 +38,7 @@ public class PacketPlayOutMapChunk implements Packet { + if (this.f() || (i & 1 << j) != 0) { NBTTagCompound nbttagcompound = tileentity.aa_(); + if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper + this.e.add(nbttagcompound); } +@@ -122,7 +123,7 @@ public class PacketPlayOutMapChunk implements Packet { + BiomeBase[] abiomebase = chunk.getBiomeIndex(); + + for (l = 0; l < abiomebase.length; ++l) { +- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) abiomebase[l])); ++ packetdataserializer.writeInt(IRegistry.BIOME.a(abiomebase[l])); // Paper - Decompile fix + } } + diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index e59f3c21d..05fca47f3 100644 +index 79c24cdc4..6511bfda8 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -142,9 +142,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa @@ -117,5 +126,5 @@ index e59f3c21d..05fca47f3 100644 public NBTTagCompound aa_() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0323-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0322-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 97% rename from Spigot-Server-Patches/0323-Add-Early-Warning-Feature-to-WatchDog.patch rename to Spigot-Server-Patches/0322-Add-Early-Warning-Feature-to-WatchDog.patch index fe26572ed..d017d5bff 100644 --- a/Spigot-Server-Patches/0323-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0322-Add-Early-Warning-Feature-to-WatchDog.patch @@ -1,4 +1,4 @@ -From 2f48e58760d9e8f2e19c16e04ba6127567d8f368 Mon Sep 17 00:00:00 2001 +From 4da27fde3890046491fa34b977216fef33796a7d Mon Sep 17 00:00:00 2001 From: miclebrick Date: Wed, 8 Aug 2018 15:30:52 -0400 Subject: [PATCH] Add Early Warning Feature to WatchDog @@ -36,10 +36,10 @@ index a92914576..f3f2a0b69 100644 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c3efb5e1b..ca72e6ad1 100644 +index a55ab0fd9..5a0dbcb42 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -796,6 +796,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -791,6 +791,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.a(this.m); // Spigot start @@ -48,7 +48,7 @@ index c3efb5e1b..ca72e6ad1 100644 long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop lastTick = start - TICK_TIME; // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71d1929c1..93a8f4cdf 100644 +index ec197ef51..392cd0e3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -750,6 +750,7 @@ public final class CraftServer implements Server { @@ -68,10 +68,10 @@ index 71d1929c1..93a8f4cdf 100644 @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index eed96c60c..496c5cbdf 100644 +index 9c442dee2..fb09fb097 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -226,7 +226,7 @@ public class SpigotConfig +@@ -225,7 +225,7 @@ public class SpigotConfig restartScript = getString( "settings.restart-script", restartScript ); restartMessage = transform( getString( "messages.restart", "Server is restarting" ) ); commands.put( "restart", new RestartCommand( "restart" ) ); @@ -182,5 +182,5 @@ index ed5f46bf6..9dba9510f 100644 { interrupt(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0324-Make-EnderDragon-implement-Mob.patch b/Spigot-Server-Patches/0323-Make-EnderDragon-implement-Mob.patch similarity index 95% rename from Spigot-Server-Patches/0324-Make-EnderDragon-implement-Mob.patch rename to Spigot-Server-Patches/0323-Make-EnderDragon-implement-Mob.patch index c0866bc78..90510aedc 100644 --- a/Spigot-Server-Patches/0324-Make-EnderDragon-implement-Mob.patch +++ b/Spigot-Server-Patches/0323-Make-EnderDragon-implement-Mob.patch @@ -1,4 +1,4 @@ -From 37e833b3f7a2d592b00c59f9c03ce5248b72c966 Mon Sep 17 00:00:00 2001 +From dffe858eacb53e549424ed5152bb46ff7f4c493b Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 10 Aug 2018 22:11:49 -0400 Subject: [PATCH] Make EnderDragon implement Mob @@ -32,5 +32,5 @@ index cc115cc36..4947249da 100644 @Override -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0325-Detect-and-repair-corrupt-Region-Files.patch b/Spigot-Server-Patches/0324-Detect-and-repair-corrupt-Region-Files.patch similarity index 84% rename from Spigot-Server-Patches/0325-Detect-and-repair-corrupt-Region-Files.patch rename to Spigot-Server-Patches/0324-Detect-and-repair-corrupt-Region-Files.patch index c5ef4636a..69f183e50 100644 --- a/Spigot-Server-Patches/0325-Detect-and-repair-corrupt-Region-Files.patch +++ b/Spigot-Server-Patches/0324-Detect-and-repair-corrupt-Region-Files.patch @@ -1,4 +1,4 @@ -From cd74ac2197650f3df5f0f1148ad08de5a75e3d8c Mon Sep 17 00:00:00 2001 +From 908a2abd3dfe84cd683d79b36dcc4bfcd632393b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 11 Aug 2018 00:49:20 -0400 Subject: [PATCH] Detect and repair corrupt Region Files @@ -11,12 +11,12 @@ I don't know why mojang only checks for 4096, when anything less than 8192 is a But to be safe, it will attempt to back up the file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 5d2853b9c..6a2edfd1e 100644 +index 407ac75aa..d3e6d755e 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -22,10 +22,10 @@ import javax.annotation.Nullable; - +@@ -23,10 +23,10 @@ import javax.annotation.Nullable; public class RegionFile { + private static final byte[] a = new byte[4096]; - private final File b; - private RandomAccessFile c; @@ -29,36 +29,36 @@ index 5d2853b9c..6a2edfd1e 100644 private List f; private int g; private long h; -@@ -40,7 +40,7 @@ public class RegionFile { +@@ -41,7 +41,7 @@ public class RegionFile { } - this.c = new RandomAccessFile(file1, "rw"); + this.c = new RandomAccessFile(file, "rw"); - if (this.c.length() < 4096L) { + if (this.c.length() < 8192L) { // Paper - headers should be 8192 - this.c.write(a); - this.c.write(a); + this.c.write(RegionFile.a); + this.c.write(RegionFile.a); this.g += 8192; -@@ -74,16 +74,16 @@ public class RegionFile { +@@ -80,16 +80,16 @@ public class RegionFile { for(int j1 = 0; j1 < 1024; ++j1) { int k = headerAsInts.get(); // Paper this.d[j1] = k; - if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) { + if (k > 0 && (k >> 8) > 1 && (k >> 8) + (k & 255) <= this.f.size()) { // Paper >= 1 as 0/1 are the headers, and negative isnt valid - for(int l = 0; l < (k & 255); ++l) { + for (int l = 0; l < (k & 255); ++l) { this.f.set((k >> 8) + l, false); } - } + } else if (k != 0) deleteChunk(j1); // Paper } - for(int k1 = 0; k1 < 1024; ++k1) { - int l1 = headerAsInts.get(); // Paper -- this.e[k1] = l1; -+ if (offsets[k1] != 0) this.timestamps[k1] = l1; // Paper - don't set timestamp if it got 0'd above due to corruption + for (j = 0; j < 1024; ++j) { + int k = headerAsInts.get(); // Paper +- this.e[j] = k; ++ if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption } } catch (IOException ioexception) { ioexception.printStackTrace(); -@@ -276,6 +276,55 @@ public class RegionFile { +@@ -291,6 +291,55 @@ public class RegionFile { } @@ -112,8 +112,8 @@ index 5d2853b9c..6a2edfd1e 100644 + // Paper end + class ChunkBuffer extends ByteArrayOutputStream { + private final int b; - private final int c; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0326-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0325-Use-ConcurrentHashMap-in-JsonList.patch similarity index 82% rename from Spigot-Server-Patches/0326-Use-ConcurrentHashMap-in-JsonList.patch rename to Spigot-Server-Patches/0325-Use-ConcurrentHashMap-in-JsonList.patch index f38cfde11..6a430dc6f 100644 --- a/Spigot-Server-Patches/0326-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0325-Use-ConcurrentHashMap-in-JsonList.patch @@ -1,4 +1,4 @@ -From f14c71b032397d4a94eb0eb2218371a800b058d5 Mon Sep 17 00:00:00 2001 +From 6e49834ea2f19d8731df052ac9de3f2a04b8abe9 Mon Sep 17 00:00:00 2001 From: egg82 Date: Tue, 7 Aug 2018 01:24:23 -0600 Subject: [PATCH] Use ConcurrentHashMap in JsonList @@ -25,10 +25,10 @@ The point of this is readability, but does have a side-benefit of a small microp Finally, added a couple obfhelpers for the modified code diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 6700e68c0..a2815b91f 100644 +index 026ef7939..b7cde4d41 100644 --- a/src/main/java/net/minecraft/server/JsonList.java +++ b/src/main/java/net/minecraft/server/JsonList.java -@@ -36,7 +36,8 @@ public class JsonList> { +@@ -35,7 +35,8 @@ public class JsonList> { protected static final Logger a = LogManager.getLogger(); protected final Gson b; private final File c; @@ -38,7 +38,7 @@ index 6700e68c0..a2815b91f 100644 private boolean e = true; private static final ParameterizedType f = new ParameterizedType() { public Type[] getActualTypeArguments() { -@@ -85,8 +86,13 @@ public class JsonList> { +@@ -84,8 +85,13 @@ public class JsonList> { @Nullable public V get(K k0) { @@ -54,7 +54,7 @@ index 6700e68c0..a2815b91f 100644 } public void remove(K k0) { -@@ -115,9 +121,11 @@ public class JsonList> { +@@ -114,9 +120,11 @@ public class JsonList> { // CraftBukkit end public boolean isEmpty() { @@ -67,22 +67,21 @@ index 6700e68c0..a2815b91f 100644 protected String a(K k0) { return k0.toString(); } -@@ -126,8 +134,10 @@ public class JsonList> { +@@ -125,8 +133,9 @@ public class JsonList> { return this.d.containsKey(this.a(k0)); } + private void removeStaleEntries() { h(); } // Paper - OBFHELPER private void h() { -- ArrayList arraylist = Lists.newArrayList(); -+ // Paper start -+ /*ArrayList arraylist = Lists.newArrayList(); +- List list = Lists.newArrayList(); ++ /*List list = Lists.newArrayList(); Iterator iterator = this.d.values().iterator(); while (iterator.hasNext()) { -@@ -144,8 +154,10 @@ public class JsonList> { - Object object = iterator.next(); +@@ -143,8 +152,10 @@ public class JsonList> { + K k0 = (K) iterator.next(); // CraftBukkit - decompile error - this.d.remove(this.a((K) object)); // CraftBukkit - decompile error + this.d.remove(this.a(k0)); - } + }*/ @@ -91,15 +90,14 @@ index 6700e68c0..a2815b91f 100644 } protected JsonListEntry a(JsonObject jsonobject) { -@@ -157,6 +169,8 @@ public class JsonList> { +@@ -156,6 +167,7 @@ public class JsonList> { } public void save() throws IOException { + this.removeStaleEntries(); // Paper - remove expired values before saving -+ - Collection collection = this.d.values(); + Collection collection = this.d.values(); String s = this.b.toJson(collection); BufferedWriter bufferedwriter = null; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0327-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0326-Use-a-Queue-for-Queueing-Commands.patch similarity index 94% rename from Spigot-Server-Patches/0327-Use-a-Queue-for-Queueing-Commands.patch rename to Spigot-Server-Patches/0326-Use-a-Queue-for-Queueing-Commands.patch index a4d252172..d77d284d5 100644 --- a/Spigot-Server-Patches/0327-Use-a-Queue-for-Queueing-Commands.patch +++ b/Spigot-Server-Patches/0326-Use-a-Queue-for-Queueing-Commands.patch @@ -1,4 +1,4 @@ -From dc45760127f4d33da97e363e0c74d48fa9e3baa5 Mon Sep 17 00:00:00 2001 +From a3b684b2cea02f3a33fa08ececd3e786778c6d97 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 12 Aug 2018 02:33:39 -0400 Subject: [PATCH] Use a Queue for Queueing Commands @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 1b3ca24d9..2c79c5333 100644 +index 3062d3e20..67690561b 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -39,7 +39,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -32,5 +32,5 @@ index 1b3ca24d9..2c79c5333 100644 // CraftBukkit start - ServerCommand for preprocessing ServerCommandEvent event = new ServerCommandEvent(console, servercommand.command); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0328-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-Server-Patches/0327-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 92% rename from Spigot-Server-Patches/0328-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-Server-Patches/0327-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index 2a39fb64e..268233437 100644 --- a/Spigot-Server-Patches/0328-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/Spigot-Server-Patches/0327-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -1,11 +1,11 @@ -From 5198d60c225315ac6160ad530aad57c5024596d6 Mon Sep 17 00:00:00 2001 +From ab4cd2964cc5a3c0306769a25d35d0310859ba1a Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 15 Aug 2018 01:16:34 -0400 Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 76d395c4e..12c6d850d 100644 +index e65768499..9ba2fa5de 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -99,7 +99,12 @@ public class CraftChunk implements Chunk { @@ -31,5 +31,5 @@ index 76d395c4e..12c6d850d 100644 return entities; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0329-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0328-Allow-disabling-armour-stand-ticking.patch similarity index 98% rename from Spigot-Server-Patches/0329-Allow-disabling-armour-stand-ticking.patch rename to Spigot-Server-Patches/0328-Allow-disabling-armour-stand-ticking.patch index 90078a5fd..3c4f3725f 100644 --- a/Spigot-Server-Patches/0329-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/0328-Allow-disabling-armour-stand-ticking.patch @@ -1,4 +1,4 @@ -From e48332db0f5bfbafa2fb3ad77e4cf28dac027a60 Mon Sep 17 00:00:00 2001 +From 91071de56fbc02911603727c8b850aa6c2bc2fd8 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 15 Aug 2018 01:26:09 -0700 Subject: [PATCH] Allow disabling armour stand ticking @@ -20,7 +20,7 @@ index 4059c7a72..10efe6b3d 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 1dcc482c0..c5bddb1da 100644 +index c604182dd..2c54e3e34 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -45,6 +45,11 @@ public class EntityArmorStand extends EntityLiving { @@ -141,7 +141,7 @@ index 1dcc482c0..c5bddb1da 100644 public Vector3f r() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3e9af4481..1dcb9a7e9 100644 +index 87715c302..8f5ff37c2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2082,52 +2082,7 @@ public abstract class EntityLiving extends Entity { @@ -277,5 +277,5 @@ index 9f5c3b92e..07ce93f17 100644 // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0329-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0329-Optimize-BlockPosition-helper-methods.patch new file mode 100644 index 000000000..d2164b356 --- /dev/null +++ b/Spigot-Server-Patches/0329-Optimize-BlockPosition-helper-methods.patch @@ -0,0 +1,100 @@ +From 9b44022abc6f62f42e55ae12c094df9388259427 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Wed, 15 Aug 2018 12:05:12 -0700 +Subject: [PATCH] Optimize BlockPosition helper methods + +Resolves #1338 + +diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java +index f260068c6..cf3cf1c25 100644 +--- a/src/main/java/net/minecraft/server/BlockPosition.java ++++ b/src/main/java/net/minecraft/server/BlockPosition.java +@@ -59,55 +59,72 @@ public class BlockPosition extends BaseBlockPosition { + } + + public BlockPosition up() { +- return this.up(1); ++ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition up(int i) { +- return this.shift(EnumDirection.UP, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() + i, this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition down() { +- return this.down(1); ++ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition down(int i) { +- return this.shift(EnumDirection.DOWN, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() - i, this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition north() { +- return this.north(1); ++ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); // Paper - Optimize BlockPosition + } + + public BlockPosition north(int i) { +- return this.shift(EnumDirection.NORTH, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - i); // Paper - Optimize BlockPosition + } + + public BlockPosition south() { +- return this.south(1); ++ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); // Paper - Optimize BlockPosition + } + + public BlockPosition south(int i) { +- return this.shift(EnumDirection.SOUTH, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + i); // Paper - Optimize BlockPosition + } + + public BlockPosition west() { +- return this.west(1); ++ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition west(int i) { +- return this.shift(EnumDirection.WEST, i); ++ return i == 0 ? this : new BlockPosition(this.getX() - i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition east() { +- return this.east(1); ++ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition east(int i) { +- return this.shift(EnumDirection.EAST, i); ++ return i == 0 ? this : new BlockPosition(this.getX() + i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + } + + public BlockPosition shift(EnumDirection enumdirection) { +- return this.shift(enumdirection, 1); ++ // Paper Start - Optimize BlockPosition ++ switch(enumdirection) { ++ case UP: ++ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); ++ case DOWN: ++ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); ++ case NORTH: ++ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); ++ case SOUTH: ++ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); ++ case WEST: ++ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); ++ case EAST: ++ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); ++ default: ++ return new BlockPosition(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); ++ } ++ // Paper End + } + + public BlockPosition shift(EnumDirection enumdirection, int i) { +-- +2.20.1 + diff --git a/Spigot-Server-Patches/0330-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0330-Optimize-BlockPosition-helper-methods.patch deleted file mode 100644 index 729fa0260..000000000 --- a/Spigot-Server-Patches/0330-Optimize-BlockPosition-helper-methods.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 920e9a778232025ce8de4183f13610da418b3843 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Wed, 15 Aug 2018 12:05:12 -0700 -Subject: [PATCH] Optimize BlockPosition helper methods - -Resolves #1338 - -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 9ce3cd9c9..adf648dfd 100644 ---- a/src/main/java/net/minecraft/server/BlockPosition.java -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -58,59 +58,96 @@ public class BlockPosition extends BaseBlockPosition { - } - - public BlockPosition up() { -- return this.up(1); -+ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition up(int ix) { -- return this.shift(EnumDirection.UP, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() + ix, this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition down() { -- return this.down(1); -+ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition down(int ix) { -- return this.shift(EnumDirection.DOWN, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() - ix, this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition north() { -- return this.north(1); -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); // Paper - Optimize BlockPosition - } - - public BlockPosition north(int ix) { -- return this.shift(EnumDirection.NORTH, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - ix); // Paper - Optimize BlockPosition - } - - public BlockPosition south() { -- return this.south(1); -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); // Paper - Optimize BlockPosition - } - - public BlockPosition south(int ix) { -- return this.shift(EnumDirection.SOUTH, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + ix); // Paper - Optimize BlockPosition - } - - public BlockPosition west() { -- return this.west(1); -+ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition west(int ix) { -- return this.shift(EnumDirection.WEST, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX() - ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition east() { -- return this.east(1); -+ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition east(int ix) { -- return this.shift(EnumDirection.EAST, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX() + ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition - } - - public BlockPosition shift(EnumDirection enumdirection) { -- return this.shift(enumdirection, 1); -+ // Paper Start - Optimize BlockPosition -+ switch(enumdirection) { -+ case UP: -+ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); -+ case DOWN: -+ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); -+ case NORTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); -+ case SOUTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); -+ case WEST: -+ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); -+ case EAST: -+ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); -+ default: -+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); -+ } -+ // Paper End - } - - public BlockPosition shift(EnumDirection enumdirection, int ix) { -- return ix == 0 ? this : new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix); -+ // Paper Start - Optimize BlockPosition -+ if (ix == 0) { -+ return this; -+ } -+ switch(enumdirection) { -+ case UP: -+ return new BlockPosition(this.getX(), this.getY() + ix, this.getZ()); -+ case DOWN: -+ return new BlockPosition(this.getX(), this.getY() - ix, this.getZ()); -+ case NORTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - ix); -+ case SOUTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + ix); -+ case WEST: -+ return new BlockPosition(this.getX() - ix, this.getY(), this.getZ()); -+ case EAST: -+ return new BlockPosition(this.getX() + ix, this.getY(), this.getZ()); -+ default: -+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix); -+ } -+ // Paper End - } - - public BlockPosition a(EnumBlockRotation enumblockrotation) { --- -2.20.0 - diff --git a/Spigot-Server-Patches/0331-Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/0330-Send-nearby-packets-from-world-player-list-not-serve.patch similarity index 94% rename from Spigot-Server-Patches/0331-Send-nearby-packets-from-world-player-list-not-serve.patch rename to Spigot-Server-Patches/0330-Send-nearby-packets-from-world-player-list-not-serve.patch index 5ecc8c5a1..05f0fc630 100644 --- a/Spigot-Server-Patches/0331-Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/0330-Send-nearby-packets-from-world-player-list-not-serve.patch @@ -1,14 +1,14 @@ -From 710d5ad369ece6e4eda1d9c02b1631b84c550ea5 Mon Sep 17 00:00:00 2001 +From cbe420b306d65b21de3f18e40655a1151d69dde4 Mon Sep 17 00:00:00 2001 From: Mystiflow Date: Fri, 6 Jul 2018 13:21:30 +0100 Subject: [PATCH] Send nearby packets from world player list not server list diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6311c9f87..50c91d12c 100644 +index a00ce829f..fee3b68d1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1202,8 +1202,25 @@ public abstract class PlayerList { +@@ -1201,8 +1201,25 @@ public abstract class PlayerList { } public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, DimensionManager dimensionmanager, Packet packet) { @@ -36,7 +36,7 @@ index 6311c9f87..50c91d12c 100644 // CraftBukkit start - Test if player receiving packet can see the source of the packet if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { -@@ -1211,7 +1228,7 @@ public abstract class PlayerList { +@@ -1210,7 +1227,7 @@ public abstract class PlayerList { } // CraftBukkit end @@ -95,10 +95,10 @@ index b4225b58e..0ba0eb661 100644 if (entityplayer != null && entityplayer.world == this.world && entityplayer.getId() != i) { double d0 = (double) blockposition.getX() - entityplayer.locX; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 10630ac96..b355c3f53 100644 +index bd17e4cec..0a1ffd009 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1088,7 +1088,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1071,7 +1071,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } // CraftBukkit end if (super.strikeLightning(entity)) { @@ -107,7 +107,7 @@ index 10630ac96..b355c3f53 100644 return true; } else { return false; -@@ -1148,8 +1148,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1131,8 +1131,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { BlockActionData blockactiondata = (BlockActionData) this.d.removeFirst(); if (this.a(blockactiondata)) { @@ -119,10 +119,10 @@ index 10630ac96..b355c3f53 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ee2b443dd..5a7857e25 100644 +index 3fdd12ec0..e0b466d0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1614,7 +1614,7 @@ public class CraftWorld implements World { +@@ -1636,7 +1636,7 @@ public class CraftWorld implements World { double z = loc.getZ(); PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), SoundCategory.valueOf(category.name()), new Vec3D(x, y, z), volume, pitch); diff --git a/Spigot-Server-Patches/0332-Cache-World-Entity-Type-counts.patch b/Spigot-Server-Patches/0331-Cache-World-Entity-Type-counts.patch similarity index 93% rename from Spigot-Server-Patches/0332-Cache-World-Entity-Type-counts.patch rename to Spigot-Server-Patches/0331-Cache-World-Entity-Type-counts.patch index 749ca82dd..8c1877264 100644 --- a/Spigot-Server-Patches/0332-Cache-World-Entity-Type-counts.patch +++ b/Spigot-Server-Patches/0331-Cache-World-Entity-Type-counts.patch @@ -1,4 +1,4 @@ -From a329f9c94e70c3ec8bd7d30e6366fcb70cf6ad29 Mon Sep 17 00:00:00 2001 +From f3535616c140d470acb08dfa6671ea715300c8f8 Mon Sep 17 00:00:00 2001 From: Colin Godsey Date: Wed, 8 Aug 2018 10:10:06 -0600 Subject: [PATCH] Cache World Entity Type counts @@ -133,10 +133,10 @@ index 000000000..a10a5bc13 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e9543c06c..c083b2dd3 100644 +index a9b0f8497..3311e2b24 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -124,6 +124,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -122,6 +122,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private boolean az; public boolean dead; public boolean shouldBeRemoved; // Paper @@ -145,10 +145,10 @@ index e9543c06c..c083b2dd3 100644 public float length; public float J; diff --git a/src/main/java/net/minecraft/server/EnumCreatureType.java b/src/main/java/net/minecraft/server/EnumCreatureType.java -index 8874a05be..0af387c05 100644 +index 79e52f7ba..42f6a6a93 100644 --- a/src/main/java/net/minecraft/server/EnumCreatureType.java +++ b/src/main/java/net/minecraft/server/EnumCreatureType.java -@@ -18,6 +18,8 @@ public enum EnumCreatureType { +@@ -16,6 +16,8 @@ public enum EnumCreatureType { this.h = flag1; } @@ -158,7 +158,7 @@ index 8874a05be..0af387c05 100644 return this.e; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 72cd9ba58..35205561b 100644 +index e62616552..bfbe4d3e3 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -114,7 +114,7 @@ public final class SpawnerCreature { @@ -171,10 +171,10 @@ index 72cd9ba58..35205561b 100644 if (l1 <= k) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bd6f64e52..67a903a62 100644 +index 187506b57..823c3900b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -50,7 +50,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -45,7 +45,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc private static final EnumDirection[] a = EnumDirection.values(); private int b = 63; // Spigot start - guard entity list from removals @@ -184,7 +184,7 @@ index bd6f64e52..67a903a62 100644 { @Override public Entity remove(int index) -@@ -74,6 +75,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -69,6 +70,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } }; @@ -192,7 +192,7 @@ index bd6f64e52..67a903a62 100644 // Spigot end protected final Set g = com.google.common.collect.Sets.newHashSet(); public Set getEntityUnloadQueue() { return g; };// Paper - OBFHELPER //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list -@@ -144,7 +146,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -139,7 +141,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper public final co.aikar.timings.WorldTimingsHandler timings; // Paper @@ -201,7 +201,7 @@ index bd6f64e52..67a903a62 100644 public static boolean haveWeSilencedAPhysicsCrash; public static String blockLocation; private org.spigotmc.TickLimiter entityLimiter; -@@ -1122,6 +1124,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1117,6 +1119,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.getChunkAt(i, j).b(entity); } entity.shouldBeRemoved = true; // Paper @@ -210,5 +210,5 @@ index bd6f64e52..67a903a62 100644 if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above // CraftBukkit start - Decrement loop variable field if we've already ticked this entity -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0333-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0332-Restore-vanlla-default-mob-spawn-range.patch similarity index 80% rename from Spigot-Server-Patches/0333-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0332-Restore-vanlla-default-mob-spawn-range.patch index 17ad8053a..dd8d731a5 100644 --- a/Spigot-Server-Patches/0333-Restore-vanlla-default-mob-spawn-range.patch +++ b/Spigot-Server-Patches/0332-Restore-vanlla-default-mob-spawn-range.patch @@ -1,14 +1,14 @@ -From 21045a7146a3f7a534a4eb335b15d39f5bf451d4 Mon Sep 17 00:00:00 2001 +From 650d6b77cb1f885c067e01a383763db0a373732d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 18 Aug 2018 12:43:16 -0400 Subject: [PATCH] Restore vanlla default mob-spawn-range diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 06d84a0b6..15abde4f5 100644 +index 1d222eaff..809ce1d6a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -130,7 +130,7 @@ public class SpigotWorldConfig +@@ -136,7 +136,7 @@ public class SpigotWorldConfig public byte mobSpawnRange; private void mobSpawnRange() { @@ -18,5 +18,5 @@ index 06d84a0b6..15abde4f5 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0334-Optimize-Hoppers.patch b/Spigot-Server-Patches/0333-Optimize-Hoppers.patch similarity index 94% rename from Spigot-Server-Patches/0334-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0333-Optimize-Hoppers.patch index 8684d70ec..9f9216d47 100644 --- a/Spigot-Server-Patches/0334-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0333-Optimize-Hoppers.patch @@ -1,4 +1,4 @@ -From 17aa1c3fa6671bacf38808cedb910bc2028a1213 Mon Sep 17 00:00:00 2001 +From 1568726fe1d7c95968a9cf75e665b673bf734dc9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Optimize Hoppers @@ -31,10 +31,10 @@ index 10efe6b3d..6feea98b6 100644 private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 569f301a2..d32ea9c92 100644 +index e0091358a..99dab7a47 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -461,8 +461,9 @@ public final class ItemStack { +@@ -464,8 +464,9 @@ public final class ItemStack { return this.getItem().a(this, entityhuman, entityliving, enumhand); } @@ -47,10 +47,10 @@ index 569f301a2..d32ea9c92 100644 itemstack.d(this.B()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 928dbf032..aaefb98c0 100644 +index 5a0dbcb42..59a71e5b0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1050,7 +1050,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1045,7 +1045,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit - dropTickTime for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) { @@ -81,10 +81,10 @@ index 29fe031d8..d67fd92d9 100644 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 15e4a37fb..5291c1836 100644 +index 559eedfa6..7303a6fdd 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 +@@ -189,6 +189,154 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi return false; } @@ -239,7 +239,7 @@ index 15e4a37fb..5291c1836 100644 private boolean s() { IInventory iinventory = this.D(); -@@ -201,6 +349,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -200,6 +348,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi if (this.a(iinventory, enumdirection)) { return false; } else { @@ -247,7 +247,7 @@ index 15e4a37fb..5291c1836 100644 for (int i = 0; i < this.getSize(); ++i) { if (!this.getItem(i).isEmpty()) { ItemStack itemstack = this.getItem(i).cloneItemStack(); -@@ -238,7 +387,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -237,7 +386,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } } @@ -256,7 +256,7 @@ index 15e4a37fb..5291c1836 100644 } } } -@@ -309,6 +458,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -308,6 +457,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi if (b(iinventory, enumdirection)) { return false; } @@ -264,7 +264,7 @@ index 15e4a37fb..5291c1836 100644 if (iinventory instanceof IWorldInventory) { IWorldInventory iworldinventory = (IWorldInventory) iinventory; -@@ -351,6 +501,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -350,6 +500,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi ItemStack itemstack = iinventory.getItem(i); if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { @@ -272,7 +272,7 @@ index 15e4a37fb..5291c1836 100644 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 -@@ -387,7 +538,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -386,7 +537,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } itemstack1.subtract(origCount - itemstack2.getCount()); // Spigot @@ -281,7 +281,7 @@ index 15e4a37fb..5291c1836 100644 } return false; -@@ -396,7 +547,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -395,7 +546,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi public static boolean a(IInventory iinventory, EntityItem entityitem) { boolean flag = false; // CraftBukkit start @@ -290,7 +290,7 @@ index 15e4a37fb..5291c1836 100644 entityitem.world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { return false; -@@ -450,7 +601,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -449,7 +600,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi boolean flag1 = iinventory1.P_(); if (itemstack1.isEmpty()) { diff --git a/Spigot-Server-Patches/0335-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0334-Optimize-CraftBlockData-Creation.patch similarity index 85% rename from Spigot-Server-Patches/0335-Optimize-CraftBlockData-Creation.patch rename to Spigot-Server-Patches/0334-Optimize-CraftBlockData-Creation.patch index bd85a32fb..2fa590104 100644 --- a/Spigot-Server-Patches/0335-Optimize-CraftBlockData-Creation.patch +++ b/Spigot-Server-Patches/0334-Optimize-CraftBlockData-Creation.patch @@ -1,4 +1,4 @@ -From 282209ce7be1433a8ce6153e59ba0a56737fc9d7 Mon Sep 17 00:00:00 2001 +From 52945047efffbd431400031b5c3e456afcc33afa Mon Sep 17 00:00:00 2001 From: miclebrick Date: Thu, 23 Aug 2018 11:45:32 -0400 Subject: [PATCH] Optimize CraftBlockData Creation @@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData and cloning it when one is needed. diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java -index fbe181c1f..bd86cd2e5 100644 +index 4dd6c3276..1b226a77e 100644 --- a/src/main/java/net/minecraft/server/BlockData.java +++ b/src/main/java/net/minecraft/server/BlockData.java @@ -1,6 +1,7 @@ @@ -17,10 +17,10 @@ index fbe181c1f..bd86cd2e5 100644 +import org.bukkit.craftbukkit.block.data.CraftBlockData; public class BlockData extends BlockDataAbstract implements IBlockData { - public BlockData(Block block, ImmutableMap, Comparable> immutablemap) { -@@ -10,4 +11,14 @@ public class BlockData extends BlockDataAbstract implements I + +@@ -11,4 +12,14 @@ public class BlockData extends BlockDataAbstract implements I public Block getBlock() { - return this.e_; + return (Block) this.e_; } + + // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time @@ -34,10 +34,10 @@ index fbe181c1f..bd86cd2e5 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 1423419b9..2d855aae6 100644 +index e4e4c5513..08a5acb0a 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -23,6 +23,8 @@ public interface IBlockData extends IBlockDataHolder { +@@ -27,6 +27,8 @@ public interface IBlockData extends IBlockDataHolder { Block getBlock(); @@ -47,10 +47,10 @@ index 1423419b9..2d855aae6 100644 return this.getBlock().n(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 57f483367..8ac8969e2 100644 +index 8c110c67d..808826588 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -531,7 +531,17 @@ public class CraftBlockData implements BlockData { +@@ -521,7 +521,17 @@ public class CraftBlockData implements BlockData { return craft; } diff --git a/Spigot-Server-Patches/0336-Fix-MC-124320.patch b/Spigot-Server-Patches/0335-Fix-MC-124320.patch similarity index 87% rename from Spigot-Server-Patches/0336-Fix-MC-124320.patch rename to Spigot-Server-Patches/0335-Fix-MC-124320.patch index a4febd05a..fb89196b3 100644 --- a/Spigot-Server-Patches/0336-Fix-MC-124320.patch +++ b/Spigot-Server-Patches/0335-Fix-MC-124320.patch @@ -1,14 +1,14 @@ -From 0fa92dc555762952141bc8de4ed2274b5be93bb4 Mon Sep 17 00:00:00 2001 +From e474e75089946df413dd1d5574f907342ded620e Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Thu, 23 Aug 2018 09:25:30 -0500 Subject: [PATCH] Fix MC-124320 diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 1bf01000e..f8ef58dca 100644 +index 66643be2b..28efb4d4f 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -155,6 +155,7 @@ public class Block implements IMaterial { +@@ -154,6 +154,7 @@ public class Block implements IMaterial { return tag.isTagged(this); } @@ -17,10 +17,10 @@ index 1bf01000e..f8ef58dca 100644 IBlockData iblockdata1 = iblockdata; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index d5c55d50e..f9d5a2499 100644 +index 139a70ca3..e4aba0e0a 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -313,8 +313,9 @@ public class EntityEnderman extends EntityMonster { +@@ -305,8 +305,9 @@ public class EntityEnderman extends EntityMonster { if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) { // CraftBukkit start - Pickup event if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { @@ -31,7 +31,7 @@ index d5c55d50e..f9d5a2499 100644 } // CraftBukkit end } -@@ -324,6 +325,7 @@ public class EntityEnderman extends EntityMonster { +@@ -316,6 +317,7 @@ public class EntityEnderman extends EntityMonster { static class PathfinderGoalEndermanPlaceBlock extends PathfinderGoal { @@ -39,7 +39,7 @@ index d5c55d50e..f9d5a2499 100644 private final EntityEnderman a; public PathfinderGoalEndermanPlaceBlock(EntityEnderman entityenderman) { -@@ -343,7 +345,7 @@ public class EntityEnderman extends EntityMonster { +@@ -335,7 +337,7 @@ public class EntityEnderman extends EntityMonster { BlockPosition blockposition = new BlockPosition(i, j, k); IBlockData iblockdata = world.getType(blockposition); IBlockData iblockdata1 = world.getType(blockposition.down()); @@ -49,5 +49,5 @@ index d5c55d50e..f9d5a2499 100644 if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1)) { // CraftBukkit start - Place event -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0337-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0336-Slime-Pathfinder-Events.patch similarity index 98% rename from Spigot-Server-Patches/0337-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0336-Slime-Pathfinder-Events.patch index b7f4b9e57..f78beeaf8 100644 --- a/Spigot-Server-Patches/0337-Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/0336-Slime-Pathfinder-Events.patch @@ -1,4 +1,4 @@ -From ff4978b2ab101e876fe9a81be9642ada2976fb91 Mon Sep 17 00:00:00 2001 +From f6fa732cbdcbe7dcadc27df28822bae39b34acd1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 08:18:42 -0500 Subject: [PATCH] Slime Pathfinder Events @@ -164,5 +164,5 @@ index 18e7ef80a..8403c1e01 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0338-Add-source-block-to-BlockPhysicsEvent.patch b/Spigot-Server-Patches/0337-Add-source-block-to-BlockPhysicsEvent.patch similarity index 87% rename from Spigot-Server-Patches/0338-Add-source-block-to-BlockPhysicsEvent.patch rename to Spigot-Server-Patches/0337-Add-source-block-to-BlockPhysicsEvent.patch index 3fcacb1b4..b072bc9e2 100644 --- a/Spigot-Server-Patches/0338-Add-source-block-to-BlockPhysicsEvent.patch +++ b/Spigot-Server-Patches/0337-Add-source-block-to-BlockPhysicsEvent.patch @@ -1,14 +1,14 @@ -From 38bdeeb7dd658da73e2dfd568d7375623d5a7cb8 Mon Sep 17 00:00:00 2001 +From b4008e9f85da18e2872ba12cc5064bcf6c8d89cf Mon Sep 17 00:00:00 2001 From: Sotr Date: Thu, 23 Aug 2018 16:14:12 +0800 Subject: [PATCH] Add source block to BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e8891d078..0d401bf1d 100644 +index 823c3900b..b4c9df025 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -630,7 +630,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -625,7 +625,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); if (world != null && !((WorldServer)this).stopPhysicsEvent) { // Paper @@ -18,5 +18,5 @@ index e8891d078..0d401bf1d 100644 if (event.isCancelled()) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0339-Anti-Xray.patch b/Spigot-Server-Patches/0338-Anti-Xray.patch similarity index 93% rename from Spigot-Server-Patches/0339-Anti-Xray.patch rename to Spigot-Server-Patches/0338-Anti-Xray.patch index b34e0ce87..0c8828e29 100644 --- a/Spigot-Server-Patches/0339-Anti-Xray.patch +++ b/Spigot-Server-Patches/0338-Anti-Xray.patch @@ -1,4 +1,4 @@ -From 4c5c1c499d8e7425bae655ec362edda3ffdd960a Mon Sep 17 00:00:00 2001 +From e4cfb81f94284476cfcc5029fb1dde2fbe1af3d5 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray @@ -1049,10 +1049,10 @@ index 000000000..37093419c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 414c27516..c3a54576f 100644 +index edf4d9130..71d865b76 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -542,7 +542,7 @@ public class Chunk implements IChunkAccess { +@@ -541,7 +541,7 @@ public class Chunk implements IChunkAccess { return null; } @@ -1061,7 +1061,7 @@ index 414c27516..c3a54576f 100644 this.sections[j >> 4] = chunksection; flag1 = j >= l; } -@@ -642,7 +642,7 @@ public class Chunk implements IChunkAccess { +@@ -641,7 +641,7 @@ public class Chunk implements IChunkAccess { return; } @@ -1071,10 +1071,10 @@ index 414c27516..c3a54576f 100644 this.initLighting(); } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 41a7103ef..c12db3cfa 100644 +index 450c9e79b..f3e766967 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -859,7 +859,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -842,7 +842,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } ChunkConverter chunkconverter = nbttagcompound.hasKeyOfType("UpgradeData", 10) ? new ChunkConverter(nbttagcompound.getCompound("UpgradeData")) : ChunkConverter.a; @@ -1083,7 +1083,7 @@ index 41a7103ef..c12db3cfa 100644 protochunk.a(abiomebase); protochunk.b(nbttagcompound.getLong("InhabitedTime")); -@@ -965,7 +965,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -948,7 +948,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound = nbttaglist.getCompound(i); byte b0 = nbttagcompound.getByte("Y"); @@ -1093,10 +1093,10 @@ index 41a7103ef..c12db3cfa 100644 chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates"); chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight"))); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 7e4c79a1c..bdfc7d81f 100644 +index 621ed1fc5..2af07ae59 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -10,9 +10,15 @@ public class ChunkSection { +@@ -11,9 +11,15 @@ public class ChunkSection { private NibbleArray emittedLight; private NibbleArray skyLight; @@ -1108,16 +1108,16 @@ index 7e4c79a1c..bdfc7d81f 100644 + + public ChunkSection(int i, boolean flag, IChunkAccess chunk, IWorldReader world, boolean initializeBlocks) { // Paper - Anti-Xray this.yPos = i; -- this.blockIds = new DataPaletteBlock(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); -+ this.blockIds = new DataPaletteBlock(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Anti-Xray - Add predefined block data +- this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); ++ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Anti-Xray - Add predefined block data this.emittedLight = new NibbleArray(); if (flag) { this.skyLight = new NibbleArray(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 9deab61fc..ad7e4a036 100644 +index 56958a5ce..d3898599f 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -@@ -42,7 +42,7 @@ public class ChunkTaskScheduler extends Scheduler implements DataPaletteExpandable { +@@ -16,6 +17,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { private final Function e; private final Function f; private final T g; @@ -1154,21 +1154,21 @@ index 6e7454b13..71a3636be 100644 protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER private DataPalette h; private DataPalette getDataPalette() { return this.h; } // Paper - OBFHELPER private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER -@@ -39,12 +41,43 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -41,12 +43,43 @@ public class DataPaletteBlock implements DataPaletteExpandable { } - public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object) { + public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0) { + // Paper start - Anti-Xray - Support default constructor -+ this(datapalette, registryblockid, function, function1, object, null, true); ++ this(datapalette, registryblockid, function, function1, t0, null, true); + } + -+ public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object, T[] predefinedObjects, boolean initialize) { ++ public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0, T[] predefinedObjects, boolean initialize) { + // Paper end - Anti-Xray - Add predefined objects this.b = datapalette; this.d = registryblockid; this.e = function; this.f = function1; - this.g = (T)object; + this.g = t0; - this.b(4); + // Paper start - Anti-Xray - Add predefined objects + this.predefinedObjects = predefinedObjects; @@ -1198,8 +1198,8 @@ index 6e7454b13..71a3636be 100644 + // Paper end } - private static int b(int ix, int jx, int k) { -@@ -70,12 +103,22 @@ public class DataPaletteBlock implements DataPaletteExpandable { + private static int b(int i, int j, int k) { +@@ -72,6 +105,16 @@ public class DataPaletteBlock implements DataPaletteExpandable { } } @@ -1212,18 +1212,20 @@ index 6e7454b13..71a3636be 100644 + } + } + // Paper end - public int onResize(int ix, T object) { ++ + public int onResize(int i, T t0) { this.b(); DataBits databits = this.a; - DataPalette datapalette = this.h; // Paper - decompile fix - this.b(ix); +@@ -81,6 +124,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { + + int j; + this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects - for(int jx = 0; jx < databits.b(); ++jx) { - T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix - if (object1 != null) { -@@ -108,11 +151,28 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return (T)(object == null ? this.g : object); + for (j = 0; j < databits.b(); ++j) { + T t1 = datapalette.a(databits.a(j)); + +@@ -116,11 +160,28 @@ public class DataPaletteBlock implements DataPaletteExpandable { + return t0 == null ? this.g : t0; } - public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER @@ -1252,29 +1254,29 @@ index 6e7454b13..71a3636be 100644 packetdataserializer.a(this.a.a()); this.c(); } -@@ -120,12 +180,15 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -128,13 +189,15 @@ public class DataPaletteBlock implements DataPaletteExpandable { public void a(NBTTagCompound nbttagcompound, String s, String s1) { this.b(); NBTTagList nbttaglist = nbttagcompound.getList(s, 10); -- int ix = Math.max(4, MathHelper.d(nbttaglist.size())); -- if (ix != this.i) { +- int i = Math.max(4, MathHelper.d(nbttaglist.size())); + // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? -+ int ix = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects -+ -+ if (true || ix != this.i) { // Paper - Anti-Xray - Not initialized yet - this.b(ix); ++ int i = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects + +- if (i != this.i) { ++ if (true || i != this.i) { // Paper - Anti-Xray - Not initialized yet + this.b(i); } this.h.a(nbttaglist); + this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects long[] along = nbttagcompound.o(s1); - int jx = along.length * 64 / 4096; - if (this.h == this.b) { + int j = along.length * 64 / 4096; + diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e75b1a76e..e5cc77c6d 100644 +index 4a50aab51..4c1110479 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -158,8 +158,8 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -157,8 +157,8 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public void sendPacket(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { @@ -1285,7 +1287,7 @@ index e75b1a76e..e5cc77c6d 100644 this.b(packet, genericfuturelistener); } else { this.j.writeLock().lock(); -@@ -214,23 +214,38 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -213,23 +213,38 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } @@ -1332,7 +1334,7 @@ index e75b1a76e..e5cc77c6d 100644 public void a() { this.o(); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 22a262bb6..40ec398ee 100644 +index 18ef7232e..8e35d14f9 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -1,5 +1,6 @@ @@ -1342,15 +1344,16 @@ index 22a262bb6..40ec398ee 100644 import com.google.common.collect.Lists; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -@@ -14,17 +15,27 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -16,17 +17,28 @@ public class PacketPlayOutMapChunk implements Packet { private byte[] d; private byte[] getData() { return this.d; } // Paper - OBFHELPER private List e; private boolean f; + private volatile boolean ready = false; // Paper - Async-Anti-Xray - Ready flag for the network manager - public PacketPlayOutMapChunk() { +- public PacketPlayOutMapChunk() {} ++ public PacketPlayOutMapChunk() { + this.ready = true; // Paper - Async-Anti-Xray - Set the ready flag to true - } ++ } public PacketPlayOutMapChunk(Chunk chunk, int i) { + ChunkPacketInfo chunkPacketInfo = chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i); // Paper - Anti-Xray - Add chunk packet info @@ -1358,6 +1361,7 @@ index 22a262bb6..40ec398ee 100644 this.b = chunk.locZ; this.f = i == 65535; boolean flag = chunk.getWorld().worldProvider.g(); + this.d = new byte[this.a(chunk, flag, i)]; - this.c = this.a(new PacketDataSerializer(this.h()), chunk, flag, i); + @@ -1369,9 +1373,9 @@ index 22a262bb6..40ec398ee 100644 + + this.c = this.writeChunk(new PacketDataSerializer(this.h()), chunk, flag, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info this.e = Lists.newArrayList(); + Iterator iterator = chunk.getTileEntities().entrySet().iterator(); - for(Entry entry : chunk.getTileEntities().entrySet()) { -@@ -38,8 +49,19 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -44,7 +56,18 @@ public class PacketPlayOutMapChunk implements Packet { } } @@ -1381,17 +1385,16 @@ index 22a262bb6..40ec398ee 100644 + // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag + public boolean isReady() { + return this.ready; - } - ++ } ++ + public void setReady(boolean ready) { + this.ready = ready; -+ } + } + // Paper end -+ + public void a(PacketDataSerializer packetdataserializer) throws IOException { this.a = packetdataserializer.readInt(); - this.b = packetdataserializer.readInt(); -@@ -86,8 +108,15 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -98,8 +121,15 @@ public class PacketPlayOutMapChunk implements Packet { return bytebuf; } @@ -1408,8 +1411,8 @@ index 22a262bb6..40ec398ee 100644 int j = 0; ChunkSection[] achunksection = chunk.getSections(); int k = 0; -@@ -96,7 +125,7 @@ public class PacketPlayOutMapChunk implements Packet { - ChunkSection chunksection = achunksection[k]; +@@ -111,7 +141,7 @@ public class PacketPlayOutMapChunk implements Packet { + if (chunksection != Chunk.a && (!this.f() || !chunksection.a()) && (i & 1 << k) != 0) { j |= 1 << k; - chunksection.getBlocks().b(packetdataserializer); @@ -1418,10 +1421,10 @@ index 22a262bb6..40ec398ee 100644 if (flag) { packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index db43a8a9a..b58683e6f 100644 +index 7d3f846a1..240f59066 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -100,6 +100,8 @@ public class PlayerChunk { +@@ -103,6 +103,8 @@ public class PlayerChunk { return false; } else if (!this.chunk.isReady()) { return false; @@ -1430,7 +1433,7 @@ index db43a8a9a..b58683e6f 100644 } else { this.dirtyCount = 0; this.h = 0; -@@ -119,6 +121,7 @@ public class PlayerChunk { +@@ -125,6 +127,7 @@ public class PlayerChunk { public void sendChunk(EntityPlayer entityplayer) { if (this.done) { @@ -1438,18 +1441,18 @@ index db43a8a9a..b58683e6f 100644 entityplayer.playerConnection.sendPacket(new PacketPlayOutMapChunk(this.chunk, 65535)); this.playerChunkMap.getWorld().getTracker().a(entityplayer, this.chunk); } -@@ -177,6 +180,9 @@ public class PlayerChunk { +@@ -189,6 +192,9 @@ public class PlayerChunk { this.a(this.playerChunkMap.getWorld().getTileEntity(blockposition)); } } else if (this.dirtyCount == 64) { + // Paper - Anti-Xray - Loading chunks here could cause a ConcurrentModificationException #1104 + // Paper - Anti-Xray - TODO: Check if this is still the case for 1.13 + //this.chunk.world.chunkPacketBlockController.onChunkPacketCreate(this.chunk, this.h, true); // Paper - Anti-Xray - Load nearby chunks if necessary - this.a(new PacketPlayOutMapChunk(this.chunk, this.h)); + this.a((Packet) (new PacketPlayOutMapChunk(this.chunk, this.h))); } else { - this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk)); + this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk))); diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 23223e89d..23fc4d8e1 100644 +index c884fcd34..1d76c4c99 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -207,6 +207,8 @@ public class PlayerInteractManager { @@ -1462,19 +1465,19 @@ index 23223e89d..23fc4d8e1 100644 public void a(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index faaad0f41..9fd966dfb 100644 +index 16e3469d0..e4c0cc6a3 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -40,12 +40,24 @@ public class ProtoChunk implements IChunkAccess { +@@ -41,12 +41,24 @@ public class ProtoChunk implements IChunkAccess { private long s; private final Map t; private boolean u; + private GeneratorAccess world; // Paper - Anti-Xray + // Paper start - Anti-Xray - Support default constructors - public ProtoChunk(int ix, int jx, ChunkConverter chunkconverter) { -- this(new ChunkCoordIntPair(ix, jx), chunkconverter); -+ this(new ChunkCoordIntPair(ix, jx), chunkconverter, null); + public ProtoChunk(int i, int j, ChunkConverter chunkconverter) { +- this(new ChunkCoordIntPair(i, j), chunkconverter); ++ this(new ChunkCoordIntPair(i, j), chunkconverter, null); } public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) { @@ -1491,16 +1494,16 @@ index faaad0f41..9fd966dfb 100644 this.d = new AtomicInteger(); this.f = Maps.newEnumMap(HeightMap.Type.class); this.g = ChunkStatus.EMPTY; -@@ -132,7 +144,7 @@ public class ProtoChunk implements IChunkAccess { +@@ -135,7 +147,7 @@ public class ProtoChunk implements IChunkAccess { return iblockdata; } -- this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x()); -+ this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray +- this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x()); ++ this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray } - IBlockData iblockdata1 = this.j[jx >> 4].getType(ix & 15, jx & 15, kx & 15); -@@ -375,7 +387,7 @@ public class ProtoChunk implements IChunkAccess { + IBlockData iblockdata1 = this.j[j >> 4].getType(i & 15, j & 15, k & 15); +@@ -389,7 +401,7 @@ public class ProtoChunk implements IChunkAccess { return; } @@ -1510,7 +1513,7 @@ index faaad0f41..9fd966dfb 100644 if (enumskyblock == EnumSkyBlock.SKY) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 780c0a7e8..67b20c056 100644 +index b4c9df025..a95c8df4b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,6 +1,8 @@ @@ -1522,7 +1525,7 @@ index 780c0a7e8..67b20c056 100644 import com.destroystokyo.paper.event.server.ServerExceptionEvent; import com.destroystokyo.paper.exception.ServerInternalException; import com.google.common.base.MoreObjects; -@@ -144,6 +146,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -139,6 +141,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1530,7 +1533,7 @@ index 780c0a7e8..67b20c056 100644 public final co.aikar.timings.WorldTimingsHandler timings; // Paper public boolean guardEntityList; // Spigot // Paper - public -@@ -169,6 +172,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -164,6 +167,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc protected World(IDataManager idatamanager, @Nullable PersistentCollection persistentcollection, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper @@ -1538,7 +1541,7 @@ index 780c0a7e8..67b20c056 100644 this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -411,6 +415,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -406,6 +410,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit end IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1572,5 +1575,5 @@ index 550416bef..923d1b282 100644 return section; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0340-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0339-Configurable-speed-for-water-flowing-over-lava.patch similarity index 93% rename from Spigot-Server-Patches/0340-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0339-Configurable-speed-for-water-flowing-over-lava.patch index 9174b4808..3cf18ac58 100644 --- a/Spigot-Server-Patches/0340-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0339-Configurable-speed-for-water-flowing-over-lava.patch @@ -1,4 +1,4 @@ -From cdce634bc0876103132df5788b9d09960f316e78 Mon Sep 17 00:00:00 2001 +From 9384bc7280f26242504fedfa2c4721405a7e7554 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 8 Aug 2018 16:33:21 -0600 Subject: [PATCH] Configurable speed for water flowing over lava @@ -22,10 +22,10 @@ index 2220a18d9..94c544714 100644 SAFE_REGEN, DELETE, NOTHING, WARN } diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -index 80a49900e..f0d5316b6 100644 +index e67238582..b53a88c33 100644 --- a/src/main/java/net/minecraft/server/BlockFluids.java +++ b/src/main/java/net/minecraft/server/BlockFluids.java -@@ -78,11 +78,27 @@ public class BlockFluids extends Block implements IFluidSource { +@@ -77,11 +77,27 @@ public class BlockFluids extends Block implements IFluidSource { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) { if (this.a(world, blockposition, iblockdata)) { @@ -54,7 +54,7 @@ index 80a49900e..f0d5316b6 100644 public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { if (iblockdata.s().d() || iblockdata1.s().d()) { generatoraccess.getFluidTickList().a(blockposition, iblockdata.s().c(), this.a((IWorldReader) generatoraccess)); -@@ -93,7 +109,7 @@ public class BlockFluids extends Block implements IFluidSource { +@@ -92,7 +108,7 @@ public class BlockFluids extends Block implements IFluidSource { public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (this.a(world, blockposition, iblockdata)) { @@ -64,5 +64,5 @@ index 80a49900e..f0d5316b6 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0341-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0340-Optimize-RegistryMaterials.patch similarity index 57% rename from Spigot-Server-Patches/0341-Optimize-RegistryMaterials.patch rename to Spigot-Server-Patches/0340-Optimize-RegistryMaterials.patch index 5da3c92df..c8c3c3a0d 100644 --- a/Spigot-Server-Patches/0341-Optimize-RegistryMaterials.patch +++ b/Spigot-Server-Patches/0340-Optimize-RegistryMaterials.patch @@ -1,4 +1,4 @@ -From 4f6f28757c11bdfc4b7f5f127afca881a33d647c Mon Sep 17 00:00:00 2001 +From fe98f5a260718f88963ab3ca2952092c93954b17 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Aug 2018 20:49:50 -0400 Subject: [PATCH] Optimize RegistryMaterials @@ -8,20 +8,31 @@ Use larger initial sizes to increase bucket capacity on the BiMap BiMap.get was seen to be using a good bit of CPU time. diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java -index 83ce386e0..a47110bba 100644 +index 1521ed759..78de740ac 100644 --- a/src/main/java/net/minecraft/server/RegistryMaterials.java +++ b/src/main/java/net/minecraft/server/RegistryMaterials.java -@@ -13,8 +13,8 @@ import org.apache.logging.log4j.Logger; - +@@ -15,9 +15,9 @@ import org.apache.logging.log4j.Logger; public class RegistryMaterials implements IRegistry { + protected static final Logger a = LogManager.getLogger(); -- protected final RegistryID b = new RegistryID(256); +- protected final RegistryID b = new RegistryID<>(256); - protected final BiMap c = HashBiMap.create(); +- protected Object[] d; + protected final RegistryID b = new RegistryID(2048); // Paper - use bigger expected size to reduce collisions + protected final BiMap c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions - protected Object[] d; ++ protected V[] d; // Paper - Decompile fix private int x; + public RegistryMaterials() {} +@@ -90,7 +90,7 @@ public class RegistryMaterials implements IRegistry { + return null; + } + +- this.d = collection.toArray(new Object[collection.size()]); ++ this.d = (V[]) collection.toArray(new Object[collection.size()]); // Paper - Decompile fix + } + + return this.d[random.nextInt(this.d.length)]; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0342-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0341-Add-PhantomPreSpawnEvent.patch similarity index 93% rename from Spigot-Server-Patches/0342-Add-PhantomPreSpawnEvent.patch rename to Spigot-Server-Patches/0341-Add-PhantomPreSpawnEvent.patch index 20ce229b4..ce7d063ae 100644 --- a/Spigot-Server-Patches/0342-Add-PhantomPreSpawnEvent.patch +++ b/Spigot-Server-Patches/0341-Add-PhantomPreSpawnEvent.patch @@ -1,14 +1,14 @@ -From 098c9c8a1cdf3c068ef8b0d531424ea86cf75396 Mon Sep 17 00:00:00 2001 +From 3449b18fdabeebb1a02fd6b631eaa001019b127c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 25 Aug 2018 19:56:51 -0500 Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 60cb6f583..7a48719c9 100644 +index a99d90efc..f576264a8 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -129,6 +129,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -127,6 +127,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { } this.setSize(nbttagcompound.getInt("Size")); @@ -20,7 +20,7 @@ index 60cb6f583..7a48719c9 100644 } public void b(NBTTagCompound nbttagcompound) { -@@ -137,6 +142,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -135,6 +140,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { nbttagcompound.setInt("AY", this.c.getY()); nbttagcompound.setInt("AZ", this.c.getZ()); nbttagcompound.setInt("Size", this.getSize()); @@ -32,7 +32,7 @@ index 60cb6f583..7a48719c9 100644 } public SoundCategory bV() { -@@ -172,6 +182,14 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -170,6 +180,14 @@ public class EntityPhantom extends EntityFlying implements IMonster { return true; } @@ -86,5 +86,5 @@ index 9f9ee9239..2b9731369 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0343-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0342-Add-More-Creeper-API.patch similarity index 96% rename from Spigot-Server-Patches/0343-Add-More-Creeper-API.patch rename to Spigot-Server-Patches/0342-Add-More-Creeper-API.patch index 65ce9986d..a1f876f6b 100644 --- a/Spigot-Server-Patches/0343-Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/0342-Add-More-Creeper-API.patch @@ -1,11 +1,11 @@ -From b6fda6a8d4c4a364dc431a35807c5117d1d9648a Mon Sep 17 00:00:00 2001 +From 4f3a46b3a46e768a74c36f76854c96a677eeb203 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 11:50:26 -0500 Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 569248abb..b1752d66f 100644 +index a07337ae4..945a75dd6 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster { @@ -74,5 +74,5 @@ index ffebb54ca..ab2b20a0d 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0345-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0343-Inventory-removeItemAnySlot.patch similarity index 97% rename from Spigot-Server-Patches/0345-Inventory-removeItemAnySlot.patch rename to Spigot-Server-Patches/0343-Inventory-removeItemAnySlot.patch index 694546a75..3a5de12ae 100644 --- a/Spigot-Server-Patches/0345-Inventory-removeItemAnySlot.patch +++ b/Spigot-Server-Patches/0343-Inventory-removeItemAnySlot.patch @@ -1,4 +1,4 @@ -From 57cf711452a442ccfed9a6e59db02208ceb077b8 Mon Sep 17 00:00:00 2001 +From 9cded53ab343588fee06e5a75b7d3f8785b176a1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 28 Aug 2018 23:04:15 -0400 Subject: [PATCH] Inventory#removeItemAnySlot @@ -57,5 +57,5 @@ index dd7b3d766..01af98293 100644 // Drat! we don't have this type in the inventory if (first == -1) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0344-Implement-Force-Loaded-Chunk-API.patch b/Spigot-Server-Patches/0344-Implement-Force-Loaded-Chunk-API.patch deleted file mode 100644 index 02e4c350b..000000000 --- a/Spigot-Server-Patches/0344-Implement-Force-Loaded-Chunk-API.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2ecae931b07c751b61679f7366213834d2b4a1be Mon Sep 17 00:00:00 2001 -From: willies952002 -Date: Wed, 29 Aug 2018 00:37:42 -0400 -Subject: [PATCH] Implement Force-Loaded Chunk API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 12c6d850d..b9371e3ae 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -289,6 +289,18 @@ public class CraftChunk implements Chunk { - Preconditions.checkArgument(0 <= z && z <= 15, "z out of range (expected 0-15, got %s)", z); - } - -+ // Paper start - Force-Loaded Chunk API -+ @Override -+ public boolean isForceLoaded() { -+ return getHandle().getWorld().isForceLoaded(this.x, this.z); -+ } -+ -+ @Override -+ public void setForceLoaded(boolean force) { -+ getHandle().getWorld().setForceLoaded(this.x, this.z, force); -+ } -+ // Paper end -+ - static { - Arrays.fill(emptySkyLight, (byte) 0xFF); - } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5a7857e25..48831e45b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -564,6 +564,12 @@ public class CraftWorld implements World { - return getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4); - } - -+ // Paper start -+ public boolean isChunkForceLoaded(int x, int z) { -+ return this.isChunkGenerated(x, z) && this.getHandle().isForceLoaded(x, z); -+ } -+ // Paper end -+ - public ChunkGenerator getGenerator() { - return generator; - } --- -2.20.1 - diff --git a/Spigot-Server-Patches/0346-Optimize-getChunkIfLoaded-type-calls.patch b/Spigot-Server-Patches/0344-Optimize-getChunkIfLoaded-type-calls.patch similarity index 87% rename from Spigot-Server-Patches/0346-Optimize-getChunkIfLoaded-type-calls.patch rename to Spigot-Server-Patches/0344-Optimize-getChunkIfLoaded-type-calls.patch index 677042d5d..a207a78b7 100644 --- a/Spigot-Server-Patches/0346-Optimize-getChunkIfLoaded-type-calls.patch +++ b/Spigot-Server-Patches/0344-Optimize-getChunkIfLoaded-type-calls.patch @@ -1,4 +1,4 @@ -From 541d969c8eddf2af96f71344d64bbc79044b3cf3 Mon Sep 17 00:00:00 2001 +From cb4fba79d8fc1806c9b87c7145aff6dc957abd59 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 29 Aug 2018 21:59:22 -0400 Subject: [PATCH] Optimize getChunkIfLoaded type calls @@ -10,10 +10,10 @@ Will improve inlining across many hot methods. Improve getBrightness to not do double chunk map lookups. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 5462962c0..b9f8a86aa 100644 +index f7c433b94..fce3f673d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -380,7 +380,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -376,7 +376,7 @@ public class ChunkProviderServer implements IChunkProvider { continue; } @@ -23,10 +23,10 @@ index 5462962c0..b9f8a86aa 100644 neighbor.setNeighborUnloaded(-x, -z); chunk.setNeighborUnloaded(x, z); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 67b20c056..b1c181a50 100644 +index a95c8df4b..cd56ca04e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -166,7 +166,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -161,7 +161,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public Chunk getChunkIfLoaded(int x, int z) { @@ -35,7 +35,7 @@ index 67b20c056..b1c181a50 100644 } protected World(IDataManager idatamanager, @Nullable PersistentCollection persistentcollection, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { -@@ -722,7 +722,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -717,7 +717,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); } @@ -45,7 +45,7 @@ index 67b20c056..b1c181a50 100644 } public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { -@@ -1965,7 +1966,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1960,7 +1961,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc if (blockposition.isInvalidYLocation()) { // Paper return false; } else { @@ -55,10 +55,10 @@ index 67b20c056..b1c181a50 100644 return chunk != null && !chunk.isEmpty(); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d42827d87..91404cc5a 100644 +index e0b466d0c..2c4465fff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -217,7 +217,7 @@ public class CraftWorld implements World { +@@ -218,7 +218,7 @@ public class CraftWorld implements World { return false; } @@ -67,7 +67,7 @@ index d42827d87..91404cc5a 100644 if (chunk != null) { world.getChunkProvider().unload(chunk); } -@@ -236,7 +236,7 @@ public class CraftWorld implements World { +@@ -237,7 +237,7 @@ public class CraftWorld implements World { private boolean unloadChunk0(int x, int z, boolean save) { Boolean result = MCUtil.ensureMain("Unload Chunk", () -> { // Paper - Ensure never async @@ -77,5 +77,5 @@ index d42827d87..91404cc5a 100644 return true; } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0347-Don-t-double-add-golems-to-world.patch b/Spigot-Server-Patches/0345-Don-t-double-add-golems-to-world.patch similarity index 89% rename from Spigot-Server-Patches/0347-Don-t-double-add-golems-to-world.patch rename to Spigot-Server-Patches/0345-Don-t-double-add-golems-to-world.patch index 441b9a0fe..edbff6fc1 100644 --- a/Spigot-Server-Patches/0347-Don-t-double-add-golems-to-world.patch +++ b/Spigot-Server-Patches/0345-Don-t-double-add-golems-to-world.patch @@ -1,4 +1,4 @@ -From 85c3c2fdc7db2755ecb460f4bb77726592a29e9e Mon Sep 17 00:00:00 2001 +From f2b1092f6e41ddc56e63ffd5a87d4169e8e8d6a6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 30 Aug 2018 20:56:26 -0400 Subject: [PATCH] Don't double add golems to world @@ -6,7 +6,7 @@ Subject: [PATCH] Don't double add golems to world spawnCreature adds to world now diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index 02d8d9749..482b97d55 100644 +index c63f70b1f..057a3b475 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -83,7 +83,7 @@ public class Village { @@ -19,5 +19,5 @@ index 02d8d9749..482b97d55 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0348-fix-newlines-in-spigot-tab-list-API.patch b/Spigot-Server-Patches/0346-fix-newlines-in-spigot-tab-list-API.patch similarity index 96% rename from Spigot-Server-Patches/0348-fix-newlines-in-spigot-tab-list-API.patch rename to Spigot-Server-Patches/0346-fix-newlines-in-spigot-tab-list-API.patch index 7bbd279f9..e9b485794 100644 --- a/Spigot-Server-Patches/0348-fix-newlines-in-spigot-tab-list-API.patch +++ b/Spigot-Server-Patches/0346-fix-newlines-in-spigot-tab-list-API.patch @@ -1,4 +1,4 @@ -From 90641f4259ba4f723f4d86556b4715591150a05e Mon Sep 17 00:00:00 2001 +From 1d4327cdfa6929aa07cd81540ad6bebd9c408211 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 1 Sep 2018 11:29:52 +0100 Subject: [PATCH] fix newlines in spigot tab list API @@ -7,7 +7,7 @@ Spigots implementation around the header/footer strips newlines from the header/footer, this patch allows the tab list header/footer to retain newlines. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0f1d700c7..0a0ea301d 100644 +index 5792a7538..c4b00acfb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -370,20 +370,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -55,5 +55,5 @@ index a067e39d5..5e20a9a61 100644 public static IChatBaseComponent[] fromString(String message) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0349-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0347-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 83% rename from Spigot-Server-Patches/0349-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to Spigot-Server-Patches/0347-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 51a1a42a2..9c44d3f1a 100644 --- a/Spigot-Server-Patches/0349-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0347-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -1,4 +1,4 @@ -From c0ad8f019795210006f83af5d1f3c74791775fb6 Mon Sep 17 00:00:00 2001 +From d8ccca4685a527834fef3718c4b2af370352b209 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 2 Sep 2018 19:34:33 -0700 Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 91404cc5a..5552b64fb 100644 +index 2c4465fff..95fe3a91b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -295,7 +295,7 @@ public class CraftWorld implements World { +@@ -296,7 +296,7 @@ public class CraftWorld implements World { public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp( "chunk load"); // Spigot chunkLoadCount++; @@ -19,5 +19,5 @@ index 91404cc5a..5552b64fb 100644 public boolean isChunkLoaded(Chunk chunk) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0350-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0348-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 97% rename from Spigot-Server-Patches/0350-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-Server-Patches/0348-Add-ray-tracing-methods-to-LivingEntity.patch index 3e549a42c..9b9cc1067 100644 --- a/Spigot-Server-Patches/0350-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0348-Add-ray-tracing-methods-to-LivingEntity.patch @@ -1,11 +1,11 @@ -From 8b81175767226157070263f9e5c6044322216a9a Mon Sep 17 00:00:00 2001 +From 91de71ca2959255f3475be5c3d804e51504115cc Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 3 Sep 2018 18:20:03 -0500 Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1dcb9a7e9..5ea5d4b78 100644 +index 8f5ff37c2..b4dcdda0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2816,6 +2816,22 @@ public abstract class EntityLiving extends Entity { @@ -60,5 +60,5 @@ index 52834b6da..eeab59379 100644 return getLineOfSight(transparent, maxDistance, 2); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0351-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0349-Expose-attack-cooldown-methods-for-Player.patch similarity index 87% rename from Spigot-Server-Patches/0351-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-Server-Patches/0349-Expose-attack-cooldown-methods-for-Player.patch index f3f2d42a2..7e1ea47ee 100644 --- a/Spigot-Server-Patches/0351-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0349-Expose-attack-cooldown-methods-for-Player.patch @@ -1,14 +1,14 @@ -From 2dbcb3e4718cea990bba6a0ea0610c4b59cba08a Mon Sep 17 00:00:00 2001 +From 6ffdd619ce3d2edf45cc552d0f89403d8162c186 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 4 Sep 2018 15:02:00 -0500 Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 20a46e2af..6aa3a462f 100644 +index 9b8833fed..7d096efa2 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2056,14 +2056,17 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2053,14 +2053,17 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bA, nbttagcompound); } @@ -27,10 +27,10 @@ index 20a46e2af..6aa3a462f 100644 this.aH = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a0ea301d..8be0a47ba 100644 +index c4b00acfb..611833592 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1917,6 +1917,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1923,6 +1923,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.resourcePackStatus = status; } @@ -52,5 +52,5 @@ index 0a0ea301d..8be0a47ba 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0352-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch b/Spigot-Server-Patches/0350-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch similarity index 92% rename from Spigot-Server-Patches/0352-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch rename to Spigot-Server-Patches/0350-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch index 0bf6408fe..ec1a08dae 100644 --- a/Spigot-Server-Patches/0352-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch +++ b/Spigot-Server-Patches/0350-MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch @@ -1,4 +1,4 @@ -From abf5f03149f8ea5ee8be57f03f1f7244ca23cc36 Mon Sep 17 00:00:00 2001 +From 12e96fa13e82f5b001e6e3ee87ad4a4c347f022e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 4 Sep 2018 19:07:57 -0400 Subject: [PATCH] MC-2025: Save and load entity AABB to prevent wobble @@ -23,13 +23,13 @@ This reasoning leads us to one clear conclusion: The simplest, least invasive, a store the AABB in NBT data on chunk save and restore the AABB exactly as it was saved upon reload. diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index bf538684a..19819b134 100644 +index 1c0b783e8..c5e541985 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -3,12 +3,12 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -5,12 +5,12 @@ import javax.annotation.Nullable; public class AxisAlignedBB { + - public final double minX; - public final double minY; - public final double minZ; @@ -46,10 +46,10 @@ index bf538684a..19819b134 100644 public AxisAlignedBB(double d0, double d1, double d2, double d3, double d4, double d5) { this.minX = Math.min(d0, d3); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c083b2dd3..67ea54987 100644 +index 3311e2b24..2e2d14d93 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1659,6 +1659,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1657,6 +1657,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); } @@ -62,7 +62,7 @@ index c083b2dd3..67ea54987 100644 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1748,6 +1754,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1746,6 +1752,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.aD()) { this.setPosition(this.locX, this.locY, this.locZ); } @@ -79,7 +79,7 @@ index c083b2dd3..67ea54987 100644 // CraftBukkit start if (this instanceof EntityLiving) { -@@ -2816,6 +2832,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2814,6 +2830,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.boundingBox; } @@ -88,5 +88,5 @@ index c083b2dd3..67ea54987 100644 // CraftBukkit start - block invalid bounding boxes double minX = axisalignedbb.minX, -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0353-Improve-death-events.patch b/Spigot-Server-Patches/0351-Improve-death-events.patch similarity index 93% rename from Spigot-Server-Patches/0353-Improve-death-events.patch rename to Spigot-Server-Patches/0351-Improve-death-events.patch index a943852c8..2875348ea 100644 --- a/Spigot-Server-Patches/0353-Improve-death-events.patch +++ b/Spigot-Server-Patches/0351-Improve-death-events.patch @@ -1,4 +1,4 @@ -From a0af07c2443bbee969d899a4c31cff5d1ae6a097 Mon Sep 17 00:00:00 2001 +From 4e2300fef2e63bd4dcefb50372e99c4220346967 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -15,22 +15,22 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index 9a74601b0..6e60d15cc 100644 +index bbd5e2b2a..19750ceed 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java -@@ -163,6 +163,7 @@ public class CombatTracker { +@@ -175,6 +175,7 @@ public class CombatTracker { this.h = null; } + public void reset() { this.g(); } // Paper - OBFHELPER public void g() { int i = this.f ? 300 : 100; - if (this.g && (!this.b.isAlive() || this.b.ticksLived - this.c > i)) { + diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 67ea54987..7fc56cadc 100644 +index 2e2d14d93..e068f19ad 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1539,6 +1539,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1537,6 +1537,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -38,7 +38,7 @@ index 67ea54987..7fc56cadc 100644 public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2407,6 +2408,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2405,6 +2406,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } @@ -46,7 +46,7 @@ index 67ea54987..7fc56cadc 100644 public void b(EntityLiving entityliving) {} protected boolean i(double d0, double d1, double d2) { -@@ -3072,6 +3074,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3070,6 +3072,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return EnumPistonReaction.NORMAL; } @@ -55,7 +55,7 @@ index 67ea54987..7fc56cadc 100644 return SoundCategory.NEUTRAL; } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index c5bddb1da..0a9666541 100644 +index 2c54e3e34..a5cc5e284 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -659,7 +659,8 @@ public class EntityArmorStand extends EntityLiving { @@ -69,7 +69,7 @@ index c5bddb1da..0a9666541 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3ef68fec7..716f0e67f 100644 +index b4dcdda0c..60aaf0547 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -76,14 +76,14 @@ public abstract class EntityLiving extends Entity { @@ -206,10 +206,10 @@ index 3ef68fec7..716f0e67f 100644 return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bf842a0a9..b5d48e7bf 100644 +index 1054367d0..00c2072d7 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -72,6 +72,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -220,7 +220,7 @@ index bf842a0a9..b5d48e7bf 100644 // CraftBukkit start public String displayName; -@@ -509,6 +513,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -506,6 +510,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { String deathmessage = defaultMessage.getString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); @@ -234,9 +234,9 @@ index bf842a0a9..b5d48e7bf 100644 + } + // Paper end - String deathMessage = event.getDeathMessage(); - -@@ -636,8 +649,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + // SPIGOT-943 - only call if they have an inventory open + if (this.activeContainer != this.defaultContainer) { +@@ -638,8 +651,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -284,10 +284,10 @@ index 17fab031b..ee8219e3b 100644 this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8be0a47ba..f56ef6f71 100644 +index 611833592..1c9cc1250 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1711,7 +1711,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1717,7 +1717,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -305,10 +305,10 @@ index 8be0a47ba..f56ef6f71 100644 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c6cd2f3be..f87d2bed7 100644 +index a2841ee53..fdab6734f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -582,9 +582,16 @@ public class CraftEventFactory { +@@ -595,9 +595,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -325,7 +325,7 @@ index c6cd2f3be..f87d2bed7 100644 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -600,8 +607,15 @@ public class CraftEventFactory { +@@ -613,8 +620,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -341,7 +341,7 @@ index c6cd2f3be..f87d2bed7 100644 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -622,6 +636,31 @@ public class CraftEventFactory { +@@ -635,6 +649,31 @@ public class CraftEventFactory { return event; } @@ -374,5 +374,5 @@ index c6cd2f3be..f87d2bed7 100644 * Server methods */ -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0354-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0352-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 92% rename from Spigot-Server-Patches/0354-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0352-Allow-chests-to-be-placed-with-NBT-data.patch index b18f5d013..f9a84fe69 100644 --- a/Spigot-Server-Patches/0354-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0352-Allow-chests-to-be-placed-with-NBT-data.patch @@ -1,11 +1,11 @@ -From 4b5e545bb6a57d1fb6168e7ae397a111d33dace0 Mon Sep 17 00:00:00 2001 +From 2901bf52c0b6d48d3c27cff678e9876d7f4317af Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 8 Sep 2018 18:43:31 -0500 Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index d32ea9c92..d1000805a 100644 +index 99dab7a47..5a67e1f92 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -232,6 +232,15 @@ public final class ItemStack { @@ -25,7 +25,7 @@ index d32ea9c92..d1000805a 100644 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index f00c7dade..961e9d62c 100644 +index c46b761cc..2e0f782f6 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -305,7 +305,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic diff --git a/Spigot-Server-Patches/0355-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0353-Mob-Pathfinding-API.patch similarity index 91% rename from Spigot-Server-Patches/0355-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0353-Mob-Pathfinding-API.patch index a3e120041..a4f857c8c 100644 --- a/Spigot-Server-Patches/0355-Mob-Pathfinding-API.patch +++ b/Spigot-Server-Patches/0353-Mob-Pathfinding-API.patch @@ -1,4 +1,4 @@ -From 3568f5361e2875b198914133d0fcb79a843d8c4b Mon Sep 17 00:00:00 2001 +From 99faaeeba75ccedfefc7614fe07f3f13f9d5d3b4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 13:30:00 -0400 Subject: [PATCH] Mob Pathfinding API @@ -125,10 +125,10 @@ index 000000000..ed3d86ddd + } +} diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index efdfa7195..113fd9a50 100644 +index c55aadb53..cac0ce2a3 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -65,7 +65,7 @@ public abstract class NavigationAbstract { +@@ -69,7 +69,7 @@ public abstract class NavigationAbstract { } @Nullable @@ -137,7 +137,7 @@ index efdfa7195..113fd9a50 100644 return this.b(new BlockPosition(d0, d1, d2)); } -@@ -91,7 +91,7 @@ public abstract class NavigationAbstract { +@@ -97,7 +97,7 @@ public abstract class NavigationAbstract { } @Nullable @@ -146,7 +146,7 @@ index efdfa7195..113fd9a50 100644 if (!this.b()) { return null; } else { -@@ -140,6 +140,7 @@ public abstract class NavigationAbstract { +@@ -148,6 +148,7 @@ public abstract class NavigationAbstract { private int pathfindFailures = 0; // Paper end @@ -154,7 +154,7 @@ index efdfa7195..113fd9a50 100644 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { this.c = null; -@@ -161,8 +162,7 @@ public abstract class NavigationAbstract { +@@ -170,8 +171,7 @@ public abstract class NavigationAbstract { } } } @@ -164,7 +164,7 @@ index efdfa7195..113fd9a50 100644 public PathEntity m() { return this.c; } -@@ -264,6 +264,7 @@ public abstract class NavigationAbstract { +@@ -279,6 +279,7 @@ public abstract class NavigationAbstract { return this.c == null || this.c.b(); } @@ -173,13 +173,13 @@ index efdfa7195..113fd9a50 100644 this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java -index 5ffcda6d5..dae08cbbf 100644 +index 31fc1fbc6..5cf7f3bf1 100644 --- a/src/main/java/net/minecraft/server/PathEntity.java +++ b/src/main/java/net/minecraft/server/PathEntity.java -@@ -3,12 +3,13 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -4,12 +4,13 @@ import javax.annotation.Nullable; public class PathEntity { + - private final PathPoint[] a; + private final PathPoint[] a; public PathPoint[] getPoints() { return a; } // Paper - OBFHELPER private PathPoint[] b = new PathPoint[0]; @@ -193,7 +193,7 @@ index 5ffcda6d5..dae08cbbf 100644 public PathEntity(PathPoint[] apathpoint) { this.a = apathpoint; -@@ -24,7 +25,7 @@ public class PathEntity { +@@ -25,7 +26,7 @@ public class PathEntity { } @Nullable @@ -202,23 +202,23 @@ index 5ffcda6d5..dae08cbbf 100644 return this.f > 0 ? this.a[this.f - 1] : null; } -@@ -63,7 +64,7 @@ public class PathEntity { +@@ -65,7 +66,7 @@ public class PathEntity { return this.a(entity, this.e); } - public Vec3D f() { + public Vec3D getNext() { return f(); } public Vec3D f() { // Paper - OBFHELPER PathPoint pathpoint = this.a[this.e]; - return new Vec3D((double)pathpoint.a, (double)pathpoint.b, (double)pathpoint.c); - } + + return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c); diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java -index 497f47223..7fd1eff0b 100644 +index 78ed00286..0dd6e46d1 100644 --- a/src/main/java/net/minecraft/server/PathPoint.java +++ b/src/main/java/net/minecraft/server/PathPoint.java -@@ -1,9 +1,9 @@ - package net.minecraft.server; +@@ -2,9 +2,9 @@ package net.minecraft.server; public class PathPoint { + - public final int a; - public final int b; - public final int c; @@ -245,5 +245,5 @@ index 5bf1cd06f..53c2d154e 100644 public void setTarget(LivingEntity target) { EntityInsentient entity = getHandle(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0356-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0354-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 73% rename from Spigot-Server-Patches/0356-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0354-Prevent-chunk-loading-from-Fluid-Flowing.patch index 7e32f0915..3e9086162 100644 --- a/Spigot-Server-Patches/0356-Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/Spigot-Server-Patches/0354-Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -1,14 +1,14 @@ -From 789be1bd63158936d36e9b45a76aa49f4a59e148 Mon Sep 17 00:00:00 2001 +From 76acd0f0536e158c02bccacd1c1223034bfc6056 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:36:16 -0400 Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -index 8a6f79908..c1ed05d9e 100644 +index 074cc366e..0014f7870 100644 --- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java +++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -@@ -186,7 +186,8 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -182,7 +182,8 @@ public abstract class FluidTypeFlowing extends FluidType { EnumDirection enumdirection = (EnumDirection) entry.getKey(); Fluid fluid1 = (Fluid) entry.getValue(); BlockPosition blockposition1 = blockposition.shift(enumdirection); @@ -18,7 +18,7 @@ index 8a6f79908..c1ed05d9e 100644 if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.c())) { // CraftBukkit start -@@ -213,7 +214,8 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -209,7 +210,8 @@ public abstract class FluidTypeFlowing extends FluidType { while (iterator.hasNext()) { EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); @@ -28,12 +28,12 @@ index 8a6f79908..c1ed05d9e 100644 Fluid fluid = iblockdata1.s(); if (fluid.c().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) { -@@ -331,11 +333,19 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -326,11 +328,20 @@ public abstract class FluidTypeFlowing extends FluidType { + if (enumdirection1 != enumdirection) { BlockPosition blockposition2 = blockposition.shift(enumdirection1); short short0 = a(blockposition1, blockposition2); - // CraftBukkit start - decompile errors -- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (ix) -> { -- IBlockData iblockdatax = iworldreader.getType(blockposition2); +- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (k) -> { +- IBlockData iblockdata1 = iworldreader.getType(blockposition2); + // Paper start - avoid loading chunks + Pair pair = short2objectmap.get(short0); + if (pair == null) { @@ -41,39 +41,40 @@ index 8a6f79908..c1ed05d9e 100644 + if (iblockdatax == null) { + continue; + } - -- return Pair.of(iblockdatax, iblockdatax.s()); -- }); ++ + pair = Pair.of(iblockdatax, iblockdatax.s()); + short2objectmap.put(short0, pair); + + } + // Paper end - // CraftBukkit end + +- return Pair.of(iblockdata1, iblockdata1.s()); +- }); IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); -@@ -411,11 +421,16 @@ public abstract class FluidTypeFlowing extends FluidType { + +@@ -402,11 +413,16 @@ public abstract class FluidTypeFlowing extends FluidType { + EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); short short0 = a(blockposition, blockposition1); - // CraftBukkit start - decompile errors -- Pair pair = (Pair) short2objectopenhashmap.computeIfAbsent(short0, (ix) -> { -- IBlockData iblockdatax = iworldreader.getType(blockposition1); +- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (j) -> { +- IBlockData iblockdata1 = iworldreader.getType(blockposition1); - -- return Pair.of(iblockdatax, iblockdatax.s()); +- return Pair.of(iblockdata1, iblockdata1.s()); - }); + // Paper start -+ Pair pair = (Pair) short2objectopenhashmap.get(short0); ++ Pair pair = (Pair) short2objectmap.get(short0); + if (pair == null) { + IBlockData iblockdatax = iworldreader.getTypeIfLoaded(blockposition1); + if (iblockdatax == null) continue; + + pair = Pair.of(iblockdatax, iblockdatax.s()); -+ short2objectopenhashmap.put(short0, pair); ++ short2objectmap.put(short0, pair); + } + // Paper end - // CraftBukkit end IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); + Fluid fluid1 = this.a(iworldreader, blockposition1, iblockdata1); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0357-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0355-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 95% rename from Spigot-Server-Patches/0357-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0355-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 135955380..b16e3e261 100644 --- a/Spigot-Server-Patches/0357-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0355-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -1,11 +1,11 @@ -From 31a4ba2082b703b6b02ee16f019af60a82edbe8b Mon Sep 17 00:00:00 2001 +From 90c9ee725b4fffd131bac4d977adf6231b83bf2f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:55 +0300 Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java -index 00026eef7..207f95dcf 100644 +index 8e8390282..f52936581 100644 --- a/src/main/java/net/minecraft/server/ArgumentBlock.java +++ b/src/main/java/net/minecraft/server/ArgumentBlock.java @@ -43,7 +43,7 @@ public class ArgumentBlock { @@ -30,9 +30,9 @@ index 00026eef7..207f95dcf 100644 + public ArgumentBlock parse(boolean parseTile) throws CommandSyntaxException { return this.a(parseTile); } // Paper - OBFHELPER public ArgumentBlock a(boolean flag) throws CommandSyntaxException { this.s = this::l; - if (this.i.canRead() && this.i.peek() == 35) { + if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 2446badd8..356390db7 100644 +index 05d3ff969..1a0c0efdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -81,6 +81,12 @@ import javax.annotation.Nullable; @@ -120,7 +120,7 @@ index 2446badd8..356390db7 100644 Set keys = tag.getKeys(); for (String key : keys) { -@@ -482,6 +532,36 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -488,6 +538,36 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { setDamage(damage); } @@ -157,7 +157,7 @@ index 2446badd8..356390db7 100644 String internal = SerializableMeta.getString(map, "internal", true); if (internal != null) { ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal)); -@@ -598,6 +678,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -604,6 +684,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { if (hasDamage()) { itemTag.setInt(DAMAGE.NBT, damage); } @@ -181,7 +181,7 @@ index 2446badd8..356390db7 100644 for (Map.Entry e : unhandledTags.entrySet()) { itemTag.set(e.getKey(), e.getValue()); -@@ -696,7 +793,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -702,7 +799,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @Overridden boolean isEmpty() { @@ -191,7 +191,7 @@ index 2446badd8..356390db7 100644 } public String getDisplayName() { -@@ -1038,7 +1136,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1044,7 +1142,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { && (this.publicItemTagContainer.equals(that.publicItemTagContainer)) && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) @@ -204,7 +204,7 @@ index 2446badd8..356390db7 100644 } /** -@@ -1070,6 +1172,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1076,6 +1178,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { hash = 61 * hash + (isUnbreakable() ? 1231 : 1237); hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); @@ -215,7 +215,7 @@ index 2446badd8..356390db7 100644 return hash; } -@@ -1090,6 +1196,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1096,6 +1202,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { clone.hideFlag = this.hideFlag; clone.unbreakable = this.unbreakable; clone.damage = this.damage; @@ -231,7 +231,7 @@ index 2446badd8..356390db7 100644 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1139,6 +1254,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1145,6 +1260,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { builder.put(DAMAGE.BUKKIT, damage); } @@ -256,7 +256,7 @@ index 2446badd8..356390db7 100644 final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1288,7 +1421,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1294,7 +1427,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { CraftMetaArmorStand.NO_BASE_PLATE.NBT, CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, @@ -267,7 +267,7 @@ index 2446badd8..356390db7 100644 // Paper end )); } -@@ -1335,4 +1470,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1341,4 +1476,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { return spigot; } // Spigot end diff --git a/Spigot-Server-Patches/0358-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0356-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 85% rename from Spigot-Server-Patches/0358-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0356-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index d1791eba1..055b20c22 100644 --- a/Spigot-Server-Patches/0358-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0356-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -1,4 +1,4 @@ -From c739c5c8647c3b59c5f2c04827e8853d8e60b088 Mon Sep 17 00:00:00 2001 +From b67b3c781d590a9931408f69e3f44af7ee4d1f7a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:56:36 -0400 Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks @@ -53,18 +53,18 @@ index 2b15aa6c9..3ca32123b 100644 return block == this.f && iworldreader.getType(blockposition.up()).isAir() && iworldreader.getType(blockposition.up(2)).isAir(); } diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -index f252ef243..bfa6c2eef 100644 +index e58fdee8b..f2c4048c2 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -@@ -78,6 +78,7 @@ public class RandomPositionGenerator { +@@ -87,6 +87,7 @@ public class RandomPositionGenerator { } - BlockPosition blockposition2 = new BlockPosition((double)j1 + entitycreature.locX, (double)k1 + entitycreature.locY, (double)l1 + entitycreature.locZ); -+ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper - if ((!flag1 || entitycreature.f(blockposition2)) && navigationabstract.a(blockposition2)) { + blockposition1 = new BlockPosition((double) k1 + entitycreature.locX, (double) l1 + entitycreature.locY, (double) i2 + entitycreature.locZ); ++ if (!entitycreature.world.isLoaded(blockposition1)) continue; // Paper + if ((!flag1 || entitycreature.f(blockposition1)) && navigationabstract.a(blockposition1)) { if (!flag) { - blockposition2 = a(blockposition2, entitycreature); -@@ -141,6 +142,7 @@ public class RandomPositionGenerator { + blockposition1 = a(blockposition1, entitycreature); +@@ -155,6 +156,7 @@ public class RandomPositionGenerator { } private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) { @@ -74,10 +74,10 @@ index f252ef243..bfa6c2eef 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5fe4734e3..eabf50e24 100644 +index cd56ca04e..f48d5d9f7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -762,7 +762,17 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -757,7 +757,17 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return chunk.getType(blockposition); } } @@ -94,7 +94,7 @@ index 5fe4734e3..eabf50e24 100644 + // Paper end public Fluid getFluid(BlockPosition blockposition) { if (blockposition.isInvalidYLocation()) { // Paper - return FluidTypes.a.i(); + return FluidTypes.EMPTY.i(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0359-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0357-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 95% rename from Spigot-Server-Patches/0359-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to Spigot-Server-Patches/0357-Prevent-mob-spawning-from-loading-generating-chunks.patch index 1400f10c6..0549edd25 100644 --- a/Spigot-Server-Patches/0359-Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/Spigot-Server-Patches/0357-Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -1,4 +1,4 @@ -From de9c935fa969abd751d58894bd4ea1032fcf415b Mon Sep 17 00:00:00 2001 +From 16d624d217abbe74fa423441710d56e31ef68d3c Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:12:57 -0400 Subject: [PATCH] Prevent mob spawning from loading/generating chunks @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks also prevents if out of world border bounds diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 35205561b..0e578caf6 100644 +index bfbe4d3e3..e2bf17f44 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -129,9 +129,9 @@ public final class SpawnerCreature { @@ -31,5 +31,5 @@ index 35205561b..0e578caf6 100644 if (entitypositiontypes_surface != null && a(entitypositiontypes_surface, worldserver, blockposition_mutableblockposition, biomebase_biomemeta.b)) { EntityInsentient entityinsentient; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0360-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0358-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 62% rename from Spigot-Server-Patches/0360-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0358-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index 23eb5f3d9..4fb3bc466 100644 --- a/Spigot-Server-Patches/0360-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0358-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -1,4 +1,4 @@ -From 24eafa03098283a7a8c1a093ad1100079875580b Mon Sep 17 00:00:00 2001 +From b6c5dee1dbede3adfd04ab74e75c2c994cc191f6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:47:01 -0400 Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 7703744d3..21843209d 100644 +index c399bdecc..3496d4236 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -118,7 +118,7 @@ public abstract class BiomeBase { +@@ -120,7 +120,7 @@ public abstract class BiomeBase { protected final Map>> aW = Maps.newHashMap(); protected final List> aX = Lists.newArrayList(); protected final Map, WorldGenFeatureConfiguration> aY = Maps.newHashMap(); @@ -18,25 +18,16 @@ index 7703744d3..21843209d 100644 @Nullable public static BiomeBase a(BiomeBase biomebase) { -@@ -155,7 +155,7 @@ public abstract class BiomeBase { - } +@@ -169,7 +169,7 @@ public abstract class BiomeBase { + for (j = 0; j < i; ++j) { + EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; - for(EnumCreatureType enumcreaturetype : EnumCreatureType.values()) { - this.aZ.put(enumcreaturetype, Lists.newArrayList()); + this.aZ.put(enumcreaturetype, new MobList()); // Paper } } else { -@@ -297,7 +297,7 @@ public abstract class BiomeBase { - public void a(WorldGenStage.Decoration worldgenstage$decoration, ChunkGenerator chunkgenerator, GeneratorAccess generatoraccess, long ix, SeededRandom seededrandom, BlockPosition blockposition) { - int jx = 0; - -- for(WorldGenFeatureComposite worldgenfeaturecomposite : (List)this.aW.get(worldgenstage$decoration)) { -+ for(WorldGenFeatureComposite worldgenfeaturecomposite : this.aW.get(worldgenstage$decoration)) { // Paper - decompile fix - seededrandom.b(ix, jx, worldgenstage$decoration.ordinal()); - worldgenfeaturecomposite.a(generatoraccess, chunkgenerator, seededrandom, blockposition, WorldGenFeatureConfiguration.e); - ++jx; -@@ -459,6 +459,38 @@ public abstract class BiomeBase { +@@ -473,6 +473,38 @@ public abstract class BiomeBase { } @@ -72,9 +63,9 @@ index 7703744d3..21843209d 100644 + } + // Paper end + - public static class BiomeMeta extends WeightedRandom.WeightedRandomChoice { - public EntityTypes b; - public int c; + public static class a { + + @Nullable -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0361-Optimize-and-Fix-ExpiringMap-Issues.patch b/Spigot-Server-Patches/0359-Optimize-and-Fix-ExpiringMap-Issues.patch similarity index 88% rename from Spigot-Server-Patches/0361-Optimize-and-Fix-ExpiringMap-Issues.patch rename to Spigot-Server-Patches/0359-Optimize-and-Fix-ExpiringMap-Issues.patch index a1545e670..c1904f4bc 100644 --- a/Spigot-Server-Patches/0361-Optimize-and-Fix-ExpiringMap-Issues.patch +++ b/Spigot-Server-Patches/0359-Optimize-and-Fix-ExpiringMap-Issues.patch @@ -1,4 +1,4 @@ -From 55b59db2a3d24f7f3c8990389b6282f01cbe0a7c Mon Sep 17 00:00:00 2001 +From a281a85e72ed953207551867a9fd58f4c040306a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 16 Sep 2018 00:00:16 -0400 Subject: [PATCH] Optimize and Fix ExpiringMap Issues @@ -14,30 +14,30 @@ manipulation, and instead to run clean once per tick per active expiring map. diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -index 39a548881..37ea37de5 100644 +index a23768441..835a2aae4 100644 --- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -@@ -143,13 +143,13 @@ public abstract class ChunkGeneratorAbstract implem +@@ -142,13 +142,13 @@ public abstract class ChunkGeneratorAbstract implem public Long2ObjectMap getStructureStartCache(StructureGenerator structuregenerator) { - return (Long2ObjectMap) this.d.computeIfAbsent(structuregenerator, (s) -> { -- return Long2ObjectMaps.synchronize(new ExpiringMap(8192, 10000)); -+ return new ExpiringMap(8192, 10000); // Paper - already synchronized + return (Long2ObjectMap) this.d.computeIfAbsent(structuregenerator, (structuregenerator1) -> { +- return Long2ObjectMaps.synchronize(new ExpiringMap<>(8192, 10000)); ++ return new ExpiringMap<>(8192, 10000); // Paper - already synchronized }); } public Long2ObjectMap getStructureCache(StructureGenerator structuregenerator) { - return (Long2ObjectMap) this.e.computeIfAbsent(structuregenerator, (s) -> { -- return Long2ObjectMaps.synchronize(new ExpiringMap(8192, 10000)); -+ return new ExpiringMap(8192, 10000); // Paper - already synchronized + return (Long2ObjectMap) this.e.computeIfAbsent(structuregenerator, (structuregenerator1) -> { +- return Long2ObjectMaps.synchronize(new ExpiringMap<>(8192, 10000)); ++ return new ExpiringMap<>(8192, 10000); // Paper - already synchronized }); } diff --git a/src/main/java/net/minecraft/server/ExpiringMap.java b/src/main/java/net/minecraft/server/ExpiringMap.java -index 9c0518d67..84a6dcb40 100644 +index bd3636479..bf6095137 100644 --- a/src/main/java/net/minecraft/server/ExpiringMap.java +++ b/src/main/java/net/minecraft/server/ExpiringMap.java -@@ -2,94 +2,201 @@ package net.minecraft.server; +@@ -2,87 +2,211 @@ package net.minecraft.server; import it.unimi.dsi.fastutil.longs.Long2LongLinkedOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2LongMap; @@ -80,8 +80,8 @@ index 9c0518d67..84a6dcb40 100644 + } - this.b.put(i, j); -- cleanup(); - // CraftBukkit start +- cleanup(); + @Override + public T compute(long l, BiFunction biFunction) { + setAccess(l); @@ -90,7 +90,8 @@ index 9c0518d67..84a6dcb40 100644 - public void cleanup() { - long j = SystemUtils.getMonotonicMillis(); -- ObjectIterator objectiterator = this.b.long2LongEntrySet().iterator(); // CraftBukkit - decompile error +- // CraftBukkit end +- ObjectIterator objectiterator = this.b.long2LongEntrySet().iterator(); + @Override + public T putIfAbsent(long l, T t) { + setAccess(l); @@ -99,7 +100,7 @@ index 9c0518d67..84a6dcb40 100644 - while (objectiterator.hasNext()) { - Long2LongMap.Entry entry = (Long2LongMap.Entry) objectiterator.next(); // CraftBukkit - decompile error -- T object = super.get(entry.getLongKey()); // CraftBukkit - decompile error +- T t0 = super.get(entry.getLongKey()); + @Override + public T computeIfPresent(long l, BiFunction biFunction) { + setAccess(l); @@ -115,10 +116,11 @@ index 9c0518d67..84a6dcb40 100644 + return super.computeIfAbsent(l, longFunction); + } -- if (object != null && this.a(object)) { +- if (t0 != null && this.a(t0)) { - super.remove(entry.getLongKey()); - objectiterator.remove(); - } ++ + @Override + public boolean replace(long l, T t, T v1) { + setAccess(l); @@ -173,7 +175,6 @@ index 9c0518d67..84a6dcb40 100644 + ttl.clear(); + super.clear(); } -- // CraftBukkit end + } + private boolean registered = false; @@ -271,26 +272,28 @@ index 9c0518d67..84a6dcb40 100644 + public T remove(Object var1) { throw new RuntimeException("Not implemented"); } -- -- // CraftBukkit start -- @Override -- public T computeIfAbsent(long l, LongFunction lf) { + ++ // Paper start ++ /* + // CraftBukkit start + @Override + public T computeIfAbsent(long l, LongFunction lf) { - this.b.put(l, SystemUtils.getMonotonicMillis()); -- return super.computeIfAbsent(l, lf); -- } -- -- @Override -- public ObjectCollection values() { -- cleanup(); -- return super.values(); -- } -- // CraftBukkit end ++ this.ttl.put(l, SystemUtils.getMonotonicMillis()); // Paper + return super.computeIfAbsent(l, lf); + } + +@@ -92,4 +216,5 @@ public class ExpiringMap extends Long2ObjectOpenHashMap { + return super.values(); + } + // CraftBukkit end ++ */ // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aaefb98c0..0bc1c887a 100644 +index 59a71e5b0..7b24f6e24 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -155,6 +155,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -150,6 +150,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public int autosavePeriod; public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; @@ -298,7 +301,7 @@ index aaefb98c0..0bc1c887a 100644 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -999,6 +1000,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -994,6 +995,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.methodProfiler.exit(); org.spigotmc.WatchdogThread.tick(); // Spigot PaperLightingQueue.processQueue(startTime); // Paper @@ -329,5 +332,5 @@ index 4cca65666..9c917370a 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0362-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0360-Implement-furnace-cook-speed-multiplier-API.patch similarity index 90% rename from Spigot-Server-Patches/0362-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0360-Implement-furnace-cook-speed-multiplier-API.patch index 0cc011872..15efd6fad 100644 --- a/Spigot-Server-Patches/0362-Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-Server-Patches/0360-Implement-furnace-cook-speed-multiplier-API.patch @@ -1,4 +1,4 @@ -From 4e869dd25e33172bfeef6e9d57016dceeaf31515 Mon Sep 17 00:00:00 2001 +From 8781bbdc79c9c4878c5adaabae97f792f22c3be6 Mon Sep 17 00:00:00 2001 From: Tassu Date: Thu, 13 Sep 2018 08:45:21 +0300 Subject: [PATCH] Implement furnace cook speed multiplier API @@ -6,10 +6,10 @@ Subject: [PATCH] Implement furnace cook speed multiplier API Signed-off-by: Tassu diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 7ec656ebe..c3c230c21 100644 +index 5b6ccfa9f..bfbd35bbe 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -10,6 +10,7 @@ import java.util.Map.Entry; +@@ -9,6 +9,7 @@ import java.util.Map.Entry; import javax.annotation.Nullable; // CraftBukkit start import java.util.List; @@ -17,7 +17,7 @@ index 7ec656ebe..c3c230c21 100644 import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.inventory.CraftItemStack; -@@ -26,6 +27,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -25,6 +26,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve private NonNullList items; private int burnTime; private int ticksForCurrentFuel; @@ -25,7 +25,7 @@ index 7ec656ebe..c3c230c21 100644 private int cookTime; private int cookTimeTotal; private IChatBaseComponent l; -@@ -219,6 +221,11 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -218,6 +220,11 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve this.l = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")); } @@ -37,7 +37,7 @@ index 7ec656ebe..c3c230c21 100644 } public NBTTagCompound save(NBTTagCompound nbttagcompound) { -@@ -226,6 +233,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -225,6 +232,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve nbttagcompound.setShort("BurnTime", (short) this.burnTime); nbttagcompound.setShort("CookTime", (short) this.cookTime); nbttagcompound.setShort("CookTimeTotal", (short) this.cookTimeTotal); @@ -45,7 +45,7 @@ index 7ec656ebe..c3c230c21 100644 ContainerUtil.a(nbttagcompound, this.items); nbttagcompound.setShort("RecipesUsedSize", (short) this.m.size()); int i = 0; -@@ -300,8 +308,8 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -299,8 +307,8 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve } if (this.isBurning() && this.canBurn(irecipe)) { diff --git a/Spigot-Server-Patches/0363-Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/0361-Support-Overriding-World-Seeds.patch similarity index 95% rename from Spigot-Server-Patches/0363-Support-Overriding-World-Seeds.patch rename to Spigot-Server-Patches/0361-Support-Overriding-World-Seeds.patch index 120a7053d..4916e4f48 100644 --- a/Spigot-Server-Patches/0363-Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/0361-Support-Overriding-World-Seeds.patch @@ -1,4 +1,4 @@ -From 33680168b1aaa776f384a20a46a403784858e7d3 Mon Sep 17 00:00:00 2001 +From 5ebb95ffe2aad80290de28e4e87de3ef56c018a3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:05:31 -0400 Subject: [PATCH] Support Overriding World Seeds @@ -59,10 +59,10 @@ index f3f2a0b69..6f76351b8 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9b2703fd2..ef49fc258 100644 +index 7b24f6e24..11510640a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -350,7 +350,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -345,7 +345,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.convertWorld(name); // Run conversion now org.bukkit.generator.ChunkGenerator gen = this.server.getGenerator(name); @@ -72,7 +72,7 @@ index 9b2703fd2..ef49fc258 100644 if (j == 0) { diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java -index 33d878378..b9cc0e898 100644 +index 4e971d244..65eed2a90 100644 --- a/src/main/java/net/minecraft/server/WorldData.java +++ b/src/main/java/net/minecraft/server/WorldData.java @@ -110,7 +110,7 @@ public class WorldData { @@ -85,7 +85,7 @@ index 33d878378..b9cc0e898 100644 String s = nbttagcompound.getString("generatorName"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 93a8f4cdf..d43f8ce9a 100644 +index 392cd0e3d..62903f374 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -987,7 +987,7 @@ public final class CraftServer implements Server { @@ -98,5 +98,5 @@ index 93a8f4cdf..d43f8ce9a 100644 if (parsedSettings.isJsonObject()) { worldSettings.setGeneratorSettings(parsedSettings.getAsJsonObject()); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0364-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0362-Optimize-Server-World-Map.patch similarity index 97% rename from Spigot-Server-Patches/0364-Optimize-Server-World-Map.patch rename to Spigot-Server-Patches/0362-Optimize-Server-World-Map.patch index 99220603d..9a30b2a61 100644 --- a/Spigot-Server-Patches/0364-Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/0362-Optimize-Server-World-Map.patch @@ -1,4 +1,4 @@ -From 92864bdfa273d76e085a870c1433a24aec5f6b8e Mon Sep 17 00:00:00 2001 +From 3c1a965bd7670ddf173313ffb16dfe8a28b42817 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:37:31 -0400 Subject: [PATCH] Optimize Server World Map @@ -217,10 +217,10 @@ index 000000000..af9e4455c + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 175198818..63b5cdd41 100644 +index 11510640a..d0be8d2fb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -87,7 +87,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -82,7 +82,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati public final DataFixer dataConverterManager; private String serverIp; private int q = -1; @@ -229,7 +229,7 @@ index 175198818..63b5cdd41 100644 private PlayerList playerList; private boolean isRunning = true; private boolean isRestarting = false; // Paper - flag to signify we're attempting to restart -@@ -550,7 +550,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -545,7 +545,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } } @@ -239,5 +239,5 @@ index 175198818..63b5cdd41 100644 } // CraftBukkit end -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0365-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0363-PreSpawnerSpawnEvent.patch similarity index 95% rename from Spigot-Server-Patches/0365-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0363-PreSpawnerSpawnEvent.patch index 140859361..f5a362038 100644 --- a/Spigot-Server-Patches/0365-PreSpawnerSpawnEvent.patch +++ b/Spigot-Server-Patches/0363-PreSpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From b244af90b7c98d93f1a8ea285afe743a9d6c27cf Mon Sep 17 00:00:00 2001 +From 28e88db787de6d4c63a2c6c0528d1d14566589fc Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 18 Sep 2018 23:53:23 +0100 Subject: [PATCH] PreSpawnerSpawnEvent @@ -28,5 +28,5 @@ index eca3f85ad..b2d2de7f8 100644 if (!event.callEvent()) { flag = true; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0366-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0364-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 92% rename from Spigot-Server-Patches/0366-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0364-Catch-JsonParseException-in-Entity-and-TE-names.patch index debe33e89..47918c72f 100644 --- a/Spigot-Server-Patches/0366-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0364-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -1,4 +1,4 @@ -From 1c42d652f8e89a08c70d95eef465259447769e7b Mon Sep 17 00:00:00 2001 +From 8f02a69ad91906228ca3411197f3486dcbe5cae3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 22 Sep 2018 15:56:59 -0400 Subject: [PATCH] Catch JsonParseException in Entity and TE names @@ -13,10 +13,10 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index 729859d13..2a1dffbf4 100644 +index e38a0d488..a245df1dc 100644 --- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -57,7 +57,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { +@@ -56,7 +56,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { this.g = nbttagcompound.getString("Command"); this.d = nbttagcompound.getInt("SuccessCount"); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -26,10 +26,10 @@ index 729859d13..2a1dffbf4 100644 if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ab8490ff9..522af3d53 100644 +index e068f19ad..11d5c2655 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1734,7 +1734,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1732,7 +1732,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setPosition(this.locX, this.locY, this.locZ); this.setYawPitch(this.yaw, this.pitch); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -63,7 +63,7 @@ index 0ef5ad116..f70f5899f 100644 + } } diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java -index b4fae0d30..364a9fa7a 100644 +index 7d9e0837d..dfee7332e 100644 --- a/src/main/java/net/minecraft/server/TileEntityBanner.java +++ b/src/main/java/net/minecraft/server/TileEntityBanner.java @@ -74,7 +74,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity { @@ -76,7 +76,7 @@ index b4fae0d30..364a9fa7a 100644 if (this.hasWorld()) { diff --git a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java -index 22dcdc126..1467b540f 100644 +index a106a783e..ff8a5926e 100644 --- a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java +++ b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java @@ -236,7 +236,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IWorl @@ -89,7 +89,7 @@ index 22dcdc126..1467b540f 100644 this.fuelLevel = nbttagcompound.getByte("Fuel"); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 7594c16e9..803793072 100644 +index 2e0f782f6..77c012946 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -83,7 +83,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic @@ -115,10 +115,10 @@ index ddd2e0eb0..21bd156e9 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 324a8431c..49e7fd064 100644 +index bfbd35bbe..538ca9bbb 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -218,7 +218,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve +@@ -217,7 +217,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve } if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -128,10 +128,10 @@ index 324a8431c..49e7fd064 100644 // Paper start - cook speed API diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index cdc576058..2dae75f45 100644 +index 7303a6fdd..544dde428 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -61,7 +61,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -60,7 +60,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -141,7 +141,7 @@ index cdc576058..2dae75f45 100644 this.f = nbttagcompound.getInt("TransferCooldown"); diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java -index d4f379db9..59a0f4b2c 100644 +index fedba2e1f..296b8dd56 100644 --- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java +++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java @@ -249,7 +249,7 @@ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldIn @@ -154,5 +154,5 @@ index d4f379db9..59a0f4b2c 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0367-Avoid-dimension-id-collisions.patch b/Spigot-Server-Patches/0365-Avoid-dimension-id-collisions.patch similarity index 90% rename from Spigot-Server-Patches/0367-Avoid-dimension-id-collisions.patch rename to Spigot-Server-Patches/0365-Avoid-dimension-id-collisions.patch index 43a47fc6a..7fb143981 100644 --- a/Spigot-Server-Patches/0367-Avoid-dimension-id-collisions.patch +++ b/Spigot-Server-Patches/0365-Avoid-dimension-id-collisions.patch @@ -1,4 +1,4 @@ -From b5ea79cadcb3f0c94babcc29504309d000e9bd38 Mon Sep 17 00:00:00 2001 +From 542d9be7dd04e9abd5672608d56d23b2544be89a Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 25 Sep 2018 06:53:43 +0200 Subject: [PATCH] Avoid dimension id collisions @@ -8,7 +8,7 @@ we would reuse an existing dimension id, if some other dimension was unloaded before. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d43f8ce9a..07f6580fd 100644 +index 62903f374..a0f255ff1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -973,7 +973,7 @@ public final class CraftServer implements Server { @@ -21,5 +21,5 @@ index d43f8ce9a..07f6580fd 100644 dimension++; break; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0368-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0366-Honor-EntityAgeable.ageLock.patch similarity index 85% rename from Spigot-Server-Patches/0368-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0366-Honor-EntityAgeable.ageLock.patch index cc8d57e88..2d769f5bd 100644 --- a/Spigot-Server-Patches/0368-Honor-EntityAgeable.ageLock.patch +++ b/Spigot-Server-Patches/0366-Honor-EntityAgeable.ageLock.patch @@ -1,11 +1,11 @@ -From 770706b73b1c9a69a1b1472e06d9d5c0f4da5193 Mon Sep 17 00:00:00 2001 +From 10cc618952c7e71420ef2a91f1ed0bd46073d304 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 23 Sep 2018 20:59:53 -0500 Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java -index 652b178f1..b0c07560b 100644 +index 2af1ac702..aa54e380e 100644 --- a/src/main/java/net/minecraft/server/EntityAgeable.java +++ b/src/main/java/net/minecraft/server/EntityAgeable.java @@ -82,6 +82,7 @@ public abstract class EntityAgeable extends EntityCreature { @@ -17,5 +17,5 @@ index 652b178f1..b0c07560b 100644 int k = j; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0369-Async-Chunk-Loading-and-Generation.patch b/Spigot-Server-Patches/0367-Async-Chunk-Loading-and-Generation.patch similarity index 89% rename from Spigot-Server-Patches/0369-Async-Chunk-Loading-and-Generation.patch rename to Spigot-Server-Patches/0367-Async-Chunk-Loading-and-Generation.patch index 8e372a8f0..879ff2884 100644 --- a/Spigot-Server-Patches/0369-Async-Chunk-Loading-and-Generation.patch +++ b/Spigot-Server-Patches/0367-Async-Chunk-Loading-and-Generation.patch @@ -1,4 +1,4 @@ -From 0a9fba478449b363ca64fe653a250248a34d80a2 Mon Sep 17 00:00:00 2001 +From 55bd6cb4935cb50631475b9310371d147dec6ebd Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 16:55:04 -0400 Subject: [PATCH] Async Chunk Loading and Generation @@ -458,10 +458,10 @@ index 000000000..8f18c2869 + +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 25e49de19..8246194df 100644 +index 71d865b76..6d3f5b651 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -191,6 +191,7 @@ public class Chunk implements IChunkAccess { +@@ -190,6 +190,7 @@ public class Chunk implements IChunkAccess { for (k = 0; k < this.sections.length; ++k) { this.sections[k] = protochunk.getSections()[k]; @@ -562,10 +562,10 @@ index 2021c0d02..154ab09e0 100644 public void putAll(Map map) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index b9f8a86aa..4fe173cfb 100644 +index fce3f673d..7b460d7dd 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -35,12 +35,12 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -33,12 +33,12 @@ public class ChunkProviderServer implements IChunkProvider { private long lastProcessedSaves = 0L; // Paper private long lastSaveStatPrinted = System.currentTimeMillis(); // Paper end @@ -581,7 +581,7 @@ index b9f8a86aa..4fe173cfb 100644 public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator, IAsyncTaskHandler iasynctaskhandler) { this.world = worldserver; -@@ -77,10 +77,76 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -75,10 +75,76 @@ public class ChunkProviderServer implements IChunkProvider { this.unloadQueue.remove(ChunkCoordIntPair.a(i, j)); } @@ -658,7 +658,7 @@ index b9f8a86aa..4fe173cfb 100644 synchronized (this.chunkLoader) { // Paper start - remove vanilla lastChunk, we do it more accurately -@@ -88,13 +154,15 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -86,13 +152,15 @@ public class ChunkProviderServer implements IChunkProvider { return this.lastChunk; }*/ // Paper end @@ -677,7 +677,7 @@ index b9f8a86aa..4fe173cfb 100644 if (flag) { try (co.aikar.timings.Timing timing = world.timings.syncChunkLoadTimer.startTiming()) { // Paper -@@ -150,7 +218,8 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -147,7 +215,8 @@ public class ChunkProviderServer implements IChunkProvider { return (IChunkAccess) (chunk != null ? chunk : (IChunkAccess) this.chunkScheduler.b(new ChunkCoordIntPair(i, j), flag)); } @@ -687,7 +687,7 @@ index b9f8a86aa..4fe173cfb 100644 this.batchScheduler.b(); Iterator iterator = iterable.iterator(); -@@ -168,6 +237,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -165,6 +234,7 @@ public class ChunkProviderServer implements IChunkProvider { return this.batchScheduler.c(); } @@ -695,7 +695,7 @@ index b9f8a86aa..4fe173cfb 100644 private ReportedException a(int i, int j, Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception generating new chunk"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Chunk to be generated"); -@@ -289,11 +359,13 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -286,11 +356,13 @@ public class ChunkProviderServer implements IChunkProvider { } public void close() { @@ -712,10 +712,10 @@ index b9f8a86aa..4fe173cfb 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index c12db3cfa..6cacacb0b 100644 +index f3e766967..c70308198 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -120,7 +120,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -118,7 +118,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { // CraftBukkit start private boolean check(ChunkProviderServer cps, int x, int z) throws IOException { if (cps != null) { @@ -724,7 +724,7 @@ index c12db3cfa..6cacacb0b 100644 if (cps.isLoaded(x, z)) { return true; } -@@ -380,11 +380,12 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -378,11 +378,12 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } }; } else { @@ -739,10 +739,10 @@ index c12db3cfa..6cacacb0b 100644 completion = new Supplier() { public NBTTagCompound get() { diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index bdfc7d81f..a5c4564d6 100644 +index 2af07ae59..9c6844d44 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -24,7 +24,17 @@ public class ChunkSection { +@@ -25,7 +25,17 @@ public class ChunkSection { this.skyLight = new NibbleArray(); } @@ -759,18 +759,18 @@ index bdfc7d81f..a5c4564d6 100644 + // Paper end public IBlockData getType(int i, int j, int k) { - return this.blockIds.a(i, j, k); + return (IBlockData) this.blockIds.a(i, j, k); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index ad7e4a036..f10f235ed 100644 +index d3898599f..8f061f5ca 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -@@ -20,13 +20,14 @@ public class ChunkTaskScheduler extends Scheduler d; private final IChunkLoader e; private final IAsyncTaskHandler f; -- private final Long2ObjectMap progressCache = new ExpiringMap(8192, 5000) { // CraftBukkit - decompile error -+ final Long2ObjectMap progressCache = new ExpiringMap(8192, 5000) { // CraftBukkit - decompile error // Paper - protected - protected boolean a(Scheduler.a scheduler_a) { +- private final Long2ObjectMap.a> progressCache = new ExpiringMap.a>(8192, 5000) { ++ protected final Long2ObjectMap.a> progressCache = new ExpiringMap.a>(8192, 5000) { // Paper - protected + protected boolean a(Scheduler.a scheduler_a) { ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper @@ -780,8 +780,8 @@ index ad7e4a036..f10f235ed 100644 public ChunkTaskScheduler(int i, World world, ChunkGenerator chunkgenerator, IChunkLoader ichunkloader, IAsyncTaskHandler iasynctaskhandler) { super("WorldGen", i, ChunkStatus.FINALIZED, () -> { -@@ -50,8 +51,28 @@ public class ChunkTaskScheduler extends Scheduler.a a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { IChunkLoader ichunkloader = this.e; - synchronized (this.e) { @@ -811,7 +811,7 @@ index ad7e4a036..f10f235ed 100644 ProtoChunk protochunk; try { -@@ -70,8 +91,18 @@ public class ChunkTaskScheduler extends Scheduler map) { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 71a3636be..ff0fe2541 100644 +index 454903a0e..dcbcb655c 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -3,7 +3,7 @@ package net.minecraft.server; @@ -844,7 +844,7 @@ index 71a3636be..ff0fe2541 100644 import java.util.function.Function; import java.util.stream.Collectors; -@@ -20,25 +20,42 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -21,26 +21,43 @@ public class DataPaletteBlock implements DataPaletteExpandable { protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER private DataPalette h; private DataPalette getDataPalette() { return this.h; } // Paper - OBFHELPER private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER @@ -868,12 +868,13 @@ index 71a3636be..ff0fe2541 100644 - private void b() { - if (this.j.isLocked() && !this.j.isHeldByCurrentThread()) { -- String s = (String)Thread.getAllStackTraces().keySet().stream().filter(Objects::nonNull).map((thread) -> { -- return thread.getName() + ": \n\tat " + (String)Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n\tat ")); +- String s = (String) Thread.getAllStackTraces().keySet().stream().filter(Objects::nonNull).map((thread) -> { +- return thread.getName() + ": \n\tat " + (String) Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n\tat ")); - }).collect(Collectors.joining("\n")); - CrashReport crashreport = new CrashReport("Writing into PalettedContainer from multiple threads", new IllegalStateException()); - CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Thread dumps"); -- crashreportsystemdetails.a("Thread dumps", s); +- +- crashreportsystemdetails.a("Thread dumps", (Object) s); - throw new ReportedException(crashreport); - } else { - this.j.lock(); @@ -889,6 +890,7 @@ index 71a3636be..ff0fe2541 100644 + readLock = NOOP_LOCK; + writeLock = NOOP_LOCK; + } ++ + private void b() { + writeLock.lock(); + } @@ -898,17 +900,18 @@ index 71a3636be..ff0fe2541 100644 } + // Paper end - public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object) { + public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0) { // Paper start - Anti-Xray - Support default constructor -@@ -147,8 +164,13 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -155,9 +172,13 @@ public class DataPaletteBlock implements DataPaletteExpandable { } - protected T a(int ix) { -- T object = this.h.a(this.a.a(ix)); // Paper - decompile fix -- return (T)(object == null ? this.g : object); + protected T a(int i) { +- T t0 = this.h.a(this.a.a(i)); +- +- return t0 == null ? this.g : t0; + try { // Paper start - read lock + readLock.lock(); -+ T object = this.h.a(this.a.a(ix)); // Paper - decompile fix ++ T object = this.h.a(this.a.a(i)); // Paper - decompile fix + return (T)(object == null ? this.g : object); + } finally { + readLock.unlock(); @@ -917,12 +920,12 @@ index 71a3636be..ff0fe2541 100644 // Paper start - Anti-Xray - Support default methods diff --git a/src/main/java/net/minecraft/server/DefinedStructureManager.java b/src/main/java/net/minecraft/server/DefinedStructureManager.java -index 271dc41d4..bd15534c2 100644 +index f5a6387f2..f45685099 100644 --- a/src/main/java/net/minecraft/server/DefinedStructureManager.java +++ b/src/main/java/net/minecraft/server/DefinedStructureManager.java -@@ -19,7 +19,7 @@ import org.apache.logging.log4j.Logger; - +@@ -21,7 +21,7 @@ import org.apache.logging.log4j.Logger; public class DefinedStructureManager implements IResourcePackListener { + private static final Logger a = LogManager.getLogger(); - private final Map b = Maps.newHashMap(); + private final Map b = Maps.newConcurrentMap(); // Paper @@ -930,10 +933,10 @@ index 271dc41d4..bd15534c2 100644 private final MinecraftServer d; private final java.nio.file.Path e; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ef5a21505..93171edb4 100644 +index 11d5c2655..80e395b1a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -209,7 +209,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -207,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.random = SHARED_RANDOM; // Paper this.fireTicks = -this.getMaxFireTicks(); this.justCreated = true; @@ -956,22 +959,31 @@ index 4698ee99f..dfb45cc4e 100644 Chunk a(GeneratorAccess generatoraccess, int i, int j, Consumer consumer) throws IOException; diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index 49fba0979..9ad646f8d 100644 +index 8bb2593aa..67bb28954 100644 --- a/src/main/java/net/minecraft/server/MathHelper.java +++ b/src/main/java/net/minecraft/server/MathHelper.java -@@ -142,6 +142,7 @@ public class MathHelper { +@@ -7,7 +7,7 @@ import java.util.function.IntPredicate; + public class MathHelper { + + public static final float a = c(2.0F); +- private static final float[] b = (float[]) SystemUtils.a((Object) (new float[65536]), (afloat) -> { ++ private static final float[] b = (float[]) SystemUtils.a((new float[65536]), (afloat) -> { // Paper - Decompile fix + for (int i = 0; i < afloat.length; ++i) { + afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D); + } +@@ -136,6 +136,7 @@ public class MathHelper { return Math.floorMod(i, j); } + public static float normalizeYaw(float fx) { return g(fx); } // Paper - OBFHELPER - public static float g(float fx) { - fx = fx % 360.0F; - if (fx >= 180.0F) { + public static float g(float f) { + f %= 360.0F; + if (f >= 180.0F) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 63b5cdd41..32aee07d1 100644 +index d0be8d2fb..84d588122 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -503,6 +503,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -498,6 +498,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit start - fire WorldLoadEvent and handle whether or not to keep the spawn in memory Stopwatch stopwatch = Stopwatch.createStarted(); @@ -979,29 +991,29 @@ index 63b5cdd41..32aee07d1 100644 for (WorldServer worldserver : this.getWorlds()) { MinecraftServer.LOGGER.info("Preparing start region for level " + worldserver.dimension + " (Seed: " + worldserver.getSeed() + ")"); if (!worldserver.getWorld().getKeepSpawnInMemory()) { -@@ -510,29 +511,25 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -505,29 +506,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati } BlockPosition blockposition = worldserver.getSpawn(); -- ArrayList arraylist = Lists.newArrayList(); -+ List arraylist = worldserver.getChunkProvider().getSpiralOutChunks(blockposition, worldserver.paperConfig.keepLoadedRange >> 4); // Paper - Set set = Sets.newConcurrentHashSet(); +- List list = Lists.newArrayList(); ++ List list = worldserver.getChunkProvider().getSpiralOutChunks(blockposition, worldserver.paperConfig.keepLoadedRange >> 4); // Paper + Set set = Sets.newConcurrentHashSet(); - // Paper start - short radius = worldserver.paperConfig.keepLoadedRange; - for (int i = -radius; i <= radius && this.isRunning(); i += 16) { - for (int j = -radius; j <= radius && this.isRunning(); j += 16) { - // Paper end -- arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); +- list.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); - } - } // Paper + // Paper - remove arraylist creation, call spiral above if (this.isRunning()) { // Paper - int expected = arraylist.size(); // Paper + int expected = list.size(); // Paper - -- CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) arraylist, (chunk) -> { -+ CompletableFuture completablefuture = worldserver.getChunkProvider().loadAllChunks((Iterable) arraylist, (chunk) -> { // Paper +- +- CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) list, (chunk) -> { ++ CompletableFuture completablefuture = worldserver.getChunkProvider().loadAllChunks(list, (chunk) -> { // Paper 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 + if (waitForChunks && (set.size() == expected || (set.size() < expected && set.size() % (set.size() / 10) == 0))) { @@ -1018,7 +1030,7 @@ index 63b5cdd41..32aee07d1 100644 } catch (InterruptedException interruptedexception) { throw new RuntimeException(interruptedexception); } catch (ExecutionException executionexception) { -@@ -542,11 +539,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -537,11 +533,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati throw new RuntimeException(executionexception.getCause()); } catch (TimeoutException timeoutexception) { @@ -1032,7 +1044,7 @@ index 63b5cdd41..32aee07d1 100644 } } -@@ -650,6 +647,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -645,6 +641,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati if (hasStopped) return; hasStopped = true; } @@ -1040,7 +1052,7 @@ index 63b5cdd41..32aee07d1 100644 // CraftBukkit end MinecraftServer.LOGGER.info("Stopping server"); MinecraftTimings.stopServer(); // Paper -@@ -1017,6 +1015,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1012,6 +1009,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati while ((futuretask = (FutureTask) this.f.poll()) != null) { SystemUtils.a(futuretask, MinecraftServer.LOGGER); } @@ -1048,7 +1060,7 @@ index 63b5cdd41..32aee07d1 100644 MinecraftTimings.minecraftSchedulerTimer.stopTiming(); // Paper this.methodProfiler.exitEnter("commandFunctions"); -@@ -1053,6 +1052,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1048,6 +1046,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit - dropTickTime for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) { WorldServer worldserver = (WorldServer) iterator.next(); @@ -1718,10 +1730,10 @@ index 000000000..e9a38f9d9 + +} diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index b58683e6f..e61538b3c 100644 +index 240f59066..e4cf8548d 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -20,19 +20,69 @@ public class PlayerChunk { +@@ -22,6 +22,52 @@ public class PlayerChunk { private long i; private boolean done; boolean chunkExists; // Paper @@ -1772,15 +1784,16 @@ index b58683e6f..e61538b3c 100644 + return Math.sqrt((x * x) + (z * z)); + } - public PlayerChunk(PlayerChunkMap playerchunkmap, int ix, int j) { + public PlayerChunk(PlayerChunkMap playerchunkmap, int i, int j) { this.playerChunkMap = playerchunkmap; - this.location = new ChunkCoordIntPair(ix, j); +@@ -29,13 +75,17 @@ public class PlayerChunk { ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); -- this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); -- this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), ix, j); // Paper -+ this.chunk = chunkproviderserver.getChunkAt(ix, j, false, false); // Paper -+ this.chunkExists = this.chunk != null || chunkproviderserver.chunkGoingToExists(ix, j); // Paper + + chunkproviderserver.a(i, j); +- this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); +- this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper ++ this.chunk = chunkproviderserver.getChunkAt(i, j, false, false); // Paper ++ this.chunkExists = this.chunk != null || chunkproviderserver.chunkGoingToExists(i, j); // Paper markChunkUsed(); // Paper - delay chunk unloads } @@ -1793,7 +1806,7 @@ index b58683e6f..e61538b3c 100644 if (chunk == null) { return; } -@@ -62,7 +112,7 @@ public class PlayerChunk { +@@ -65,7 +115,7 @@ public class PlayerChunk { this.players.add(entityplayer); if (this.done) { this.sendChunk(entityplayer); @@ -1802,7 +1815,7 @@ index b58683e6f..e61538b3c 100644 } } -@@ -87,8 +137,9 @@ public class PlayerChunk { +@@ -90,8 +140,9 @@ public class PlayerChunk { if (this.chunk != null) { return true; } else { @@ -1815,10 +1828,10 @@ index b58683e6f..e61538b3c 100644 } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 27343174d..77b36ff89 100644 +index 679488a3c..b7dda8e28 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -27,10 +27,10 @@ public class PlayerChunkMap { +@@ -25,10 +25,10 @@ public class PlayerChunkMap { }; private static final Predicate b = (entityplayer) -> { return entityplayer != null && (!entityplayer.isSpectator() || entityplayer.getWorldServer().getGameRules().getBoolean("spectatorsGenerateChunks")); @@ -1831,7 +1844,7 @@ index 27343174d..77b36ff89 100644 private final Set f = Sets.newHashSet(); private final List g = Lists.newLinkedList(); private final List h = Lists.newLinkedList(); -@@ -345,7 +345,13 @@ public class PlayerChunkMap { +@@ -341,7 +341,13 @@ public class PlayerChunkMap { if (playerchunk != null) { playerchunk.b(entityplayer); } @@ -1845,7 +1858,7 @@ index 27343174d..77b36ff89 100644 } } -@@ -356,7 +362,11 @@ public class PlayerChunkMap { +@@ -352,7 +358,11 @@ public class PlayerChunkMap { // CraftBukkit start - send nearest chunks first Collections.sort(chunksToLoad, new ChunkCoordComparator(entityplayer)); for (ChunkCoordIntPair pair : chunksToLoad) { @@ -1858,7 +1871,7 @@ index 27343174d..77b36ff89 100644 } // CraftBukkit end } -@@ -428,6 +438,15 @@ public class PlayerChunkMap { +@@ -424,6 +434,15 @@ public class PlayerChunkMap { } } } @@ -1875,10 +1888,10 @@ index 27343174d..77b36ff89 100644 private void e() { diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -index d0b3e43c0..eb7f03898 100644 +index de6dd4fed..da6df06d8 100644 --- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java +++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -@@ -35,7 +35,7 @@ public class RegionLimitedWorldAccess implements GeneratorAccess { +@@ -34,7 +34,7 @@ public class RegionLimitedWorldAccess implements GeneratorAccess { this.d = l; this.e = i; this.f = j; @@ -1888,10 +1901,10 @@ index d0b3e43c0..eb7f03898 100644 this.m = world.getChunkProvider().getChunkGenerator().getSettings(); this.i = world.getSeaLevel(); diff --git a/src/main/java/net/minecraft/server/SchedulerBatch.java b/src/main/java/net/minecraft/server/SchedulerBatch.java -index d868149d1..0d45d933e 100644 +index 8e909d9ca..f214a74a2 100644 --- a/src/main/java/net/minecraft/server/SchedulerBatch.java +++ b/src/main/java/net/minecraft/server/SchedulerBatch.java -@@ -9,6 +9,7 @@ public class SchedulerBatch, R> { +@@ -10,6 +10,7 @@ public class SchedulerBatch, R> { private final Scheduler b; private boolean c; private int d = 1000; @@ -1899,7 +1912,7 @@ index d868149d1..0d45d933e 100644 public SchedulerBatch(Scheduler scheduler) { this.b = scheduler; -@@ -18,8 +19,10 @@ public class SchedulerBatch, R> { +@@ -19,8 +20,10 @@ public class SchedulerBatch, R> { this.b.b(); } @@ -1911,15 +1924,15 @@ index d868149d1..0d45d933e 100644 throw new RuntimeException("Batch already started."); } else { this.d = 1000; -@@ -27,6 +30,7 @@ public class SchedulerBatch, R> { +@@ -28,6 +31,7 @@ public class SchedulerBatch, R> { } } + public CompletableFuture add(K k0) { return a(k0); } // Paper - OBFHELPER - public CompletableFuture a(K object) { + public CompletableFuture a(K k0) { if (!this.c) { throw new RuntimeException("Batch not properly started. Please use startBatch to create a new batch."); -@@ -42,8 +46,14 @@ public class SchedulerBatch, R> { +@@ -44,8 +48,14 @@ public class SchedulerBatch, R> { } } @@ -1935,7 +1948,7 @@ index d868149d1..0d45d933e 100644 throw new RuntimeException("Batch not properly started. Please use startBatch to create a new batch."); } else { if (this.d != 1000) { -@@ -53,5 +63,6 @@ public class SchedulerBatch, R> { +@@ -55,5 +65,6 @@ public class SchedulerBatch, R> { this.c = false; return this.b.c(); } @@ -1943,75 +1956,95 @@ index d868149d1..0d45d933e 100644 } } diff --git a/src/main/java/net/minecraft/server/StructurePiece.java b/src/main/java/net/minecraft/server/StructurePiece.java -index 510543db4..ce9e5d4e0 100644 +index d9def7135..945a005e9 100644 --- a/src/main/java/net/minecraft/server/StructurePiece.java +++ b/src/main/java/net/minecraft/server/StructurePiece.java -@@ -14,7 +14,7 @@ public abstract class StructurePiece { +@@ -16,7 +16,7 @@ public abstract class StructurePiece { private EnumBlockMirror b; private EnumBlockRotation c; protected int o; - private static final Set d = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); + private static final Set d = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); // Paper - decompile error - public StructurePiece() { - } -@@ -63,11 +63,11 @@ public abstract class StructurePiece { + public StructurePiece() {} + +@@ -66,9 +66,11 @@ public abstract class StructurePiece { } public static StructurePiece a(List list, StructureBoundingBox structureboundingbox) { -- for(StructurePiece structurepiece : list) { -+ synchronized (list) { for(StructurePiece structurepiece : list) { // Paper - synchronize main structure list - if (structurepiece.d() != null && structurepiece.d().a(structureboundingbox)) { - return structurepiece; - } -- } -+ }} // Paper ++ StructurePiece structurepiece; // Paper ++ synchronized (list) { // Paper - synchronize main structure list + Iterator iterator = list.iterator(); - return null; +- StructurePiece structurepiece; ++ //StructurePiece structurepiece; // Paper - move up + + do { + if (!iterator.hasNext()) { +@@ -77,7 +79,7 @@ public abstract class StructurePiece { + + structurepiece = (StructurePiece) iterator.next(); + } while (structurepiece.d() == null || !structurepiece.d().a(structureboundingbox)); +- ++ } // Paper + return structurepiece; } + diff --git a/src/main/java/net/minecraft/server/StructureStart.java b/src/main/java/net/minecraft/server/StructureStart.java -index 1926c902a..1117e4ae2 100644 +index 284e96710..8b08efe1f 100644 --- a/src/main/java/net/minecraft/server/StructureStart.java +++ b/src/main/java/net/minecraft/server/StructureStart.java -@@ -6,7 +6,7 @@ import java.util.List; - import java.util.Random; +@@ -7,7 +7,7 @@ import java.util.Random; public abstract class StructureStart { + - protected final List a = Lists.newArrayList(); + protected final List a = java.util.Collections.synchronizedList(Lists.newArrayList()); // Paper protected StructureBoundingBox b; protected int c; protected int d; -@@ -49,9 +49,9 @@ public abstract class StructureStart { - protected void a(IBlockAccess var1) { - this.b = StructureBoundingBox.a(); +@@ -51,13 +51,14 @@ public abstract class StructureStart { + + protected void a(IBlockAccess iblockaccess) { + this.b = StructureBoundingBox.a(); ++ synchronized (this.a) { // Paper - synchronize + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize this.b.b(structurepiece.d()); - } + }} // Paper } -@@ -114,9 +114,9 @@ public abstract class StructureStart { +@@ -126,13 +127,14 @@ public abstract class StructureStart { int l = k - this.b.e; - this.b.a(0, l, 0); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize + this.b.a(0, l, 0); ++ synchronized (this.a) { // Paper - synchronize + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + structurepiece.a(0, l, 0); - } + }} // Paper } -@@ -132,9 +132,9 @@ public abstract class StructureStart { +@@ -149,13 +151,14 @@ public abstract class StructureStart { int i1 = l - this.b.b; - this.b.a(0, i1, 0); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize + this.b.a(0, i1, 0); ++ synchronized (this.a) { + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + structurepiece.a(0, i1, 0); - } + }} // Paper @@ -2019,10 +2052,10 @@ index 1926c902a..1117e4ae2 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cb09e1052..cd31792b7 100644 +index f48d5d9f7..b5b0fcf8c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -46,7 +46,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +@@ -41,7 +41,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.generator.ChunkGenerator; // CraftBukkit end @@ -2031,7 +2064,7 @@ index cb09e1052..cd31792b7 100644 protected static final Logger e = LogManager.getLogger(); private static final EnumDirection[] a = EnumDirection.values(); -@@ -109,6 +109,24 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -104,6 +104,24 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc protected PersistentVillage villages; public final MethodProfiler methodProfiler; public final boolean isClientSide; @@ -2056,7 +2089,7 @@ index cb09e1052..cd31792b7 100644 public boolean allowMonsters; public boolean allowAnimals; private boolean J; -@@ -742,17 +760,42 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -737,17 +755,42 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } @@ -2103,7 +2136,7 @@ index cb09e1052..cd31792b7 100644 // CraftBukkit end if (blockposition.isInvalidYLocation()) { // Paper return Blocks.VOID_AIR.getBlockData(); -@@ -1021,6 +1064,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1016,6 +1059,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason @@ -2116,13 +2149,13 @@ index cb09e1052..cd31792b7 100644 if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper if (!CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) { diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java -index fa99fe014..4f49786aa 100644 +index 69d8a25bd..d0eaa9e9f 100644 --- a/src/main/java/net/minecraft/server/WorldGenStronghold.java +++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java -@@ -9,24 +9,29 @@ import java.util.Random; - import javax.annotation.Nullable; +@@ -10,23 +10,28 @@ import javax.annotation.Nullable; public class WorldGenStronghold extends StructureGenerator { + - private boolean b; - private ChunkCoordIntPair[] c; - private long d; @@ -2132,10 +2165,9 @@ index fa99fe014..4f49786aa 100644 + //private long d; + // Paper end - public WorldGenStronghold() { - } + public WorldGenStronghold() {} - protected boolean a(ChunkGenerator chunkgenerator, Random var2, int i, int j) { + protected boolean a(ChunkGenerator chunkgenerator, Random random, int i, int j) { - if (this.d != chunkgenerator.getSeed()) { + // Paper start + /*if (this.d != chunkgenerator.getSeed()) { @@ -2153,12 +2185,12 @@ index fa99fe014..4f49786aa 100644 + }} // Paper + // Paper end -- for(ChunkCoordIntPair chunkcoordintpair : this.c) { -+ for(ChunkCoordIntPair chunkcoordintpair : chunkgenerator.getWorld().strongholdCoords) { // Paper - if (i == chunkcoordintpair.x && j == chunkcoordintpair.z) { - return true; - } -@@ -36,8 +41,8 @@ public class WorldGenStronghold extends StructureGenerator chunkgenerator) { - this.d = chunkgenerator.getSeed(); + //this.d = chunkgenerator.getSeed(); // Paper - ArrayList arraylist = Lists.newArrayList(); + List list = Lists.newArrayList(); + Iterator iterator = IRegistry.BIOME.iterator(); - for(BiomeBase biomebase : IRegistry.BIOME) { -@@ -111,7 +119,7 @@ public class WorldGenStronghold extends StructureGenerator long2objectmap = chunkgenerator.getStructureStartCache(this); + +@@ -137,8 +149,8 @@ public class WorldGenStronghold extends StructureGenerator= k) { -- this.c[j1] = new ChunkCoordIntPair(k1, l1); -+ strongholdCoords[j1] = new ChunkCoordIntPair(k1, l1); // Paper + if (l1 >= i1) { +- this.c[l1] = new ChunkCoordIntPair(i2, j2); ++ strongholdCoords[l1] = new ChunkCoordIntPair(i2, j2); // Paper } - d1 += (Math.PI * 2D) / (double)i; -@@ -153,7 +161,7 @@ public class WorldGenStronghold extends StructureGenerator> 4; // Cycle through the 25x25 Chunks around it to load/unload the chunks. int radius = world.paperConfig.keepLoadedRange / 16; // Paper @@ -2342,7 +2381,7 @@ index 7ef3c7746..162ff3414 100644 if (isChunkLoaded(chunkCoordX + x, chunkCoordZ + z)) { unloadChunk(chunkCoordX + x, chunkCoordZ + z); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f87d2bed7..603f43b7e 100644 +index fdab6734f..140415687 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -81,6 +81,7 @@ public class CraftEventFactory { @@ -2353,7 +2392,7 @@ index f87d2bed7..603f43b7e 100644 // helper methods private static boolean canBuild(CraftWorld world, Player player, int x, int z) { -@@ -456,6 +457,7 @@ public class CraftEventFactory { +@@ -469,6 +470,7 @@ public class CraftEventFactory { CraftServer craftServer = (CraftServer) entity.getServer(); CreatureSpawnEvent event = new CreatureSpawnEvent(entity, spawnReason); @@ -2361,7 +2400,7 @@ index f87d2bed7..603f43b7e 100644 craftServer.getPluginManager().callEvent(event); return event; } -@@ -1103,6 +1105,7 @@ public class CraftEventFactory { +@@ -1117,6 +1119,7 @@ public class CraftEventFactory { } BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(block.getX(), block.getY(), block.getZ()), cause, igniter); @@ -2369,7 +2408,7 @@ index f87d2bed7..603f43b7e 100644 world.getServer().getPluginManager().callEvent(event); return event; } -@@ -1127,6 +1130,7 @@ public class CraftEventFactory { +@@ -1141,6 +1144,7 @@ public class CraftEventFactory { } BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), cause, bukkitIgniter); @@ -2377,7 +2416,7 @@ index f87d2bed7..603f43b7e 100644 world.getServer().getPluginManager().callEvent(event); return event; } -@@ -1334,7 +1338,8 @@ public class CraftEventFactory { +@@ -1348,7 +1352,8 @@ public class CraftEventFactory { public static BlockPhysicsEvent callBlockPhysicsEvent(GeneratorAccess world, BlockPosition blockposition) { org.bukkit.block.Block block = CraftBlock.at(world, blockposition); BlockPhysicsEvent event = new BlockPhysicsEvent(block, block.getBlockData()); @@ -2387,7 +2426,7 @@ index f87d2bed7..603f43b7e 100644 return event; } -@@ -1370,6 +1375,7 @@ public class CraftEventFactory { +@@ -1384,6 +1389,7 @@ public class CraftEventFactory { } EntityPotionEffectEvent event = new EntityPotionEffectEvent((LivingEntity) entity.getBukkitEntity(), bukkitOldEffect, bukkitNewEffect, cause, action, willOverride); @@ -2395,7 +2434,7 @@ index f87d2bed7..603f43b7e 100644 Bukkit.getPluginManager().callEvent(event); return event; -@@ -1388,6 +1394,7 @@ public class CraftEventFactory { +@@ -1402,6 +1408,7 @@ public class CraftEventFactory { blockState.setData(block); BlockFormEvent event = (entity == null) ? new BlockFormEvent(blockState.getBlock(), blockState) : new EntityBlockFormEvent(entity.getBukkitEntity(), blockState.getBlock(), blockState); diff --git a/Spigot-Server-Patches/0370-Ignore-Dimension-NBT-field-in-Entity-data.patch b/Spigot-Server-Patches/0368-Ignore-Dimension-NBT-field-in-Entity-data.patch similarity index 88% rename from Spigot-Server-Patches/0370-Ignore-Dimension-NBT-field-in-Entity-data.patch rename to Spigot-Server-Patches/0368-Ignore-Dimension-NBT-field-in-Entity-data.patch index eca117bae..c3cf4ec74 100644 --- a/Spigot-Server-Patches/0370-Ignore-Dimension-NBT-field-in-Entity-data.patch +++ b/Spigot-Server-Patches/0368-Ignore-Dimension-NBT-field-in-Entity-data.patch @@ -1,4 +1,4 @@ -From 8adcfffd2be7a9ff13871063ae4849441c2c08b7 Mon Sep 17 00:00:00 2001 +From 5b9dec412f331eefc59865a3263542e3b2b9dc84 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Sep 2018 00:08:31 -0400 Subject: [PATCH] Ignore Dimension NBT field in Entity data @@ -14,10 +14,10 @@ DimensionManager set to the world it is being placed into. This fixes corrupt entities breaking chunk saving in custom worlds. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ee878191a..0f646ac7e 100644 +index 80e395b1a..f26056dd5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1721,7 +1721,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1719,7 +1719,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setAirTicks(nbttagcompound.getShort("Air")); this.onGround = nbttagcompound.getBoolean("OnGround"); if (nbttagcompound.hasKey("Dimension")) { @@ -27,5 +27,5 @@ index ee878191a..0f646ac7e 100644 this.invulnerable = nbttagcompound.getBoolean("Invulnerable"); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0371-Optimize-Light-Recalculations.patch b/Spigot-Server-Patches/0369-Optimize-Light-Recalculations.patch similarity index 88% rename from Spigot-Server-Patches/0371-Optimize-Light-Recalculations.patch rename to Spigot-Server-Patches/0369-Optimize-Light-Recalculations.patch index c88e3f218..15531b55f 100644 --- a/Spigot-Server-Patches/0371-Optimize-Light-Recalculations.patch +++ b/Spigot-Server-Patches/0369-Optimize-Light-Recalculations.patch @@ -1,4 +1,4 @@ -From d428c31d895dc94bca5040bb3fba384f4cd3139f Mon Sep 17 00:00:00 2001 +From 76e1fac06834b1d779a12d879a9d90cc0b6aa760 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Sep 2018 20:46:29 -0400 Subject: [PATCH] Optimize Light Recalculations @@ -14,10 +14,10 @@ Also optimizes to not repeatedly look up the same chunk for light lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6255aa285..9695af028 100644 +index 6d3f5b651..9ac594dcb 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -354,7 +354,7 @@ public class Chunk implements IChunkAccess { +@@ -353,7 +353,7 @@ public class Chunk implements IChunkAccess { private void a(int i, int j, int k, int l) { if (l > k && this.areNeighborsLoaded(1)) { // Paper for (int i1 = k; i1 < l; ++i1) { @@ -26,7 +26,7 @@ index 6255aa285..9695af028 100644 } this.x = true; -@@ -564,7 +564,7 @@ public class Chunk implements IChunkAccess { +@@ -563,7 +563,7 @@ public class Chunk implements IChunkAccess { } else { if (flag1) { this.initLighting(); @@ -36,10 +36,10 @@ index 6255aa285..9695af028 100644 int i1 = iblockdata.b(this.world, blockposition); int j1 = iblockdata1.b(this.world, blockposition); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d736ac63d..4421be836 100644 +index b5b0fcf8c..88f8145c4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -589,8 +589,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -584,8 +584,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } if (this.worldProvider.g()) { @@ -51,7 +51,7 @@ index d736ac63d..4421be836 100644 } } -@@ -2226,6 +2227,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2221,6 +2222,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) { // CraftBukkit start - Use neighbor cache instead of looking up Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); @@ -64,5 +64,5 @@ index d736ac63d..4421be836 100644 // CraftBukkit end return false; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0372-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0370-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch similarity index 88% rename from Spigot-Server-Patches/0372-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch rename to Spigot-Server-Patches/0370-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index 25a50091d..c61fbf8a9 100644 --- a/Spigot-Server-Patches/0372-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0370-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -1,4 +1,4 @@ -From 4efe8ec5c1de9ba28e8321dc77c8f05b6924c3c0 Mon Sep 17 00:00:00 2001 +From 2c9e9fcb11acd9f81fe8ecfd877f4c8f27bbac8d Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Sep 2018 21:49:53 -0400 Subject: [PATCH] Fix issues with entity loss due to unloaded chunks @@ -18,10 +18,10 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4421be836..d084787f1 100644 +index 88f8145c4..55cd98ae2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1079,7 +1079,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1074,7 +1074,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc int i = MathHelper.floor(entity.locX / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D); @@ -30,7 +30,7 @@ index 4421be836..d084787f1 100644 // Paper start - Set origin location when the entity is being added to the world if (entity.origin == null) { -@@ -1583,7 +1583,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1578,7 +1578,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); } @@ -40,5 +40,5 @@ index 4421be836..d084787f1 100644 } else { this.getChunkAt(i, k).a(entity); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0373-Don-t-recheck-type-after-setting-a-block.patch b/Spigot-Server-Patches/0371-Don-t-recheck-type-after-setting-a-block.patch similarity index 87% rename from Spigot-Server-Patches/0373-Don-t-recheck-type-after-setting-a-block.patch rename to Spigot-Server-Patches/0371-Don-t-recheck-type-after-setting-a-block.patch index 1e07a000c..280b22a8b 100644 --- a/Spigot-Server-Patches/0373-Don-t-recheck-type-after-setting-a-block.patch +++ b/Spigot-Server-Patches/0371-Don-t-recheck-type-after-setting-a-block.patch @@ -1,4 +1,4 @@ -From f88f14f5616b977e0de4424104e175bc90701c66 Mon Sep 17 00:00:00 2001 +From abab5932b172b4e8e62afbcf9f072831e95b91d3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Sep 2018 22:27:33 -0400 Subject: [PATCH] Don't recheck type after setting a block @@ -16,10 +16,10 @@ be having data corruption issues anyways. This provides a small boost to all setType calls. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9695af028..ccdc171d4 100644 +index 9ac594dcb..d9eb3e51b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -559,7 +559,7 @@ public class Chunk implements IChunkAccess { +@@ -558,7 +558,7 @@ public class Chunk implements IChunkAccess { this.world.n(blockposition); } @@ -29,5 +29,5 @@ index 9695af028..ccdc171d4 100644 } else { if (flag1) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0374-Fix-Sending-Chunks-to-Client.patch b/Spigot-Server-Patches/0372-Fix-Sending-Chunks-to-Client.patch similarity index 90% rename from Spigot-Server-Patches/0374-Fix-Sending-Chunks-to-Client.patch rename to Spigot-Server-Patches/0372-Fix-Sending-Chunks-to-Client.patch index 29032ce7e..d1228b10a 100644 --- a/Spigot-Server-Patches/0374-Fix-Sending-Chunks-to-Client.patch +++ b/Spigot-Server-Patches/0372-Fix-Sending-Chunks-to-Client.patch @@ -1,4 +1,4 @@ -From 3bcc6ac72694b340f1bae2c69802b6db1fd5d2b8 Mon Sep 17 00:00:00 2001 +From 7548eb21700bc84bb467885a29a09bb159ee8320 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 29 Sep 2018 01:18:16 -0400 Subject: [PATCH] Fix Sending Chunks to Client @@ -14,7 +14,7 @@ This fix always sends chunks to the client, and simply updates the client anytime post processing is triggered with the new chunk data. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2253092a9..811a63e04 100644 +index d9eb3e51b..e73149d4d 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1199,7 +1199,7 @@ public class Chunk implements IChunkAccess { @@ -41,10 +41,10 @@ index 2253092a9..811a63e04 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index e61538b3c..f5d971bbe 100644 +index e4cf8548d..ac5d15809 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -18,7 +18,7 @@ public class PlayerChunk { +@@ -20,7 +20,7 @@ public class PlayerChunk { private int dirtyCount; private int h; private long i; @@ -53,7 +53,7 @@ index e61538b3c..f5d971bbe 100644 boolean chunkExists; // Paper // Paper start PaperAsyncChunkProvider.CancellableChunkRequest chunkRequest; -@@ -144,6 +144,7 @@ public class PlayerChunk { +@@ -147,6 +147,7 @@ public class PlayerChunk { } } @@ -62,5 +62,5 @@ index e61538b3c..f5d971bbe 100644 if (this.done) { return true; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0375-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0373-Configurable-connection-throttle-kick-message.patch similarity index 95% rename from Spigot-Server-Patches/0375-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0373-Configurable-connection-throttle-kick-message.patch index 8bcfede59..822c1662f 100644 --- a/Spigot-Server-Patches/0375-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0373-Configurable-connection-throttle-kick-message.patch @@ -1,4 +1,4 @@ -From 6d01af39a8b3e43e67ef44b63b3e4eea992e842a Mon Sep 17 00:00:00 2001 +From 0a896ee1a0004c0575a55887b8f51665e78692e9 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 2 Oct 2018 09:57:50 +0100 Subject: [PATCH] Configurable connection throttle kick message @@ -21,7 +21,7 @@ index e8b03795f..5663a6517 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 25049a351..f923272a4 100644 +index e732d55f9..2c594b437 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -37,7 +37,7 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -34,5 +34,5 @@ index 25049a351..f923272a4 100644 this.b.close(chatmessage); return; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0376-Fix-FileIOThread-concurrency-issues.patch b/Spigot-Server-Patches/0374-Fix-FileIOThread-concurrency-issues.patch similarity index 81% rename from Spigot-Server-Patches/0376-Fix-FileIOThread-concurrency-issues.patch rename to Spigot-Server-Patches/0374-Fix-FileIOThread-concurrency-issues.patch index da4d6da67..b5b02f20a 100644 --- a/Spigot-Server-Patches/0376-Fix-FileIOThread-concurrency-issues.patch +++ b/Spigot-Server-Patches/0374-Fix-FileIOThread-concurrency-issues.patch @@ -1,4 +1,4 @@ -From 735de45cac6b82ec25348841a58a83c41f6ac9e4 Mon Sep 17 00:00:00 2001 +From d5f43cbf4f3216b3bdc8f527937ed13f4ce5bbe6 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 3 Oct 2018 19:04:53 +0100 Subject: [PATCH] Fix FileIOThread concurrency issues @@ -9,11 +9,11 @@ issues when this counter is updated from multiple threads, potentially causing these counters to desync due to the unsafe volatile update diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index 97917551a..1959bc066 100644 +index 3c688f546..570624600 100644 --- a/src/main/java/net/minecraft/server/FileIOThread.java +++ b/src/main/java/net/minecraft/server/FileIOThread.java -@@ -9,7 +9,7 @@ import org.apache.logging.log4j.Logger; - public class FileIOThread implements Runnable { +@@ -10,7 +10,7 @@ public class FileIOThread implements Runnable { + private static final Logger a = LogManager.getLogger(); private static final FileIOThread b = new FileIOThread(); - private final List c = Collections.synchronizedList(Lists.newArrayList()); @@ -21,15 +21,15 @@ index 97917551a..1959bc066 100644 private volatile long d; private volatile long e; private volatile boolean f; -@@ -72,7 +72,7 @@ public class FileIOThread implements Runnable { +@@ -75,7 +75,7 @@ public class FileIOThread implements Runnable { public void b() throws InterruptedException { this.f = true; -- while(this.d != this.e) { +- while (this.d != this.e) { + while(!this.getThreadedIOQueue().isEmpty()) { // Paper - check actual list size Thread.sleep(10L); } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0377-Don-t-update-snapshot-blockstates.patch b/Spigot-Server-Patches/0375-Don-t-update-snapshot-blockstates.patch similarity index 89% rename from Spigot-Server-Patches/0377-Don-t-update-snapshot-blockstates.patch rename to Spigot-Server-Patches/0375-Don-t-update-snapshot-blockstates.patch index c484ecfca..484e0efd8 100644 --- a/Spigot-Server-Patches/0377-Don-t-update-snapshot-blockstates.patch +++ b/Spigot-Server-Patches/0375-Don-t-update-snapshot-blockstates.patch @@ -1,11 +1,11 @@ -From 9b9f06d80de2155ed714b5fa9a4bd4711fc4b28f Mon Sep 17 00:00:00 2001 +From 4d84e269a9519668890005f18c0bdbdf0b170adc Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 5 Oct 2018 15:46:46 +1000 Subject: [PATCH] Don't update snapshot blockstates diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index d4d9c5fc5..f5c6dbd85 100644 +index 082a1b6e2..2b78fff9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -131,7 +131,11 @@ public class CraftBlockEntityState extends CraftBlockState @@ -22,5 +22,5 @@ index d4d9c5fc5..f5c6dbd85 100644 } } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0378-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0376-Hook-into-CB-plugin-rewrites.patch similarity index 99% rename from Spigot-Server-Patches/0378-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0376-Hook-into-CB-plugin-rewrites.patch index e06133538..de350eb24 100644 --- a/Spigot-Server-Patches/0378-Hook-into-CB-plugin-rewrites.patch +++ b/Spigot-Server-Patches/0376-Hook-into-CB-plugin-rewrites.patch @@ -1,4 +1,4 @@ -From 9b7e46b12fd7a2f30a3fcf16389f327333d44da7 Mon Sep 17 00:00:00 2001 +From fabdc3242791cbc82af3de15008cd8c9c99e70d4 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 3 Oct 2018 20:09:18 -0400 Subject: [PATCH] Hook into CB plugin rewrites @@ -187,5 +187,5 @@ index 875b4f77c..93e09e42f 100644 { if ( owner.equals( "org/bukkit/Material" ) ) -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0379-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0377-Allow-setting-the-vex-s-summoner.patch similarity index 92% rename from Spigot-Server-Patches/0379-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0377-Allow-setting-the-vex-s-summoner.patch index 319b52ab7..cbb5f377b 100644 --- a/Spigot-Server-Patches/0379-Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-Server-Patches/0377-Allow-setting-the-vex-s-summoner.patch @@ -1,11 +1,11 @@ -From 28baa8f8be9e47d530070d72a79781e61d3b54fa Mon Sep 17 00:00:00 2001 +From 1043f7c0b41618b160b04f1cb66a82fa8fc82168 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 21:47:44 -0500 Subject: [PATCH] Allow setting the vex's summoner diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 90028c802..6915e5d11 100644 +index c3864b869..589b13f4e 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java @@ -127,6 +127,7 @@ public class EntityVex extends EntityMonster { @@ -32,5 +32,5 @@ index 927ed9a9a..c23b1e960 100644 @Override -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0380-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0378-Add-LivingEntity-getTargetEntity.patch similarity index 91% rename from Spigot-Server-Patches/0380-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0378-Add-LivingEntity-getTargetEntity.patch index 57d869213..fcf80bbb7 100644 --- a/Spigot-Server-Patches/0380-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0378-Add-LivingEntity-getTargetEntity.patch @@ -1,14 +1,14 @@ -From e819add1bd9db4ae5bd4a089cbb822adce4f04d5 Mon Sep 17 00:00:00 2001 +From 22d4b81ba25bdc12d01a51f36099eb14376de6ae Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 22 Sep 2018 00:33:08 -0500 Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 19819b134..49228a884 100644 +index c5e541985..d6a5c7407 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -102,6 +102,7 @@ public class AxisAlignedBB { +@@ -95,6 +95,7 @@ public class AxisAlignedBB { return new AxisAlignedBB(d3, d4, d5, d6, d7, d8); } @@ -16,7 +16,7 @@ index 19819b134..49228a884 100644 public AxisAlignedBB b(double d0, double d1, double d2) { double d3 = this.minX; double d4 = this.minY; -@@ -130,6 +131,12 @@ public class AxisAlignedBB { +@@ -124,6 +125,12 @@ public class AxisAlignedBB { return new AxisAlignedBB(d3, d4, d5, d6, d7, d8); } @@ -29,7 +29,7 @@ index 19819b134..49228a884 100644 public AxisAlignedBB grow(double d0, double d1, double d2) { double d3 = this.minX - d0; double d4 = this.minY - d1; -@@ -184,6 +191,7 @@ public class AxisAlignedBB { +@@ -181,6 +188,7 @@ public class AxisAlignedBB { return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2; } @@ -37,19 +37,19 @@ index 19819b134..49228a884 100644 public boolean b(Vec3D vec3d) { return this.e(vec3d.x, vec3d.y, vec3d.z); } -@@ -207,6 +215,7 @@ public class AxisAlignedBB { +@@ -205,6 +213,7 @@ public class AxisAlignedBB { return this.g(-d0); } + public MovingObjectPosition calculateIntercept(Vec3D vec3d, Vec3D vec3d1) { return b(vec3d, vec3d1); } // Paper - OBFHELPER @Nullable public MovingObjectPosition b(Vec3D vec3d, Vec3D vec3d1) { - return this.a(vec3d, vec3d1, (BlockPosition)null); + return this.a(vec3d, vec3d1, (BlockPosition) null); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0f646ac7e..23e6f45bf 100644 +index f26056dd5..35715e434 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1519,6 +1519,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1517,6 +1517,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return new Vec3D((double) (f5 * f6), (double) (-f7), (double) (f4 * f6)); } @@ -57,7 +57,7 @@ index 0f646ac7e..23e6f45bf 100644 public Vec3D i(float f) { if (f == 1.0F) { return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ); -@@ -2182,10 +2183,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2180,10 +2181,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.bP().size() < 1; } @@ -71,7 +71,7 @@ index 0f646ac7e..23e6f45bf 100644 return this.d(this.pitch, this.yaw); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 46a4e37a2..34b649dad 100644 +index 60aaf0547..710ad8b17 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -130,16 +130,16 @@ index 46a4e37a2..34b649dad 100644 public int getShieldBlockingDelay() { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 42b3d3fc5..61806bbc4 100644 +index f6916fd45..71f08d53c 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java -@@ -18,6 +18,7 @@ public final class IEntitySelector { +@@ -19,6 +19,7 @@ public final class IEntitySelector { public static final Predicate e = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator() && !((EntityHuman)entity).u(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator() && !((EntityHuman) entity).u(); }; + public static Predicate notSpectator() { return f; } // Paper - OBFHELPER public static final Predicate f = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator(); }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index eeab59379..d6a4bc64a 100644 @@ -180,5 +180,5 @@ index eeab59379..d6a4bc64a 100644 public List getLastTwoTargetBlocks(Set transparent, int maxDistance) { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0381-Add-sun-related-API.patch b/Spigot-Server-Patches/0379-Add-sun-related-API.patch similarity index 85% rename from Spigot-Server-Patches/0381-Add-sun-related-API.patch rename to Spigot-Server-Patches/0379-Add-sun-related-API.patch index 2f702bd81..f51ac3b63 100644 --- a/Spigot-Server-Patches/0381-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0379-Add-sun-related-API.patch @@ -1,14 +1,14 @@ -From ccc5d9238cb4d5c5378e3d55e77ccb46b8cba678 Mon Sep 17 00:00:00 2001 +From b7ede6e38c6a03c3c9a2c2fb64b9ebfdea31b7d8 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:21 -0500 Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 877337eed..48c1ae624 100644 +index 8317ecea8..2aa49aaee 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1286,6 +1286,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1287,6 +1287,7 @@ public abstract class EntityInsentient extends EntityLiving { return flag; } @@ -17,10 +17,10 @@ index 877337eed..48c1ae624 100644 if (this.world.L() && !this.world.isClientSide) { float f = this.az(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9fc0d7576..c8a7f5e59 100644 +index 55cd98ae2..a186637f5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -827,6 +827,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -822,6 +822,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } } @@ -29,10 +29,10 @@ index 9fc0d7576..c8a7f5e59 100644 return this.G < 4; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 162ff3414..86e70f236 100644 +index b5a87cfaf..e33135ada 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -516,6 +516,12 @@ public class CraftWorld implements World { +@@ -538,6 +538,12 @@ public class CraftWorld implements World { } } diff --git a/Spigot-Server-Patches/0382-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0380-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 51% rename from Spigot-Server-Patches/0382-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0380-Check-Drowned-for-Villager-Aggression-Config.patch index 619a5cd31..73e28b9a3 100644 --- a/Spigot-Server-Patches/0382-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/Spigot-Server-Patches/0380-Check-Drowned-for-Villager-Aggression-Config.patch @@ -1,33 +1,22 @@ -From e9e073169b601fb69b07c4f7bd67bfb8c9227c43 Mon Sep 17 00:00:00 2001 +From a3bf6b21afb09af5d0da5b206897c8a05d65d1fa Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Wed, 10 Oct 2018 21:22:44 -0500 Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java -index 852b9e184..e34b54dc0 100644 +index b861c623c..0e2b5ee74 100644 --- a/src/main/java/net/minecraft/server/EntityDrowned.java +++ b/src/main/java/net/minecraft/server/EntityDrowned.java -@@ -27,7 +27,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { +@@ -28,7 +28,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[]{EntityDrowned.class})); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 10, true, false, new EntityDrowned.b(this))); -- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); -+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); // Paper - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityIronGolem.class, true)); - this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget(this, EntityTurtle.class, 10, true, false, EntityTurtle.bC)); + this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[] { EntityDrowned.class})); + this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, new EntityDrowned.b(this))); +- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillager.class, false)); ++ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillager.class, false)); + this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); + this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bC)); } -@@ -231,10 +231,6 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - return this.a.f(entityhuman); - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EntityHuman)object); -- } - } - - static class c extends PathfinderGoalGotoTarget { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0383-Here-s-Johnny.patch b/Spigot-Server-Patches/0381-Here-s-Johnny.patch similarity index 87% rename from Spigot-Server-Patches/0383-Here-s-Johnny.patch rename to Spigot-Server-Patches/0381-Here-s-Johnny.patch index ce809419e..60b7fefd1 100644 --- a/Spigot-Server-Patches/0383-Here-s-Johnny.patch +++ b/Spigot-Server-Patches/0381-Here-s-Johnny.patch @@ -1,21 +1,21 @@ -From c17f707a80a349d69269d8d601271939e46f0938 Mon Sep 17 00:00:00 2001 +From 20a985b804a500425a97750c6922f7bc7d78a141 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 01:37:22 -0500 Subject: [PATCH] Here's Johnny! diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index 597878e2c..4e59df891 100644 +index 96d0651e9..4bbb4817b 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java -@@ -4,7 +4,7 @@ import java.util.function.Predicate; - import javax.annotation.Nullable; +@@ -5,7 +5,7 @@ import javax.annotation.Nullable; public class EntityVindicator extends EntityIllagerAbstract { + - private boolean b; + private boolean b; public boolean isJohnny() { return b; } public void setJohnny(boolean johnny) { b = johnny; } // Paper - OBFHELPER private static final Predicate c = (entity) -> { - return entity instanceof EntityLiving && ((EntityLiving)entity).df(); + return entity instanceof EntityLiving && ((EntityLiving) entity).df(); }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java index 951d47929..5ff957ced 100644 @@ -37,5 +37,5 @@ index 951d47929..5ff957ced 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0384-Turtle-API.patch b/Spigot-Server-Patches/0382-Turtle-API.patch similarity index 98% rename from Spigot-Server-Patches/0384-Turtle-API.patch rename to Spigot-Server-Patches/0382-Turtle-API.patch index 0a63e1d3c..285fe5e6d 100644 --- a/Spigot-Server-Patches/0384-Turtle-API.patch +++ b/Spigot-Server-Patches/0382-Turtle-API.patch @@ -1,11 +1,11 @@ -From 9786725c7596e78454e9493e39d103ce405526c2 Mon Sep 17 00:00:00 2001 +From 9f23307fb6ef86d5e7cf675ab1bf4a01af64f619 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 29 Sep 2018 16:08:23 -0500 Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 6c4ffbf8f..2484bd272 100644 +index b016e0ae7..a533e0eb5 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal { @@ -153,5 +153,5 @@ index 123a2c75c..8edcf7af6 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0385-Fire-EntityCombustEvent-for-phantoms.patch b/Spigot-Server-Patches/0383-Fire-EntityCombustEvent-for-phantoms.patch similarity index 83% rename from Spigot-Server-Patches/0385-Fire-EntityCombustEvent-for-phantoms.patch rename to Spigot-Server-Patches/0383-Fire-EntityCombustEvent-for-phantoms.patch index 7dcaf7ed2..7111f5909 100644 --- a/Spigot-Server-Patches/0385-Fire-EntityCombustEvent-for-phantoms.patch +++ b/Spigot-Server-Patches/0383-Fire-EntityCombustEvent-for-phantoms.patch @@ -1,14 +1,14 @@ -From b1d82c1797ab63209d5a318cc9deec15a64cf048 Mon Sep 17 00:00:00 2001 +From 60efbfb73f94b2855adf910e7c5d5617ad4bf4a9 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 13 Oct 2018 22:29:17 +0200 Subject: [PATCH] Fire EntityCombustEvent for phantoms diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 7a48719c9..d7be396ee 100644 +index f576264a8..7db0d62df 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -106,7 +106,12 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -104,7 +104,12 @@ public class EntityPhantom extends EntityFlying implements IMonster { public void movementTick() { if (this.dq()) { @@ -23,5 +23,5 @@ index 7a48719c9..d7be396ee 100644 super.movementTick(); -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0386-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0384-Limit-lightning-strike-effect-distance.patch similarity index 95% rename from Spigot-Server-Patches/0386-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0384-Limit-lightning-strike-effect-distance.patch index f0b0700ce..d8770afdf 100644 --- a/Spigot-Server-Patches/0386-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0384-Limit-lightning-strike-effect-distance.patch @@ -1,4 +1,4 @@ -From 19a846af322a5b7aef506f0d614829c62219f055 Mon Sep 17 00:00:00 2001 +From 8d9ddb839749ad2de242ca3ff21cf60d90fdde4a Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance @@ -38,7 +38,7 @@ index 94c544714..48920b045 100644 public boolean firePhysicsEventForRedstone = false; private void firePhysicsEventForRedstone() { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index afbe43dd3..d732be52e 100644 +index 7781babf5..50f620009 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -60,6 +60,17 @@ public class EntityLightning extends EntityWeather { @@ -69,10 +69,10 @@ index afbe43dd3..d732be52e 100644 --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 27c8a97be..63c802d02 100644 +index 82cfd694a..078399aa0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1088,7 +1088,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1071,7 +1071,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } // CraftBukkit end if (super.strikeLightning(entity)) { @@ -82,5 +82,5 @@ index 27c8a97be..63c802d02 100644 } else { return false; -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0387-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0385-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 92% rename from Spigot-Server-Patches/0387-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0385-Implement-getters-and-setters-for-EntityItem-owner-a.patch index 3b0082499..18b07e192 100644 --- a/Spigot-Server-Patches/0387-Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ b/Spigot-Server-Patches/0385-Implement-getters-and-setters-for-EntityItem-owner-a.patch @@ -1,4 +1,4 @@ -From 7be795a007b6995f5027cbc6c2960b43c60d9f80 Mon Sep 17 00:00:00 2001 +From c817217093eab4f213b32058356b047824c256d1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 20:54:23 -0500 Subject: [PATCH] Implement getters and setters for EntityItem owner and @@ -6,7 +6,7 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 7264773ef..890342baa 100644 +index d11e4d3d8..dc0f38ddf 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -410,20 +410,22 @@ public class EntityItem extends Entity { @@ -37,7 +37,7 @@ index 7264773ef..890342baa 100644 this.f = uuid; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 1df17f09b..25666792e 100644 +index 6036592f7..4128ba4c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -9,6 +9,11 @@ import org.bukkit.inventory.ItemStack; @@ -52,7 +52,7 @@ index 1df17f09b..25666792e 100644 public class CraftItem extends CraftEntity implements Item { private final EntityItem item; -@@ -45,6 +50,24 @@ public class CraftItem extends CraftEntity implements Item { +@@ -53,6 +58,24 @@ public class CraftItem extends CraftEntity implements Item { public void setCanMobPickup(boolean canMobPickup) { item.canMobPickup = canMobPickup; } @@ -78,5 +78,5 @@ index 1df17f09b..25666792e 100644 @Override -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0388-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0386-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 94% rename from Spigot-Server-Patches/0388-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0386-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index b9847c147..f3f5431ab 100644 --- a/Spigot-Server-Patches/0388-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/Spigot-Server-Patches/0386-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -1,4 +1,4 @@ -From db692abcbb280881383faf0642f610e626708fa9 Mon Sep 17 00:00:00 2001 +From 0f2bde13961395f66bdd2c1b0542e28246c950a9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 17 Oct 2018 19:17:27 -0400 Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles @@ -11,7 +11,7 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 8d41efe8f..0e6dae8cd 100644 +index 62b5b6ece..60ab1c751 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -250,11 +250,21 @@ public abstract class EntityProjectile extends Entity implements IProjectile { @@ -38,5 +38,5 @@ index 8d41efe8f..0e6dae8cd 100644 } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0389-Call-player-spectator-target-events.patch b/Spigot-Server-Patches/0387-Call-player-spectator-target-events.patch similarity index 93% rename from Spigot-Server-Patches/0389-Call-player-spectator-target-events.patch rename to Spigot-Server-Patches/0387-Call-player-spectator-target-events.patch index 502bb4332..fb1eca0c6 100644 --- a/Spigot-Server-Patches/0389-Call-player-spectator-target-events.patch +++ b/Spigot-Server-Patches/0387-Call-player-spectator-target-events.patch @@ -1,14 +1,14 @@ -From e1120a8ca023f46b28a8ff0570054a7f979ffb39 Mon Sep 17 00:00:00 2001 +From 47a84d9836f0c27cec91c4ccfbc9414979c2f73d Mon Sep 17 00:00:00 2001 From: Caleb Bassham Date: Fri, 28 Sep 2018 02:32:19 -0500 Subject: [PATCH] Call player spectator target events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b5d48e7bf..2679c2358 100644 +index 00c2072d7..bd768e170 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 { +@@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private EntityHuman.EnumChatVisibility cs; private boolean ct = true; private long cu = SystemUtils.getMonotonicMillis(); @@ -17,7 +17,7 @@ index b5d48e7bf..2679c2358 100644 public boolean worldChangeInvuln; private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER private final RecipeBookServer recipeBook; -@@ -1375,15 +1375,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1377,15 +1377,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } @@ -59,5 +59,5 @@ index b5d48e7bf..2679c2358 100644 protected void E() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0390-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0388-Add-Velocity-IP-Forwarding-Support.patch similarity index 94% rename from Spigot-Server-Patches/0390-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0388-Add-Velocity-IP-Forwarding-Support.patch index 0d44476b6..b87877943 100644 --- a/Spigot-Server-Patches/0390-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0388-Add-Velocity-IP-Forwarding-Support.patch @@ -1,4 +1,4 @@ -From 5c4f83db89354862564c17f9f65a37c3a9b7c31b Mon Sep 17 00:00:00 2001 +From 9b6d8f241cdc61db42937a7942d56c6bbe50890a Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 8 Oct 2018 14:36:14 -0400 Subject: [PATCH] Add Velocity IP Forwarding Support @@ -127,10 +127,10 @@ index 000000000..fdd8708f9 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 64d2b8aec..95d34fbfe 100644 +index c5801122d..ca76f2a38 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -43,6 +43,7 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener, ITickable { private SecretKey loginKey; private EntityPlayer l; public String hostname = ""; // CraftBukkit - add field @@ -138,7 +138,7 @@ index 64d2b8aec..95d34fbfe 100644 public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { this.g = LoginListener.EnumProtocolState.HELLO; -@@ -187,6 +188,14 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -186,6 +187,14 @@ public class LoginListener implements PacketLoginInListener, ITickable { this.g = LoginListener.EnumProtocolState.KEY; this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.E().getPublic(), this.e)); } else { @@ -153,7 +153,7 @@ index 64d2b8aec..95d34fbfe 100644 // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -278,6 +287,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -277,6 +286,12 @@ public class LoginListener implements PacketLoginInListener, ITickable { public class LoginHandler { public void fireEvents() throws Exception { @@ -166,7 +166,7 @@ index 64d2b8aec..95d34fbfe 100644 String playerName = i.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); -@@ -325,6 +340,35 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -324,6 +339,35 @@ public class LoginListener implements PacketLoginInListener, ITickable { // Spigot end public void a(PacketLoginInCustomPayload packetloginincustompayload) { @@ -203,10 +203,10 @@ index 64d2b8aec..95d34fbfe 100644 } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e5cc77c6d..120416b30 100644 +index 4c1110479..c53697914 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -47,7 +47,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -46,7 +46,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { private final Queue packetQueue = Queues.newConcurrentLinkedQueue(); private final Queue getPacketQueue() { return this.packetQueue; } // Paper - OBFHELPER private final ReentrantReadWriteLock j = new ReentrantReadWriteLock(); public Channel channel; @@ -244,27 +244,27 @@ index b95836d44..621aad150 100644 int j = this.g(); diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -index e3c0094f7..edfd4a506 100644 +index bdac03da4..430445cc6 100644 --- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -@@ -3,8 +3,8 @@ package net.minecraft.server; - import java.io.IOException; +@@ -4,8 +4,8 @@ import java.io.IOException; public class PacketLoginInCustomPayload implements Packet { + - private int a; - private PacketDataSerializer b; + private int a; public int getId() { return a; } // Paper - OBFHELPER + private PacketDataSerializer b; public PacketDataSerializer getBuf() { return b; } // Paper - OBFHELPER - public PacketLoginInCustomPayload() { - } + public PacketLoginInCustomPayload() {} + diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java -index 9c5559ece..9de0421bb 100644 +index 345843a7f..23c96f44b 100644 --- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java @@ -10,6 +10,14 @@ public class PacketLoginOutCustomPayload implements Packet Date: Fri, 12 Oct 2018 14:10:46 -0500 Subject: [PATCH] Add more Witch API diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index f334ad88d..e3c77839b 100644 +index feedfc9d9..955e0e19b 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -1,5 +1,11 @@ @@ -136,5 +136,5 @@ index f25998eb6..ac465bda2 100644 + // Paper end } -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0392-Fix-MC-93764.patch b/Spigot-Server-Patches/0390-Fix-MC-93764.patch similarity index 71% rename from Spigot-Server-Patches/0392-Fix-MC-93764.patch rename to Spigot-Server-Patches/0390-Fix-MC-93764.patch index a145a08cd..a924b0c9a 100644 --- a/Spigot-Server-Patches/0392-Fix-MC-93764.patch +++ b/Spigot-Server-Patches/0390-Fix-MC-93764.patch @@ -1,22 +1,22 @@ -From 035e7e8af36cbd056ec50daa9d7dcf5e69515a58 Mon Sep 17 00:00:00 2001 +From f6792a4755e3b3f72790db6413d73cd6700eeada Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 19 Oct 2018 19:38:45 -0500 Subject: [PATCH] Fix MC-93764 diff --git a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java -index 54ca83286..0c854170c 100644 +index 99191f09f..4d692b7e0 100644 --- a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java +++ b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java -@@ -25,7 +25,7 @@ public class WorldProviderTheEnd extends WorldProvider { +@@ -27,7 +27,7 @@ public class WorldProviderTheEnd extends WorldProvider { } - public float a(long var1, float var3) { + public float a(long i, float f) { - return 0.0F; + return 0.5F; // Paper - fix MC-93764 } public boolean canRespawn() { -- -2.20.0 +2.20.1 diff --git a/Spigot-Server-Patches/0393-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0391-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 93% rename from Spigot-Server-Patches/0393-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0391-Add-option-to-prevent-players-from-moving-into-unloa.patch index 5b8becc24..379b945b6 100644 --- a/Spigot-Server-Patches/0393-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0391-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -1,4 +1,4 @@ -From 8964e2d4d208ad60e4f8373c32c062401d9f1c5f Mon Sep 17 00:00:00 2001 +From 6a82bca7e80c2fcde22d2fba3a1d399e73201b98 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Mon, 22 Oct 2018 17:34:10 +0200 Subject: [PATCH] Add option to prevent players from moving into unloaded @@ -20,10 +20,10 @@ index 48920b045..77368b17a 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f2f977fff..96db9121b 100644 +index 8899ad0f6..f78c6e991 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -342,6 +342,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -341,6 +341,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -37,7 +37,7 @@ index f2f977fff..96db9121b 100644 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) { // CraftBukkit end PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); -@@ -849,9 +856,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -848,9 +855,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { double d1 = this.player.locY; double d2 = this.player.locZ; double d3 = this.player.locY; @@ -49,7 +49,7 @@ index f2f977fff..96db9121b 100644 float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; -@@ -891,6 +898,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -890,6 +897,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { speed = player.abilities.walkSpeed * 10f; } diff --git a/Spigot-Server-Patches/0394-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0392-Reset-players-airTicks-on-respawn.patch similarity index 80% rename from Spigot-Server-Patches/0394-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0392-Reset-players-airTicks-on-respawn.patch index 41674c8bc..970c362cb 100644 --- a/Spigot-Server-Patches/0394-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0392-Reset-players-airTicks-on-respawn.patch @@ -1,14 +1,14 @@ -From 6d31f1bc406ebb30036e805af520eecd4f6b1386 Mon Sep 17 00:00:00 2001 +From 907c7f46d7b33852e40409840a1baaf0d44cba52 Mon Sep 17 00:00:00 2001 From: GreenMeanie Date: Sat, 20 Oct 2018 22:34:02 -0400 Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4f6e67915..9eeb73d67 100644 +index 35715e434..9f9eaf25c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2334,7 +2334,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2332,7 +2332,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -18,10 +18,10 @@ index 4f6e67915..9eeb73d67 100644 } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2679c2358..d04570171 100644 +index bd768e170..71c4ed8fa 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1618,6 +1618,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1620,6 +1620,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0395-Strip-private-area-unicode-characters-from-signs.patch b/Spigot-Server-Patches/0393-Strip-private-area-unicode-characters-from-signs.patch similarity index 98% rename from Spigot-Server-Patches/0395-Strip-private-area-unicode-characters-from-signs.patch rename to Spigot-Server-Patches/0393-Strip-private-area-unicode-characters-from-signs.patch index 8fe1bbbc7..a557fcd45 100644 --- a/Spigot-Server-Patches/0395-Strip-private-area-unicode-characters-from-signs.patch +++ b/Spigot-Server-Patches/0393-Strip-private-area-unicode-characters-from-signs.patch @@ -1,4 +1,4 @@ -From 42425d017e77310ab50c65a34bce0820810c701b Mon Sep 17 00:00:00 2001 +From 54b96c7ea2c69eb51a3decdf721943bec037bf80 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 23 Oct 2018 20:53:43 -0400 Subject: [PATCH] Strip private area unicode characters from signs diff --git a/Spigot-Server-Patches/0396-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0394-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 95% rename from Spigot-Server-Patches/0396-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0394-Don-t-sleep-after-profile-lookups-if-not-needed.patch index 021092b34..8191f426b 100644 --- a/Spigot-Server-Patches/0396-Don-t-sleep-after-profile-lookups-if-not-needed.patch +++ b/Spigot-Server-Patches/0394-Don-t-sleep-after-profile-lookups-if-not-needed.patch @@ -1,4 +1,4 @@ -From 5b3d32951a03785299c87ad545b1b8280ab5e239 Mon Sep 17 00:00:00 2001 +From 2dda9fa6e36c192311963e21356e6af463a87d64 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 20:25:05 -0400 Subject: [PATCH] Don't sleep after profile lookups if not needed diff --git a/Spigot-Server-Patches/0397-Use-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/0395-Use-more-reasonable-thread-count-default-for-bootstr.patch similarity index 87% rename from Spigot-Server-Patches/0397-Use-more-reasonable-thread-count-default-for-bootstr.patch rename to Spigot-Server-Patches/0395-Use-more-reasonable-thread-count-default-for-bootstr.patch index 897c163ac..8b07b21f4 100644 --- a/Spigot-Server-Patches/0397-Use-more-reasonable-thread-count-default-for-bootstr.patch +++ b/Spigot-Server-Patches/0395-Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -1,14 +1,14 @@ -From 4a703c9cefecaf88cd005f9895443ba79faf61d8 Mon Sep 17 00:00:00 2001 +From 90145191418bebaa18678e1c7172ca505326f227 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 23:14:38 -0400 Subject: [PATCH] Use more reasonable thread count default for bootstrap diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java -index 13f237ec4..012d878cb 100644 +index ee40bccf6..db9af361d 100644 --- a/src/main/java/net/minecraft/server/DataConverterRegistry.java +++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java -@@ -22,7 +22,7 @@ public class DataConverterRegistry { +@@ -21,7 +21,7 @@ public class DataConverterRegistry { a(datafixerbuilder); // CraftBukkit start diff --git a/Spigot-Server-Patches/0398-Use-EntityTypes-for-living-entities.patch b/Spigot-Server-Patches/0396-Use-EntityTypes-for-living-entities.patch similarity index 84% rename from Spigot-Server-Patches/0398-Use-EntityTypes-for-living-entities.patch rename to Spigot-Server-Patches/0396-Use-EntityTypes-for-living-entities.patch index b95c96504..1e6b26ebc 100644 --- a/Spigot-Server-Patches/0398-Use-EntityTypes-for-living-entities.patch +++ b/Spigot-Server-Patches/0396-Use-EntityTypes-for-living-entities.patch @@ -1,4 +1,4 @@ -From e7ba701585566280af85db40fcf861248e03ef75 Mon Sep 17 00:00:00 2001 +From 2c033e9736a0e3726126d35a7cbd0b0731cffadf Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Thu, 4 Oct 2018 10:08:02 -0500 Subject: [PATCH] Use EntityTypes for living entities @@ -66,18 +66,18 @@ index 93bf32dc1..e6063bb46 100644 entitywither.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.55D, (double) blockposition2.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 09ad5a3ca..41e599b26 100644 +index aad7ce93f..09eabf123 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java -@@ -361,7 +361,7 @@ public class EnderDragonBattle { +@@ -412,7 +412,7 @@ public class EnderDragonBattle { private EntityEnderDragon n() { this.d.getChunkAtWorldCoords(new BlockPosition(0, 128, 0)); - EntityEnderDragon entityenderdragon = new EntityEnderDragon(this.d); + EntityEnderDragon entityenderdragon = EntityTypes.ENDER_DRAGON.create(this.d); // Paper + entityenderdragon.getDragonControllerManager().setControllerPhase(DragonControllerPhase.HOLDING_PATTERN); entityenderdragon.setPositionRotation(0.0D, 128.0D, 0.0D, this.d.random.nextFloat() * 360.0F, 0.0F); - this.d.addEntity(entityenderdragon); diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java index ee159e0a8..070a9e7b1 100644 --- a/src/main/java/net/minecraft/server/EntityChicken.java @@ -118,87 +118,89 @@ index 961afa5c4..a372f6508 100644 entityendermite.setPlayerSpawned(true); entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch); diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index c2c4f97e2..f510696e1 100644 +index 963b6fbb9..fc20bbe27 100644 --- a/src/main/java/net/minecraft/server/EntityEvoker.java +++ b/src/main/java/net/minecraft/server/EntityEvoker.java -@@ -221,7 +221,7 @@ public class EntityEvoker extends EntityIllagerWizard { +@@ -188,8 +188,7 @@ public class EntityEvoker extends EntityIllagerWizard { protected void j() { - for(int i = 0; i < 3; ++i) { + for (int i = 0; i < 3; ++i) { BlockPosition blockposition = (new BlockPosition(EntityEvoker.this)).a(-2 + EntityEvoker.this.random.nextInt(5), 1, -2 + EntityEvoker.this.random.nextInt(5)); - EntityVex entityvex = new EntityVex(EntityEvoker.this.world); +- + EntityVex entityvex = EntityTypes.VEX.create(EntityEvoker.this.world); // Paper entityvex.setPositionRotation(blockposition, 0.0F, 0.0F); - entityvex.prepare(EntityEvoker.this.world.getDamageScaler(blockposition), (GroupDataEntity)null, (NBTTagCompound)null); - entityvex.a(EntityEvoker.this); + entityvex.prepare(EntityEvoker.this.world.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null); + entityvex.a((EntityInsentient) EntityEvoker.this); diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index 51a07311f..f20196388 100644 +index 4e8a97c55..1b9425f3e 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -205,10 +205,10 @@ public class EntityHorse extends EntityHorseAbstract { - public EntityAgeable createChild(EntityAgeable entityageable) { +@@ -208,11 +208,11 @@ public class EntityHorse extends EntityHorseAbstract { Object object; + if (entityageable instanceof EntityHorseDonkey) { - object = new EntityHorseMule(this.world); + object = EntityTypes.MULE.create(world); // Paper } else { - EntityHorse entityhorse1 = (EntityHorse)entityageable; + EntityHorse entityhorse = (EntityHorse) entityageable; + - object = new EntityHorse(this.world); + object = EntityTypes.HORSE.create(world); // Paper - int j = this.random.nextInt(9); - int i; - if (j < 4) { + int i = this.random.nextInt(9); + int j; + diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -index 50c0a8277..627ba1038 100644 +index 72eed22eb..65c40e72b 100644 --- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java +++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -@@ -38,7 +38,7 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { +@@ -33,7 +33,7 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { } public EntityAgeable createChild(EntityAgeable entityageable) { - Object object = entityageable instanceof EntityHorse ? new EntityHorseMule(this.world) : new EntityHorseDonkey(this.world); + Object object = entityageable instanceof EntityHorse ? EntityTypes.MULE.create(world) : EntityTypes.DONKEY.create(world); // Paper - this.a(entityageable, (EntityHorseAbstract)object); - return (EntityAgeable)object; - } + + this.a(entityageable, (EntityHorseAbstract) object); + return (EntityAgeable) object; diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 2c0cac674..e2af18326 100644 +index eae2b2665..0a092acdf 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java @@ -134,7 +134,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { @Nullable - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityHorseSkeleton(this.world); + return EntityTypes.SKELETON_HORSE.create(world); // Paper } public boolean a(EntityHuman entityhuman, EnumHand enumhand) { diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java -index 560eac4af..4b928d2c7 100644 +index c23bc72fc..a1873f557 100644 --- a/src/main/java/net/minecraft/server/EntityHorseZombie.java +++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java -@@ -40,7 +40,7 @@ public class EntityHorseZombie extends EntityHorseAbstract { +@@ -41,7 +41,7 @@ public class EntityHorseZombie extends EntityHorseAbstract { @Nullable - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityHorseZombie(this.world); + return EntityTypes.ZOMBIE_HORSE.create(world); // Paper } public boolean a(EntityHuman entityhuman, EnumHand enumhand) { diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 22cea8552..ac7f37e4b 100644 +index 5e1976871..82a32c61e 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -272,7 +272,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn +@@ -285,7 +285,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn } public EntityLlama createChild(EntityAgeable entityageable) { -- EntityLlama entityllama1 = new EntityLlama(this.world); -+ EntityLlama entityllama1 = EntityTypes.LLAMA.create(world); // Paper - this.a(entityageable, entityllama1); - EntityLlama entityllama2 = (EntityLlama)entityageable; - int i = this.random.nextInt(Math.max(this.getStrength(), entityllama2.getStrength())) + 1; +- EntityLlama entityllama = new EntityLlama(this.world); ++ EntityLlama entityllama = EntityTypes.LLAMA.create(world); // Paper + + this.a(entityageable, (EntityHorseAbstract) entityllama); + EntityLlama entityllama1 = (EntityLlama) entityageable; diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java index dde9f1e61..638dbe978 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -222,7 +224,7 @@ index dde9f1e61..638dbe978 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index c83f71401..34e860b4c 100644 +index ba074c10c..13c84bda8 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -154,7 +154,7 @@ public class EntityOcelot extends EntityTameableAnimal { @@ -266,20 +268,20 @@ index 9dc2d8be2..d1689dc33 100644 public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java -index b9124a5b0..cb3e45f14 100644 +index a02020d5f..dbb534c9c 100644 --- a/src/main/java/net/minecraft/server/EntityPolarBear.java +++ b/src/main/java/net/minecraft/server/EntityPolarBear.java -@@ -15,7 +15,7 @@ public class EntityPolarBear extends EntityAnimal { +@@ -18,7 +18,7 @@ public class EntityPolarBear extends EntityAnimal { } - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityPolarBear(this.world); + return EntityTypes.POLAR_BEAR.create(world); // Paper } - public boolean f(ItemStack var1) { + public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java -index 7ee1b88f6..9605a50ae 100644 +index e545b1c9b..d6bac06a7 100644 --- a/src/main/java/net/minecraft/server/EntityRabbit.java +++ b/src/main/java/net/minecraft/server/EntityRabbit.java @@ -251,7 +251,7 @@ public class EntityRabbit extends EntityAnimal { @@ -292,10 +294,10 @@ index 7ee1b88f6..9605a50ae 100644 if (this.random.nextInt(20) != 0) { diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java -index b3586cd41..c0950116b 100644 +index f7a25c148..c35d1eef4 100644 --- a/src/main/java/net/minecraft/server/EntitySheep.java +++ b/src/main/java/net/minecraft/server/EntitySheep.java -@@ -249,7 +249,7 @@ public class EntitySheep extends EntityAnimal { +@@ -247,7 +247,7 @@ public class EntitySheep extends EntityAnimal { public EntitySheep createChild(EntityAgeable entityageable) { EntitySheep entitysheep = (EntitySheep) entityageable; @@ -305,7 +307,7 @@ index b3586cd41..c0950116b 100644 entitysheep1.setColor(this.a((EntityAnimal) this, (EntityAnimal) entitysheep)); return entitysheep1; diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java -index 361c7831e..e46340e66 100644 +index a42b8d554..9ef1c9baf 100644 --- a/src/main/java/net/minecraft/server/EntitySpider.java +++ b/src/main/java/net/minecraft/server/EntitySpider.java @@ -111,7 +111,7 @@ public class EntitySpider extends EntityMonster { @@ -318,7 +320,7 @@ index 361c7831e..e46340e66 100644 entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F); entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 2484bd272..fbe504737 100644 +index a533e0eb5..270b95082 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -218,7 +218,7 @@ public class EntityTurtle extends EntityAnimal { @@ -331,7 +333,7 @@ index 2484bd272..fbe504737 100644 public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 6b6fbfd79..29d5ef4c1 100644 +index d74bfa120..24ca35119 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -269,6 +269,7 @@ public class EntityTypes { @@ -343,10 +345,10 @@ index 6b6fbfd79..29d5ef4c1 100644 public T a(World world) { return this.aT.apply(world); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 2b2a6afb0..b2fb4af05 100644 +index f01e776fe..40b3ffd8c 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -593,7 +593,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -592,7 +592,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { } public EntityVillager createChild(EntityAgeable entityageable) { @@ -355,7 +357,7 @@ index 2b2a6afb0..b2fb4af05 100644 entityvillager.prepare(this.world.getDamageScaler(new BlockPosition(entityvillager)), (GroupDataEntity) null, (NBTTagCompound) null); return entityvillager; -@@ -605,7 +605,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -604,7 +604,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { public void onLightningStrike(EntityLightning entitylightning) { if (!this.world.isClientSide && !this.dead) { @@ -365,10 +367,10 @@ index 2b2a6afb0..b2fb4af05 100644 // Paper start if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) { diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java -index 9599d6fa0..5f3d3e472 100644 +index 4f1696d01..46d8e0a1f 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java -@@ -343,7 +343,7 @@ public class EntityWolf extends EntityTameableAnimal { +@@ -342,7 +342,7 @@ public class EntityWolf extends EntityTameableAnimal { } public EntityWolf createChild(EntityAgeable entityageable) { @@ -378,7 +380,7 @@ index 9599d6fa0..5f3d3e472 100644 if (uuid != null) { diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 40abea29c..f25bcfd8f 100644 +index 33b343c14..92ad1ad15 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -216,7 +216,7 @@ public class EntityZombie extends EntityMonster { @@ -431,7 +433,7 @@ index 85d402965..0cca7b6d5 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index 17b9fd6dd..070c9c4c1 100644 +index 86e5fbcda..fb96743af 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -118,7 +118,7 @@ public class EntityZombieVillager extends EntityZombie { @@ -444,7 +446,7 @@ index 17b9fd6dd..070c9c4c1 100644 entityvillager.u(this); entityvillager.setProfession(this.getProfession()); diff --git a/src/main/java/net/minecraft/server/ItemArmorStand.java b/src/main/java/net/minecraft/server/ItemArmorStand.java -index 9e4078148..a4fab5c23 100644 +index 576b3c565..4dd0e39ec 100644 --- a/src/main/java/net/minecraft/server/ItemArmorStand.java +++ b/src/main/java/net/minecraft/server/ItemArmorStand.java @@ -34,7 +34,7 @@ public class ItemArmorStand extends Item { @@ -492,7 +494,7 @@ index d4fdcbdfd..887e4461f 100644 entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null); entityskeleton.setPosition(entityhorseabstract.locX, entityhorseabstract.locY, entityhorseabstract.locZ); diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 560edb523..f9b58b972 100644 +index 0ac1fb53a..509d62f6b 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -134,7 +134,7 @@ public class VillageSiege { @@ -505,85 +507,59 @@ index 560edb523..f9b58b972 100644 } catch (Exception exception) { exception.printStackTrace(); diff --git a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java -index d53911594..83f55adba 100644 +index 94b21693e..0a223cfe5 100644 --- a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java -@@ -174,7 +174,7 @@ public class WorldGenEndCityPieces { - if (i > 8) { - return false; - } else { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile error - if (worldgenendcitypieces$piecegenerator.a(definedstructuremanager, i, worldgenendcitypieces$piece, blockposition, arraylist, random)) { - boolean flag = false; - int j = random.nextInt(); -@@ -243,7 +243,7 @@ public class WorldGenEndCityPieces { +@@ -270,7 +270,7 @@ public class WorldGenEndCityPieces { TileEntityLootable.a(generatoraccess, random, blockposition1, LootTables.c); } } else if (s.startsWith("Sentry")) { - EntityShulker entityshulker = new EntityShulker(generatoraccess.getMinecraftWorld()); + EntityShulker entityshulker = EntityTypes.SHULKER.create(generatoraccess.getMinecraftWorld()); // Paper - entityshulker.setPosition((double)blockposition.getX() + 0.5D, (double)blockposition.getY() + 0.5D, (double)blockposition.getZ() + 0.5D); + + entityshulker.setPosition((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D); entityshulker.g(blockposition); - generatoraccess.addEntity(entityshulker); diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java -index a542e581c..a64fef39d 100644 +index 2def56b06..abeb4aa02 100644 --- a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java -@@ -146,7 +146,7 @@ public class WorldGenFeatureOceanRuinPieces { - ((TileEntityChest)tileentity).setLootTable(this.h ? LootTables.q : LootTables.p, random.nextLong()); +@@ -154,8 +154,7 @@ public class WorldGenFeatureOceanRuinPieces { + ((TileEntityChest) tileentity).setLootTable(this.h ? LootTables.q : LootTables.p, random.nextLong()); } } else if ("drowned".equals(s)) { - EntityDrowned entitydrowned = new EntityDrowned(generatoraccess.getMinecraftWorld()); +- + EntityDrowned entitydrowned = EntityTypes.DROWNED.create(generatoraccess.getMinecraftWorld()); // Paper entitydrowned.di(); entitydrowned.setPositionRotation(blockposition, 0.0F, 0.0F); - entitydrowned.prepare(generatoraccess.getDamageScaler(blockposition), (GroupDataEntity)null, (NBTTagCompound)null); + entitydrowned.prepare(generatoraccess.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java -index 6ab249ee7..c9a17e332 100644 +index 0e7aed09d..493a86e1b 100644 --- a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java -@@ -37,7 +37,7 @@ public class WorldGenMonumentPieces { - protected static final IBlockData d = b; +@@ -1800,7 +1800,7 @@ public class WorldGenMonumentPieces { + protected static final IBlockData d = WorldGenMonumentPieces.WorldGenMonumentPiece.b; protected static final IBlockData e = Blocks.SEA_LANTERN.getBlockData(); protected static final IBlockData f = Blocks.WATER.getBlockData(); -- protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(f.getBlock()).build(); -+ protected static final Set g = new ImmutableSet.Builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(f.getBlock()).build(); // Paper - decompile error +- protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(WorldGenMonumentPieces.WorldGenMonumentPiece.f.getBlock()).build(); ++ protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(WorldGenMonumentPieces.WorldGenMonumentPiece.f.getBlock()).build(); // Paper - decompile fix protected static final int h = b(2, 0, 0); protected static final int i = b(2, 2, 0); protected static final int j = b(0, 1, 0); -@@ -158,7 +158,7 @@ public class WorldGenMonumentPieces { - int i1 = this.d(jx); - int j1 = this.b(ix, kx); - if (structureboundingbox.b(new BlockPosition(lx, i1, j1))) { +@@ -1923,7 +1923,7 @@ public class WorldGenMonumentPieces { + int j1 = this.b(i, k); + + if (structureboundingbox.b((BaseBlockPosition) (new BlockPosition(l, i1, j1)))) { - EntityGuardianElder entityguardianelder = new EntityGuardianElder(generatoraccess.getMinecraftWorld()); + EntityGuardianElder entityguardianelder = EntityTypes.ELDER_GUARDIAN.create(generatoraccess.getMinecraftWorld()); // Paper + entityguardianelder.heal(entityguardianelder.getMaxHealth()); - entityguardianelder.setPositionRotation((double)lx + 0.5D, (double)i1, (double)j1 + 0.5D, 0.0F, 0.0F); - entityguardianelder.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityguardianelder)), (GroupDataEntity)null, (NBTTagCompound)null); -@@ -188,7 +188,7 @@ public class WorldGenMonumentPieces { - this.n = new StructureBoundingBox(i, 39, j, i + 58 - 1, 61, j + 58 - 1); - } - -- List list = this.a(random); -+ List list = this.a(random); // Paper - decompile error - this.p.d = true; - this.r.add(new WorldGenMonumentPieces.WorldGenMonumentPieceEntry(enumdirection1, this.p)); - this.r.add(new WorldGenMonumentPieces.WorldGenMonumentPiece2(enumdirection1, this.q, random)); -@@ -312,7 +312,7 @@ public class WorldGenMonumentPieces { - this.q.b[EnumDirection.EAST.a()].b[EnumDirection.UP.a()].d = true; - this.q.b[EnumDirection.NORTH.a()].b[EnumDirection.UP.a()].d = true; - this.q.b[EnumDirection.EAST.a()].b[EnumDirection.NORTH.a()].b[EnumDirection.UP.a()].d = true; -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile error - - for(WorldGenMonumentPieces.WorldGenMonumentStateTracker worldgenmonumentpieces$worldgenmonumentstatetracker4 : aworldgenmonumentpieces$worldgenmonumentstatetracker) { - if (worldgenmonumentpieces$worldgenmonumentstatetracker4 != null) { + entityguardianelder.setPositionRotation((double) l + 0.5D, (double) i1, (double) j1 + 0.5D, 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java -index 706e2b7e1..20630784a 100644 +index 5fa2987d2..967e33b3d 100644 --- a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java +++ b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java -@@ -1641,7 +1641,7 @@ public class WorldGenVillagePieces { +@@ -1640,7 +1640,7 @@ public class WorldGenVillagePieces { ++this.a; if (this.h) { @@ -592,7 +568,7 @@ index 706e2b7e1..20630784a 100644 entityzombievillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F); entityzombievillager.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityzombievillager)), (GroupDataEntity) null, (NBTTagCompound) null); -@@ -1649,7 +1649,7 @@ public class WorldGenVillagePieces { +@@ -1648,7 +1648,7 @@ public class WorldGenVillagePieces { entityzombievillager.di(); generatoraccess.addEntity(entityzombievillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason } else { @@ -615,65 +591,41 @@ index efb0379ce..3d8193c47 100644 entitywitch.di(); entitywitch.setPositionRotation((double) j + 0.5D, (double) i, (double) k + 0.5D, 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java -index ee401980f..9ca9306d0 100644 +index 11010d8e1..4eb746ebb 100644 --- a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java -@@ -197,7 +197,7 @@ public class WorldGenWoodlandMansionPieces { +@@ -23,14 +23,14 @@ public class WorldGenWoodlandMansionPieces { + static class h extends WorldGenWoodlandMansionPieces.f { + + private h() { +- super(null); ++ super(); // Paper - decompile fix + } + } + + static class f extends WorldGenWoodlandMansionPieces.b { + + private f() { +- super(null); ++ super(); // Paper - decompile fix } - private void b() { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList> arraylist = Lists.newArrayList(); // Paper - decompile error - WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g = this.d[1]; + public String a(Random random) { +@@ -65,7 +65,7 @@ public class WorldGenWoodlandMansionPieces { + static class a extends WorldGenWoodlandMansionPieces.b { - for(int i = 0; i < this.c.c; ++i) { -@@ -205,7 +205,7 @@ public class WorldGenWoodlandMansionPieces { - int k = worldgenwoodlandmansionpieces$g.a(j, i); - int l = k & 983040; - if (l == 131072 && (k & 2097152) == 2097152) { -- arraylist.add(new Tuple(j, i)); -+ arraylist.add(new Tuple<>(j, i)); // Paper - decompile error - } - } - } -@@ -213,7 +213,7 @@ public class WorldGenWoodlandMansionPieces { - if (arraylist.isEmpty()) { - this.c.a(0, 0, this.c.b, this.c.c, 5); - } else { -- Tuple tuple = (Tuple)arraylist.get(this.a.nextInt(arraylist.size())); -+ Tuple tuple = arraylist.get(this.a.nextInt(arraylist.size())); // Paper - decompile error - int l1 = worldgenwoodlandmansionpieces$g.a(tuple.a(), tuple.b()); - worldgenwoodlandmansionpieces$g.a(tuple.a(), tuple.b(), l1 | 4194304); - EnumDirection enumdirection1 = this.b(this.b, tuple.a(), tuple.b(), 1, l1 & '\uffff'); -@@ -257,12 +257,12 @@ public class WorldGenWoodlandMansionPieces { + private a() { +- super(null); ++ super(); // Paper - decompile fix } - private void a(WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g, WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g1) { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList> arraylist = Lists.newArrayList(); // Paper - decompile error - - for(int i = 0; i < worldgenwoodlandmansionpieces$g.c; ++i) { - for(int j = 0; j < worldgenwoodlandmansionpieces$g.b; ++j) { - if (worldgenwoodlandmansionpieces$g.a(j, i) == 2) { -- arraylist.add(new Tuple(j, i)); -+ arraylist.add(new Tuple<>(j, i)); // Paper - decompile error - } - } - } -@@ -270,7 +270,7 @@ public class WorldGenWoodlandMansionPieces { - Collections.shuffle(arraylist, this.a); - int k3 = 10; - -- for(Tuple tuple : arraylist) { -+ for(Tuple tuple : arraylist) { // Paper - decompile error - int k = tuple.a(); - int l = tuple.b(); - if (worldgenwoodlandmansionpieces$g1.a(k, l) == 0) { -@@ -985,13 +985,13 @@ public class WorldGenWoodlandMansionPieces { + public String a(Random random) { +@@ -1065,15 +1065,13 @@ public class WorldGenWoodlandMansionPieces { this.a(generatoraccess, structureboundingbox, random, blockposition, LootTables.o, iblockdata); } else if ("Mage".equals(s)) { - EntityEvoker entityevoker = new EntityEvoker(generatoraccess.getMinecraftWorld()); +- + EntityEvoker entityevoker = EntityTypes.EVOKER.create(generatoraccess.getMinecraftWorld()); // Paper entityevoker.di(); entityevoker.setPositionRotation(blockposition, 0.0F, 0.0F); @@ -681,15 +633,16 @@ index ee401980f..9ca9306d0 100644 generatoraccess.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 2); } else if ("Warrior".equals(s)) { - EntityVindicator entityvindicator = new EntityVindicator(generatoraccess.getMinecraftWorld()); +- + EntityVindicator entityvindicator = EntityTypes.VINDICATOR.create(generatoraccess.getMinecraftWorld()); // Paper entityvindicator.di(); entityvindicator.setPositionRotation(blockposition, 0.0F, 0.0F); - entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity)null, (NBTTagCompound)null); + entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 63c802d02..4d93a22d8 100644 +index 078399aa0..4de45c439 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -511,7 +511,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -494,7 +494,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { boolean flag2 = this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper if (flag2) { @@ -699,10 +652,10 @@ index 63c802d02..4d93a22d8 100644 entityhorseskeleton.s(true); entityhorseskeleton.setAgeRaw(0); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 86e70f236..159d6bb73 100644 +index e33135ada..6ed7c9355 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1165,153 +1165,153 @@ public class CraftWorld implements World { +@@ -1181,153 +1181,153 @@ public class CraftWorld implements World { entity.setPositionRotation(x, y, z, 0, 0); } else if (LivingEntity.class.isAssignableFrom(clazz)) { if (Chicken.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0399-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch b/Spigot-Server-Patches/0397-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch similarity index 94% rename from Spigot-Server-Patches/0399-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch rename to Spigot-Server-Patches/0397-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch index b59c9f181..fbab4cc33 100644 --- a/Spigot-Server-Patches/0399-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch +++ b/Spigot-Server-Patches/0397-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch @@ -1,4 +1,4 @@ -From d00faa76bc2931fcc2fd721bc2057ad5c0904ac9 Mon Sep 17 00:00:00 2001 +From 1469b30d1f9e32a427637c90392ce79c226ce8d9 Mon Sep 17 00:00:00 2001 From: MisterVector Date: Thu, 1 Nov 2018 14:50:05 -0700 Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block @@ -13,7 +13,7 @@ keep the clone of the item used to a non empty value so it represents the item used. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 23fc4d8e1..0b6c25936 100644 +index 1d76c4c99..be6cd6adf 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -375,10 +375,11 @@ public class PlayerInteractManager { diff --git a/Spigot-Server-Patches/0400-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0398-Optimize-World-Time-Updates.patch similarity index 93% rename from Spigot-Server-Patches/0400-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0398-Optimize-World-Time-Updates.patch index 2d8bbd70c..0d21c4a87 100644 --- a/Spigot-Server-Patches/0400-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0398-Optimize-World-Time-Updates.patch @@ -1,4 +1,4 @@ -From 918a78d30bc4ddaba7a8a4233b7768534f556ea5 Mon Sep 17 00:00:00 2001 +From 9b72bdc36ddec893ff85f47c381a911f906e130e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 32aee07d1..55e7dfa17 100644 +index 84d588122..f3f7d2aa1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1038,12 +1038,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1032,12 +1032,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Send time updates to everyone, it will get the right time from the world the player is in. diff --git a/Spigot-Server-Patches/0401-Restore-custom-InventoryHolder-support.patch b/Spigot-Server-Patches/0399-Restore-custom-InventoryHolder-support.patch similarity index 96% rename from Spigot-Server-Patches/0401-Restore-custom-InventoryHolder-support.patch rename to Spigot-Server-Patches/0399-Restore-custom-InventoryHolder-support.patch index b44cc54f9..5bcd0b611 100644 --- a/Spigot-Server-Patches/0401-Restore-custom-InventoryHolder-support.patch +++ b/Spigot-Server-Patches/0399-Restore-custom-InventoryHolder-support.patch @@ -1,4 +1,4 @@ -From 4bd5f0bf9b7271816dbcb3046e50f3e2af1a484f Mon Sep 17 00:00:00 2001 +From 55da0eab5c79e39f665f25ab9da248c0254237bd Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 5 Nov 2018 04:23:51 +0000 Subject: [PATCH] Restore custom InventoryHolder support diff --git a/Spigot-Server-Patches/0402-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0400-Use-Vanilla-Minecart-Speeds.patch similarity index 86% rename from Spigot-Server-Patches/0402-Use-Vanilla-Minecart-Speeds.patch rename to Spigot-Server-Patches/0400-Use-Vanilla-Minecart-Speeds.patch index 75c45d59b..a81deda9e 100644 --- a/Spigot-Server-Patches/0402-Use-Vanilla-Minecart-Speeds.patch +++ b/Spigot-Server-Patches/0400-Use-Vanilla-Minecart-Speeds.patch @@ -1,4 +1,4 @@ -From 1edca875cbb3d3715f715b7714866b2b9b9cd3cf Mon Sep 17 00:00:00 2001 +From 8308b09b9bb2beff783b4fe3d720ea3f2ad68c19 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 8 Nov 2018 21:33:09 -0500 Subject: [PATCH] Use Vanilla Minecart Speeds @@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds CraftBukkit changed the values on flying speed, restore back to vanilla diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index e741c7f83..6d21527ea 100644 +index a8a64d054..41e8a4b50 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -39,9 +39,9 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT +@@ -37,9 +37,9 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT private double derailedX = 0.5; private double derailedY = 0.5; private double derailedZ = 0.5; diff --git a/Spigot-Server-Patches/0403-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0401-Fix-SpongeAbsortEvent-handling.patch similarity index 90% rename from Spigot-Server-Patches/0403-Fix-SpongeAbsortEvent-handling.patch rename to Spigot-Server-Patches/0401-Fix-SpongeAbsortEvent-handling.patch index 83d9de7e9..591f5f5c2 100644 --- a/Spigot-Server-Patches/0403-Fix-SpongeAbsortEvent-handling.patch +++ b/Spigot-Server-Patches/0401-Fix-SpongeAbsortEvent-handling.patch @@ -1,4 +1,4 @@ -From 7ed195a3a835d7e005ed8dd89add308a50ed4502 Mon Sep 17 00:00:00 2001 +From 101e3e47728ee3d81dc82b202cc04a2add518284 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Nov 2018 05:15:21 +0000 Subject: [PATCH] Fix SpongeAbsortEvent handling @@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java -index ab1ee37a2..852d98a6b 100644 +index cbc8e8d13..cda6f2b73 100644 --- a/src/main/java/net/minecraft/server/BlockSponge.java +++ b/src/main/java/net/minecraft/server/BlockSponge.java @@ -106,7 +106,11 @@ public class BlockSponge extends Block { @@ -28,10 +28,10 @@ index ab1ee37a2..852d98a6b 100644 } + diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 2d855aae6..bc345a2c3 100644 +index 08a5acb0a..aa3547690 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -223,6 +223,7 @@ public interface IBlockData extends IBlockDataHolder { +@@ -236,6 +236,7 @@ public interface IBlockData extends IBlockDataHolder { this.getBlock().a(this, world, blockposition, entity); } diff --git a/Spigot-Server-Patches/0404-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0402-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 87% rename from Spigot-Server-Patches/0404-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0402-Don-t-allow-digging-into-unloaded-chunks.patch index f0cba975b..58064c771 100644 --- a/Spigot-Server-Patches/0404-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0402-Don-t-allow-digging-into-unloaded-chunks.patch @@ -1,14 +1,14 @@ -From 2d44fd64a42e7094966027f4f83c3b2705b1b202 Mon Sep 17 00:00:00 2001 +From 7b2629a0ea0b289abbcbce57a17b262d9b9e82de Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Nov 2018 21:01:09 +0000 Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 96db9121b..44fabe240 100644 +index f78c6e991..7ae374085 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1223,6 +1223,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1222,6 +1222,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: diff --git a/Spigot-Server-Patches/0405-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0403-Optimize-redstone-algorithm.patch similarity index 97% rename from Spigot-Server-Patches/0405-Optimize-redstone-algorithm.patch rename to Spigot-Server-Patches/0403-Optimize-redstone-algorithm.patch index f5252c0d0..1dc04e689 100644 --- a/Spigot-Server-Patches/0405-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0403-Optimize-redstone-algorithm.patch @@ -1,4 +1,4 @@ -From 01a417e7f224789b0d8cf1d33e219847b3cbfc8d Mon Sep 17 00:00:00 2001 +From 15da3a5b2cb9ff0d4cef5d44df0938d879271aad Mon Sep 17 00:00:00 2001 From: theosib Date: Thu, 27 Sep 2018 01:43:35 -0600 Subject: [PATCH] Optimize redstone algorithm @@ -954,7 +954,7 @@ index 000000000..21d9d6d7e + } +} diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 0adea6a17..174e84760 100644 +index 48c79568f..a09aa6944 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java @@ -1,5 +1,7 @@ @@ -976,12 +976,10 @@ index 0adea6a17..174e84760 100644 private final Set t = Sets.newHashSet(); public BlockRedstoneWire(Block.Info block_info) { -@@ -154,8 +159,120 @@ public class BlockRedstoneWire extends Block { +@@ -154,6 +159,117 @@ public class BlockRedstoneWire extends Block { return iblockdata1.q() || iblockdata1.getBlock() == Blocks.GLOWSTONE; } -- private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { -- iblockdata = this.b(world, blockposition, iblockdata); + // Paper start - Optimize redstone + // The bulk of the new functionality is found in RedstoneWireTurbo.java + RedstoneWireTurbo turbo = new RedstoneWireTurbo(this); @@ -1093,26 +1091,10 @@ index 0adea6a17..174e84760 100644 + return state; + } + // Paper end -+ -+ private IBlockData a(World worldIn, BlockPosition pos, IBlockData state) { -+ state = this.b(worldIn, pos, state); - ArrayList arraylist = Lists.newArrayList(this.t); - - this.t.clear(); -@@ -164,10 +281,10 @@ public class BlockRedstoneWire extends Block { - while (iterator.hasNext()) { - BlockPosition blockposition1 = (BlockPosition) iterator.next(); - -- world.applyPhysics(blockposition1, this); -+ worldIn.applyPhysics(blockposition1, this); - } - -- return iblockdata; -+ return state; - } - - private IBlockData b(World world, BlockPosition blockposition, IBlockData iblockdata) { -@@ -264,7 +381,7 @@ public class BlockRedstoneWire extends Block { + private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { + iblockdata = this.b(world, blockposition, iblockdata); + List list = Lists.newArrayList(this.t); +@@ -264,7 +380,7 @@ public class BlockRedstoneWire extends Block { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) { if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) { @@ -1121,7 +1103,7 @@ index 0adea6a17..174e84760 100644 Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator(); EnumDirection enumdirection; -@@ -310,7 +427,7 @@ public class BlockRedstoneWire extends Block { +@@ -310,7 +426,7 @@ public class BlockRedstoneWire extends Block { world.applyPhysics(blockposition.shift(enumdirection), this); } @@ -1130,7 +1112,7 @@ index 0adea6a17..174e84760 100644 Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); EnumDirection enumdirection1; -@@ -350,7 +467,7 @@ public class BlockRedstoneWire extends Block { +@@ -350,7 +466,7 @@ public class BlockRedstoneWire extends Block { public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!world.isClientSide) { if (iblockdata.canPlace(world, blockposition)) { @@ -1140,10 +1122,10 @@ index 0adea6a17..174e84760 100644 iblockdata.a(world, blockposition, 0); world.setAir(blockposition); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c8a7f5e59..160ef3659 100644 +index a186637f5..589d3efa7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -646,6 +646,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -641,6 +641,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc } @@ -1151,7 +1133,7 @@ index c8a7f5e59..160ef3659 100644 public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -2599,6 +2600,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2594,6 +2595,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } diff --git a/Spigot-Server-Patches/0406-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0404-force-entity-dismount-during-teleportation.patch similarity index 90% rename from Spigot-Server-Patches/0406-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0404-force-entity-dismount-during-teleportation.patch index f5b7edc9a..acc96f475 100644 --- a/Spigot-Server-Patches/0406-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0404-force-entity-dismount-during-teleportation.patch @@ -1,4 +1,4 @@ -From 39a44a63748b3241a097e788b74fb75da9916405 Mon Sep 17 00:00:00 2001 +From d73bc3f6dd7a51b4eaa91d637551c77e4a21d8c2 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 15 Nov 2018 13:38:37 +0000 Subject: [PATCH] force entity dismount during teleportation @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9eeb73d67..80db026ea 100644 +index 9f9eaf25c..1e789de1b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2096,12 +2096,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2094,12 +2094,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -41,7 +41,7 @@ index 9eeb73d67..80db026ea 100644 } } -@@ -2146,7 +2149,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2144,7 +2147,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index 9eeb73d67..80db026ea 100644 if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2156,7 +2162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2154,7 +2160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index 9eeb73d67..80db026ea 100644 ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2167,7 +2173,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2165,7 +2171,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start @@ -72,10 +72,10 @@ index 9eeb73d67..80db026ea 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 53ae1528d..a35301ad5 100644 +index 7d096efa2..2bd256b3e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -994,8 +994,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -991,8 +991,11 @@ public abstract class EntityHuman extends EntityLiving { return -0.35D; } @@ -90,7 +90,7 @@ index 53ae1528d..a35301ad5 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dc277f439..826ddc25c 100644 +index 710ad8b17..4acbc17ae 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2478,10 +2478,13 @@ public abstract class EntityLiving extends Entity { @@ -110,10 +110,10 @@ index dc277f439..826ddc25c 100644 this.A(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d04570171..82855b3a8 100644 +index 71c4ed8fa..1c90f2f85 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -776,10 +776,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -778,10 +778,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } diff --git a/Spigot-Server-Patches/0407-Book-Size-Limits.patch b/Spigot-Server-Patches/0405-Book-Size-Limits.patch similarity index 95% rename from Spigot-Server-Patches/0407-Book-Size-Limits.patch rename to Spigot-Server-Patches/0405-Book-Size-Limits.patch index e14d163d3..9487ef784 100644 --- a/Spigot-Server-Patches/0407-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0405-Book-Size-Limits.patch @@ -1,4 +1,4 @@ -From b8997d87085049de6ff72b8025e127b243d89476 Mon Sep 17 00:00:00 2001 +From 903f06b5ea3616e0b4054b28c28d9d0b4b42a1aa Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 16 Nov 2018 23:08:50 -0500 Subject: [PATCH] Book Size Limits @@ -22,10 +22,10 @@ index fef899ae0..468aff713 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 44fabe240..6a99fb6b7 100644 +index 7ae374085..bbdf729c3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -748,6 +748,38 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -747,6 +747,38 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } public void a(PacketPlayInBEdit packetplayinbedit) { diff --git a/Spigot-Server-Patches/0408-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0406-Make-the-default-permission-message-configurable.patch similarity index 97% rename from Spigot-Server-Patches/0408-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0406-Make-the-default-permission-message-configurable.patch index cbe6ff85b..cb50c37a2 100644 --- a/Spigot-Server-Patches/0408-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0406-Make-the-default-permission-message-configurable.patch @@ -1,4 +1,4 @@ -From bb1cb0d540714ddb74f50a92780f537c0ed99ea6 Mon Sep 17 00:00:00 2001 +From d77f851a59177e0d3d150f6983d237823487e51f Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 19:49:56 +0000 Subject: [PATCH] Make the default permission message configurable diff --git a/Spigot-Server-Patches/0409-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0407-Add-more-Zombie-API.patch similarity index 78% rename from Spigot-Server-Patches/0409-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0407-Add-more-Zombie-API.patch index 62b361f37..28116b700 100644 --- a/Spigot-Server-Patches/0409-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0407-Add-more-Zombie-API.patch @@ -1,11 +1,11 @@ -From e65af43e246fc653434b585cf761de23cb236a81 Mon Sep 17 00:00:00 2001 +From 0dbdf509a59f03e4dafe9b932f2d09bd969a8a45 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 04:29:59 -0500 Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index f25bcfd8f..72ea3ba76 100644 +index 92ad1ad15..85465879d 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -22,8 +22,8 @@ public class EntityZombie extends EntityMonster { @@ -13,9 +13,9 @@ index f25bcfd8f..72ea3ba76 100644 private static final DataWatcherObject bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); - private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); -- public static final DataWatcherObject bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); // PAIL -+ private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject armsRaised = bE; // Paper - OBFHELPER -+ public static final DataWatcherObject bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject drowning = bF; // Paper - OBFHELPER +- public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); ++ private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject armsRaised = bE; // Paper - OBFHELPER ++ public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject drowning = DROWN_CONVERTING; // Paper - OBFHELPER private final PathfinderGoalBreakDoor bG; private boolean bH; private int bI; @@ -28,12 +28,12 @@ index f25bcfd8f..72ea3ba76 100644 public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -79,14 +80,22 @@ public class EntityZombie extends EntityMonster { - this.getDataWatcher().register(EntityZombie.bF, false); + this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false); } + public boolean isDrowning() { return isDrownConverting(); } // Paper - OBFHELPER public boolean isDrownConverting() { - return (Boolean) this.getDataWatcher().get(EntityZombie.bF); + return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING); } + public void setArmsRaised(boolean raised) { s(raised); } // Paper - OBFHELPER @@ -50,14 +50,8 @@ index f25bcfd8f..72ea3ba76 100644 public boolean dH() { return this.bH; } -@@ -210,11 +219,19 @@ public class EntityZombie extends EntityMonster { - super.movementTick(); - } - -+ public void startDrowning(int drownedConversionTime) { a(drownedConversionTime); } // Paper - OBFHELPER - public void a(int i) { // PAIL - this.drownedConversionTime = i; - this.getDataWatcher().set(EntityZombie.bF, true); +@@ -215,6 +224,13 @@ public class EntityZombie extends EntityMonster { + this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } + // Paper start @@ -70,7 +64,7 @@ index f25bcfd8f..72ea3ba76 100644 protected void dE() { this.a((EntityZombie) EntityTypes.DROWNED.create(world)); // Paper this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0); -@@ -253,10 +270,17 @@ public class EntityZombie extends EntityMonster { +@@ -253,10 +269,17 @@ public class EntityZombie extends EntityMonster { } } @@ -89,7 +83,7 @@ index f25bcfd8f..72ea3ba76 100644 public boolean damageEntity(DamageSource damagesource, float f) { if (super.damageEntity(damagesource, f)) { EntityLiving entityliving = this.getGoalTarget(); -@@ -369,6 +393,7 @@ public class EntityZombie extends EntityMonster { +@@ -369,6 +392,7 @@ public class EntityZombie extends EntityMonster { nbttagcompound.setBoolean("CanBreakDoors", this.dH()); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bI : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); @@ -97,9 +91,9 @@ index f25bcfd8f..72ea3ba76 100644 } public void a(NBTTagCompound nbttagcompound) { -@@ -382,7 +407,11 @@ public class EntityZombie extends EntityMonster { +@@ -382,7 +406,11 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { - this.a(nbttagcompound.getInt("DrownedConversionTime")); + this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } - + // Paper start @@ -111,11 +105,11 @@ index f25bcfd8f..72ea3ba76 100644 public void b(EntityLiving entityliving) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java -index 7af4ea9f8..4d4c50212 100644 +index e93ecb076..c516d3475 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java @@ -77,4 +77,34 @@ public class CraftZombie extends CraftMonster implements Zombie { - getHandle().a(time); + getHandle().startDrownedConversion(time); } } + @@ -125,7 +119,7 @@ index 7af4ea9f8..4d4c50212 100644 + } + + public void startDrowning(int drownedConversionTime) { -+ getHandle().startDrowning(drownedConversionTime); ++ getHandle().startDrownedConversion(drownedConversionTime); + } + + public void stopDrowning() { diff --git a/Spigot-Server-Patches/0410-limit-the-range-at-which-we-ll-consider-an-attackabl.patch b/Spigot-Server-Patches/0408-limit-the-range-at-which-we-ll-consider-an-attackabl.patch similarity index 90% rename from Spigot-Server-Patches/0410-limit-the-range-at-which-we-ll-consider-an-attackabl.patch rename to Spigot-Server-Patches/0408-limit-the-range-at-which-we-ll-consider-an-attackabl.patch index 8f595293b..b7d4cf013 100644 --- a/Spigot-Server-Patches/0410-limit-the-range-at-which-we-ll-consider-an-attackabl.patch +++ b/Spigot-Server-Patches/0408-limit-the-range-at-which-we-ll-consider-an-attackabl.patch @@ -1,4 +1,4 @@ -From 89ead2699326943c4d79a66df5cb5f79ac0807f4 Mon Sep 17 00:00:00 2001 +From df79681e61de0e0b39a7dedabf80675fab54f7c7 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 13 Nov 2018 14:01:00 +0000 Subject: [PATCH] limit the range at which we'll consider an attackable target @@ -12,10 +12,10 @@ decrease when set, allowing us to skip further checks earlier on when looking for an attackable entity diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 160ef3659..c702b94ef 100644 +index 589d3efa7..c5960cf4c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2727,8 +2727,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -2722,8 +2722,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); diff --git a/Spigot-Server-Patches/0411-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0409-Prevent-rayTrace-from-loading-chunks.patch similarity index 88% rename from Spigot-Server-Patches/0411-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0409-Prevent-rayTrace-from-loading-chunks.patch index c54c9b772..b967104ae 100644 --- a/Spigot-Server-Patches/0411-Prevent-rayTrace-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0409-Prevent-rayTrace-from-loading-chunks.patch @@ -1,4 +1,4 @@ -From 98676ff5b942b199f53538a3cef8268133d750c8 Mon Sep 17 00:00:00 2001 +From 1305364a9428e1a3824ac6907f8994c1318327eb Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 26 Nov 2018 19:21:58 -0500 Subject: [PATCH] Prevent rayTrace from loading chunks @@ -7,10 +7,10 @@ ray tracing into an unloaded chunk should be treated as a miss this saves a ton of lag for when AI tries to raytrace near unloaded chunks. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c702b94ef..26327895b 100644 +index c5960cf4c..e11e22836 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -858,7 +858,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -853,7 +853,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc int i1 = MathHelper.floor(d1); int j1 = MathHelper.floor(d2); BlockPosition blockposition = new BlockPosition(l, i1, j1); @@ -20,7 +20,7 @@ index c702b94ef..26327895b 100644 Fluid fluid = this.getFluid(blockposition); boolean flag2; boolean flag3; -@@ -980,7 +981,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -975,7 +976,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc i1 = MathHelper.floor(d1) - (enumdirection == EnumDirection.UP ? 1 : 0); j1 = MathHelper.floor(d2) - (enumdirection == EnumDirection.SOUTH ? 1 : 0); blockposition = new BlockPosition(l, i1, j1); diff --git a/Spigot-Server-Patches/0412-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0410-Handle-Large-Packets-disconnecting-client.patch similarity index 84% rename from Spigot-Server-Patches/0412-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0410-Handle-Large-Packets-disconnecting-client.patch index 0750610ea..831a61755 100644 --- a/Spigot-Server-Patches/0412-Handle-Large-Packets-disconnecting-client.patch +++ b/Spigot-Server-Patches/0410-Handle-Large-Packets-disconnecting-client.patch @@ -1,4 +1,4 @@ -From a8b39ea15fbb0ad46e7b7c1726499390f351d947 Mon Sep 17 00:00:00 2001 +From c72cb660f626dbea7a13f7d28bd330fe3fc82486 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Nov 2018 21:18:06 -0500 Subject: [PATCH] Handle Large Packets disconnecting client @@ -7,10 +7,10 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 120416b30..065bede4c 100644 +index c53697914..0b8796d0a 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -100,6 +100,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -99,6 +99,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { @@ -27,12 +27,12 @@ index 120416b30..065bede4c 100644 NetworkManager.g.debug("Skipping packet due to errors", throwable.getCause()); } else { diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index 2e42c268b..0a9bfb07a 100644 +index 601d4d0fa..2d8e6a2f4 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java -@@ -9,6 +9,12 @@ public interface Packet { +@@ -10,6 +10,12 @@ public interface Packet { - void a(T var1); + void a(T t0); + // Paper start + default boolean packetTooLarge(NetworkManager manager) { @@ -44,10 +44,10 @@ index 2e42c268b..0a9bfb07a 100644 return false; } diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index 3448f6c53..484131e65 100644 +index 2aa805eef..4f7bc186a 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -45,8 +45,31 @@ public class PacketEncoder extends MessageToByteEncoder> { +@@ -49,7 +49,31 @@ public class PacketEncoder extends MessageToByteEncoder> { throw throwable; } } @@ -61,7 +61,7 @@ index 3448f6c53..484131e65 100644 } } } - ++ + // Paper start + private static int MAX_PACKET_SIZE = 2097152; + @@ -80,23 +80,23 @@ index 3448f6c53..484131e65 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 40ec398ee..ca6bcd22f 100644 +index 8e35d14f9..4a57e8a3e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -68,7 +68,7 @@ public class PacketPlayOutMapChunk implements Packet { - this.f = packetdataserializer.readBoolean(); +@@ -76,7 +76,7 @@ public class PacketPlayOutMapChunk implements Packet { this.c = packetdataserializer.g(); int i = packetdataserializer.g(); + - if (i > 2097152) { + if (i > 2097152) { // Paper - if this changes, update PacketEncoder throw new RuntimeException("Chunk Packet trying to allocate too much memory on read."); } else { this.d = new byte[i]; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -index 4d4835353..abdb21f6b 100644 +index 706d84385..c0d8f8b42 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -@@ -7,6 +7,16 @@ public class PacketPlayOutWindowItems implements Packet { +@@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet { private int a; private List b; @@ -109,10 +109,9 @@ index 4d4835353..abdb21f6b 100644 + return true; + } + // Paper end -+ - public PacketPlayOutWindowItems() { - } + public PacketPlayOutWindowItems() {} + public PacketPlayOutWindowItems(int i, NonNullList nonnulllist) { -- 2.20.1 diff --git a/Spigot-Server-Patches/0413-Lazy-init-world-storage-in-CraftOfflinePlayer.patch b/Spigot-Server-Patches/0411-Lazy-init-world-storage-in-CraftOfflinePlayer.patch similarity index 97% rename from Spigot-Server-Patches/0413-Lazy-init-world-storage-in-CraftOfflinePlayer.patch rename to Spigot-Server-Patches/0411-Lazy-init-world-storage-in-CraftOfflinePlayer.patch index e1e4b5223..0eccea239 100644 --- a/Spigot-Server-Patches/0413-Lazy-init-world-storage-in-CraftOfflinePlayer.patch +++ b/Spigot-Server-Patches/0411-Lazy-init-world-storage-in-CraftOfflinePlayer.patch @@ -1,4 +1,4 @@ -From 7c4006d50b89f7c9b4763e64e85aa2797b2af221 Mon Sep 17 00:00:00 2001 +From 43e58dd2a1f747e766ac1959bb974d5d1d28c860 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 11 Dec 2018 22:25:07 -0500 Subject: [PATCH] Lazy init world storage in CraftOfflinePlayer diff --git a/Spigot-Server-Patches/0414-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0412-Add-PlayerConnectionCloseEvent.patch similarity index 94% rename from Spigot-Server-Patches/0414-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0412-Add-PlayerConnectionCloseEvent.patch index 3dede28d1..adcabfc5a 100644 --- a/Spigot-Server-Patches/0414-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/0412-Add-PlayerConnectionCloseEvent.patch @@ -1,4 +1,4 @@ -From 18a056f21d2650e01c0222acb01f017f234fed3b Mon Sep 17 00:00:00 2001 +From 22767c6eca4402921e1f3b9618785d31b21256a5 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 7 Oct 2018 12:05:28 -0700 Subject: [PATCH] Add PlayerConnectionCloseEvent @@ -34,10 +34,10 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 95d34fbfe..d20545bad 100644 +index ca76f2a38..dfe7a029f 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -36,9 +36,9 @@ public class LoginListener implements PacketLoginInListener, ITickable { +@@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener, ITickable { private final byte[] e = new byte[4]; private final MinecraftServer server; public final NetworkManager networkManager; @@ -50,7 +50,7 @@ index 95d34fbfe..d20545bad 100644 private SecretKey loginKey; private EntityPlayer l; diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 065bede4c..21e92b921 100644 +index 0b8796d0a..553637239 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -16,6 +16,7 @@ import io.netty.handler.timeout.TimeoutException; @@ -61,7 +61,7 @@ index 065bede4c..21e92b921 100644 import java.net.SocketAddress; import java.util.Queue; import java.util.concurrent.locks.ReentrantReadWriteLock; -@@ -358,6 +359,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -357,6 +358,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { this.i().a(new ChatMessage("multiplayer.disconnect.generic", new Object[0])); } this.packetQueue.clear(); // Free up packet queue. diff --git a/Spigot-Server-Patches/0415-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0413-Prevent-Enderman-from-loading-chunks.patch similarity index 90% rename from Spigot-Server-Patches/0415-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0413-Prevent-Enderman-from-loading-chunks.patch index b8894bd07..9159ba7f1 100644 --- a/Spigot-Server-Patches/0415-Prevent-Enderman-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0413-Prevent-Enderman-from-loading-chunks.patch @@ -1,14 +1,14 @@ -From 337b6a7a492cedc30f4e7c564e4dfd83945033fd Mon Sep 17 00:00:00 2001 +From 07b22524ef76ae62ffdff157ba2dc5d630a709fe Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 18 Dec 2018 02:15:08 +0000 Subject: [PATCH] Prevent Enderman from loading chunks diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 7ef46851e..1df974bc9 100644 +index e4aba0e0a..945040442 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -305,7 +305,8 @@ public class EntityEnderman extends EntityMonster { +@@ -297,7 +297,8 @@ public class EntityEnderman extends EntityMonster { int j = MathHelper.floor(this.enderman.locY + random.nextDouble() * 3.0D); int k = MathHelper.floor(this.enderman.locZ - 2.0D + random.nextDouble() * 4.0D); BlockPosition blockposition = new BlockPosition(i, j, k); @@ -18,7 +18,7 @@ index 7ef46851e..1df974bc9 100644 Block block = iblockdata.getBlock(); MovingObjectPosition movingobjectposition = world.rayTrace(new Vec3D((double) ((float) MathHelper.floor(this.enderman.locX) + 0.5F), (double) ((float) j + 0.5F), (double) ((float) MathHelper.floor(this.enderman.locZ) + 0.5F)), new Vec3D((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F)), FluidCollisionOption.NEVER, true, false); boolean flag = movingobjectposition != null && movingobjectposition.getBlockPosition().equals(blockposition); -@@ -343,7 +344,8 @@ public class EntityEnderman extends EntityMonster { +@@ -335,7 +336,8 @@ public class EntityEnderman extends EntityMonster { int j = MathHelper.floor(this.a.locY + random.nextDouble() * 2.0D); int k = MathHelper.floor(this.a.locZ - 1.0D + random.nextDouble() * 2.0D); BlockPosition blockposition = new BlockPosition(i, j, k); diff --git a/scripts/decompile.sh b/scripts/decompile.sh index 2771e260b..401363845 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -81,37 +81,37 @@ if [ ! -d "$classdir" ]; then set -e fi -needsDecomp=0 -if [ ! -f "$forgeflowercachefile" ]; then - needsDecomp=1 -elif [ "$(cat ${forgeflowercachefile})" != "$forgeflowercachevalue" ]; then - needsDecomp=1 -fi -if [ "$needsDecomp" == "1" ]; then - # our local cache is now invalidated, we can update forgeflower to get better deobfuscation - rm -rf "$forgedecompiledir/net" -fi +#needsDecomp=0 +#if [ ! -f "$forgeflowercachefile" ]; then +# needsDecomp=1 +#elif [ "$(cat ${forgeflowercachefile})" != "$forgeflowercachevalue" ]; then +# needsDecomp=1 +#fi +#if [ "$needsDecomp" == "1" ]; then +# # our local cache is now invalidated, we can update forgeflower to get better deobfuscation +# rm -rf "$forgedecompiledir/net" +#fi -# Forge (for Paper mc-dev imports, and dev src folders for unimported files) -if [ ! -d "$forgedecompiledir/net" ] ; then - echo "Decompiling classes (stage 1)..." - cd "$basedir" - - if [ ! -f "$forgeflowerbin" ]; then - echo "Downloading ForgeFlower ($forgeflowerversion)..." - curl -s -o "$forgeflowerbin" "$forgeflowerurl" - fi - - set +e - java -Ddecomp.renameparams=true -jar "$forgeflowerbin" ${forgefloweroptions} -ind=' ' "$classdir" "$forgedecompiledir" - if [ "$?" != "0" ]; then - rm -rf "$forgedecompiledir/net" - echo "Failed to decompile classes." - exit 1 - fi - echo "$forgeflowercachevalue" > "$forgeflowercachefile" - set -e -fi +## Forge (for Paper mc-dev imports, and dev src folders for unimported files) +#if [ ! -d "$forgedecompiledir/net" ] ; then +# echo "Decompiling classes (stage 1)..." +# cd "$basedir" +# +# if [ ! -f "$forgeflowerbin" ]; then +# echo "Downloading ForgeFlower ($forgeflowerversion)..." +# curl -s -o "$forgeflowerbin" "$forgeflowerurl" +# fi +# +# set +e +# java -Ddecomp.renameparams=true -jar "$forgeflowerbin" ${forgefloweroptions} -ind=' ' "$classdir" "$forgedecompiledir" +# if [ "$?" != "0" ]; then +# rm -rf "$forgedecompiledir/net" +# echo "Failed to decompile classes." +# exit 1 +# fi +# echo "$forgeflowercachevalue" > "$forgeflowercachefile" +# set -e +#fi # Spigot (for CraftBukkit patches) diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index c6b730e1d..488bbb602 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -12,7 +12,8 @@ gitcmd="git -c commit.gpgsign=false" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) decompiledir="$workdir/Minecraft/$minecraftversion/forge" - +# replace for now +decompiledir="$workdir/Minecraft/$minecraftversion/spigot" export importedmcdev="" function import { export importedmcdev="$importedmcdev $1" diff --git a/scripts/remap.sh b/scripts/remap.sh index 8c3afcd13..20f72bf83 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -45,7 +45,7 @@ fi echo "Applying class mappings..." if [ ! -f "$jarpath-cl.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-synth -i "$jarpath.jar" -m "$classmappings" -o "$jarpath-cl.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-lvt BASIC --auto-synth -i "$jarpath.jar" -m "$classmappings" -o "$jarpath-cl.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to apply class mappings." exit 1 @@ -63,7 +63,7 @@ fi echo "Creating remapped jar..." if [ ! -f "$jarpath-mapped.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/brigadier --kill-lvt -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/brigadier -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to create remapped jar." exit 1 diff --git a/work/BuildData b/work/BuildData index 370a4d980..bcf503132 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 370a4d9802d37f4228aa33720bdd5e9675222784 +Subproject commit bcf503132cdd66b4f92e41a8174e1b901467ec81 diff --git a/work/Bukkit b/work/Bukkit index 0969eedc8..7fca5fd45 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 0969eedc88f58ce58fc03bcd4acdfaa1ac91301c +Subproject commit 7fca5fd456b36db811d10990ff1fe9a532f8c5dd diff --git a/work/CraftBukkit b/work/CraftBukkit index dff66dfcc..c4a67eed9 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit dff66dfccd64280d066715340c0692f6e376be0b +Subproject commit c4a67eed9964aebb7add1686b044277cad42dbd4 diff --git a/work/Spigot b/work/Spigot index 573cdf2c7..518206a1d 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 573cdf2c734efd81d75a18f0b6c64d5b4b95efa2 +Subproject commit 518206a1d250cdc7ae6448383ea9063f69c766c4