From c1d0b4b4c674cfe7d4312b956ebfee73bdd6495f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 20 May 2017 23:41:39 -0500 Subject: [PATCH] Update Paper to MC 1.12-pre5 --- Spigot-API-Patches/0001-POM-changes.patch | 8 +- ...lease-versioning-change-and-warning.patch} | 10 +- Spigot-Server-Patches/0001-POM-Changes.patch | 8 +- Spigot-Server-Patches/0006-Timings-v2.patch | 76 ++++++------- .../0011-Allow-nerfed-mobs-to-jump.patch | 50 ++++++-- .../0017-Player-affects-spawning-API.patch | 20 ++-- .../0023-Entity-Origin-API.patch | 12 +- .../0029-Configurable-end-credits.patch | 24 ++-- ...49-Ensure-commands-are-not-ran-async.patch | 8 +- .../0055-Player-Tab-List-and-Title-APIs.patch | 10 +- ...entation-of-tile-entity-removal-list.patch | 10 +- .../0065-Complete-resource-pack-API.patch | 10 +- ...76-Optimized-Light-Level-Comparisons.patch | 20 ++-- ...0101-Add-PlayerUseUnknownEntityEvent.patch | 8 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 10 +- ...am-reload-spawn-chunks-in-nether-end.patch | 8 +- ...nilla-per-world-scoreboard-coloring-.patch | 10 +- ...18-Implement-PlayerLocaleChangeEvent.patch | 17 ++- ...item-frames-performance-and-bug-fixe.patch | 10 +- ...153-Fix-AIOOBE-in-inventory-handling.patch | 8 +- ...onfigurable-packet-in-spam-threshold.patch | 10 +- .../0156-Auto-Save-Improvements.patch | 14 +-- .../0157-Chunk-registration-fixes.patch | 20 ++-- .../0163-Add-EntityZapEvent.patch | 10 +- .../0171-Optimise-removeQueue.patch | 24 ++-- ...6-Don-t-let-fishinghooks-use-portals.patch | 10 +- ...8-Vanished-players-don-t-have-rights.patch | 12 +- .../0186-IllegalPacketEvent.patch | 16 +-- ...87-Properly-fix-item-duplication-bug.patch | 10 +- ...ore-Improper-Anvil-Item-Name-Packets.patch | 28 ----- ... => 0193-ShulkerBox-Dupe-Prevention.patch} | 6 +- ...llow-31-instead-of-30-for-item-names.patch | 22 ---- ...ovide-E-TE-Chunk-count-stat-methods.patch} | 4 +- ...h => 0195-Enforce-Sync-Player-Saves.patch} | 6 +- ... => 0196-Enforce-Sync-Chunk-Unloads.patch} | 4 +- ...low-entities-to-ride-themselves-572.patch} | 6 +- ...atch => 0198-Fix-block-break-desync.patch} | 8 +- ...ign-the-World-in-WorldGenStronghold.patch} | 4 +- ...-fromBottle-flag-to-Experience-Orbs.patch} | 4 +- ...-Remove-the-Vanilla-Method-Profiler.patch} | 6 +- ...patch => 0202-Cap-Entity-Collisions.patch} | 10 +- ...ow-a-zero-max-height-in-BiomeJungle.patch} | 4 +- ...-CraftScheduler-Async-Task-Debugger.patch} | 4 +- ...g.patch => 0205-Shame-on-you-Mojang.patch} | 4 +- ...ore-aggressive-in-the-chunk-unload-.patch} | 4 +- ...> 0207-Do-not-let-armorstands-drown.patch} | 6 +- ...-attempting-to-read-EMPTY-ItemStack.patch} | 6 +- ...e-async-calls-to-restart-the-server.patch} | 107 +++++++++--------- ...roperty-to-disable-book-size-limits.patch} | 4 +- ...e-parrots-stay-on-shoulders-despite.patch} | 12 +- ...rkaround-for-jansi-bug-with-Windows.patch} | 4 +- scripts/upstreamMerge.sh | 2 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 56 files changed, 356 insertions(+), 380 deletions(-) rename Spigot-API-Patches/{0051-1.12-pre2-versioning-change-and-warning.patch => 0051-1.12-prerelease-versioning-change-and-warning.patch} (80%) delete mode 100644 Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch rename Spigot-Server-Patches/{0195-ShulkerBox-Dupe-Prevention.patch => 0193-ShulkerBox-Dupe-Prevention.patch} (89%) delete mode 100644 Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch rename Spigot-Server-Patches/{0196-Provide-E-TE-Chunk-count-stat-methods.patch => 0194-Provide-E-TE-Chunk-count-stat-methods.patch} (95%) rename Spigot-Server-Patches/{0197-Enforce-Sync-Player-Saves.patch => 0195-Enforce-Sync-Player-Saves.patch} (90%) rename Spigot-Server-Patches/{0198-Enforce-Sync-Chunk-Unloads.patch => 0196-Enforce-Sync-Chunk-Unloads.patch} (94%) rename Spigot-Server-Patches/{0199-Don-t-allow-entities-to-ride-themselves-572.patch => 0197-Don-t-allow-entities-to-ride-themselves-572.patch} (87%) rename Spigot-Server-Patches/{0200-Fix-block-break-desync.patch => 0198-Fix-block-break-desync.patch} (81%) rename Spigot-Server-Patches/{0201-Assign-the-World-in-WorldGenStronghold.patch => 0199-Assign-the-World-in-WorldGenStronghold.patch} (90%) rename Spigot-Server-Patches/{0202-Add-fromBottle-flag-to-Experience-Orbs.patch => 0200-Add-fromBottle-flag-to-Experience-Orbs.patch} (97%) rename Spigot-Server-Patches/{0203-Remove-the-Vanilla-Method-Profiler.patch => 0201-Remove-the-Vanilla-Method-Profiler.patch} (95%) rename Spigot-Server-Patches/{0204-Cap-Entity-Collisions.patch => 0202-Cap-Entity-Collisions.patch} (90%) rename Spigot-Server-Patches/{0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch => 0203-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch} (95%) rename Spigot-Server-Patches/{0206-Remove-CraftScheduler-Async-Task-Debugger.patch => 0204-Remove-CraftScheduler-Async-Task-Debugger.patch} (97%) rename Spigot-Server-Patches/{0207-Shame-on-you-Mojang.patch => 0205-Shame-on-you-Mojang.patch} (96%) rename Spigot-Server-Patches/{0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch => 0206-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch} (93%) rename Spigot-Server-Patches/{0209-Do-not-let-armorstands-drown.patch => 0207-Do-not-let-armorstands-drown.patch} (93%) rename Spigot-Server-Patches/{0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch => 0208-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch} (89%) rename Spigot-Server-Patches/{0211-Properly-handle-async-calls-to-restart-the-server.patch => 0209-Properly-handle-async-calls-to-restart-the-server.patch} (97%) rename Spigot-Server-Patches/{0212-Add-system-property-to-disable-book-size-limits.patch => 0210-Add-system-property-to-disable-book-size-limits.patch} (97%) rename Spigot-Server-Patches/{0213-Add-option-to-make-parrots-stay-on-shoulders-despite.patch => 0211-Add-option-to-make-parrots-stay-on-shoulders-despite.patch} (89%) rename Spigot-Server-Patches/{0214-Workaround-for-jansi-bug-with-Windows.patch => 0212-Workaround-for-jansi-bug-with-Windows.patch} (94%) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 1caedd635a..30bc85ad88 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From fb47b4cfb2bfb00c13f0555b516be68a789659f6 Mon Sep 17 00:00:00 2001 +From fb5f733cfceb51c30b4ccc0c63e82c715882c042 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 17:16:08 -0600 Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index e7891169..067d30e8 100644 +index 66bb7a12..ea6a710e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,35 +4,37 @@ @@ -24,7 +24,7 @@ index e7891169..067d30e8 100644 - spigot-api + com.destroystokyo.paper + paper-api - 1.12-pre2-SNAPSHOT + 1.12-pre5-SNAPSHOT jar - Spigot-API @@ -133,5 +133,5 @@ index e7891169..067d30e8 100644 true -- -2.11.0 +2.13.0.windows.1 diff --git a/Spigot-API-Patches/0051-1.12-pre2-versioning-change-and-warning.patch b/Spigot-API-Patches/0051-1.12-prerelease-versioning-change-and-warning.patch similarity index 80% rename from Spigot-API-Patches/0051-1.12-pre2-versioning-change-and-warning.patch rename to Spigot-API-Patches/0051-1.12-prerelease-versioning-change-and-warning.patch index 7aea7892be..0eabcd5bd2 100644 --- a/Spigot-API-Patches/0051-1.12-pre2-versioning-change-and-warning.patch +++ b/Spigot-API-Patches/0051-1.12-prerelease-versioning-change-and-warning.patch @@ -1,19 +1,19 @@ -From eabf0ce918f79ef14c00b9d9c69ba3ddba349feb Mon Sep 17 00:00:00 2001 +From bd06f97c046b55140b8feb68b622844e96dc395a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 15 May 2017 10:11:42 -0500 -Subject: [PATCH] 1.12-pre2 versioning change and warning +Subject: [PATCH] 1.12 prerelease versioning change and warning Remove when merged to master diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java -index aae605e9..d7e3d7f4 100644 +index aae605e9..2319d6b5 100644 --- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java +++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java @@ -48,6 +48,7 @@ public class VersionCommand extends BukkitCommand { if (!testPermission(sender)) return true; if (args.length == 0) { -+ sender.sendMessage("This is pre-release software, and is not necessarily of the same quality as a full release"); // TODO: Remove during merge into master ++ sender.sendMessage("This is pre-release software"); // TODO: Remove during merge into master sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")"); sendVersion(sender); } else { @@ -27,5 +27,5 @@ index aae605e9..d7e3d7f4 100644 try { HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + BRANCH + "..." + hash).openConnection(); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index c9d7ca945c..3cc5ddd88a 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 617559d05de68cd645b17492c511e62ae593de4b Mon Sep 17 00:00:00 2001 +From f89b79a21ed04e7a9e81ecc8108f808f659927c0 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 4f14d6f41..a833892e3 100644 +index 31cb11194..167bc0ac2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index 4f14d6f41..a833892e3 100644 + com.destroystokyo.paper + paper jar - 1.12-pre2-SNAPSHOT + 1.12-pre5-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -159,5 +159,5 @@ index 93046379d..674096cab 100644 if (stream != null) { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0006-Timings-v2.patch b/Spigot-Server-Patches/0006-Timings-v2.patch index ee9200a100..221d264f48 100644 --- a/Spigot-Server-Patches/0006-Timings-v2.patch +++ b/Spigot-Server-Patches/0006-Timings-v2.patch @@ -1,11 +1,11 @@ -From 0c6f1973af82e9c39ffe0242f525d1011bbeeff5 Mon Sep 17 00:00:00 2001 +From 749d5785a1e24e67652d8abe029784fd73635c4d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 diff --git a/pom.xml b/pom.xml -index 33bbeb2bd..0cbe47cb6 100644 +index 167bc0ac2..6b73c55f9 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,12 @@ @@ -441,7 +441,7 @@ index 5ab2cf6ee..b5795b6d3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 0ee47df3f..ba3913667 100644 +index 7c39edca8..6c1c5e566 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -35,6 +35,15 @@ public class Block { @@ -531,7 +531,7 @@ index 9dcab42de..c1b0d6cea 100644 this.chunkLoader.a(this.world, chunk); } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index fe387e218..6550686ee 100644 +index b23de7663..fe64ee4aa 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -571,7 +571,7 @@ index fe387e218..6550686ee 100644 // return chunk; // CraftBukkit } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 30538d8ec..840ffeb93 100644 +index 70fde368f..c56aa5c19 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -24,7 +24,7 @@ import java.io.PrintStream; @@ -624,7 +624,7 @@ index 30538d8ec..840ffeb93 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 bae717b18..c6b7d6c22 100644 +index ef63b5d3b..0e70cdf6f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace; @@ -646,7 +646,7 @@ index bae717b18..c6b7d6c22 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -525,7 +526,6 @@ public abstract class Entity implements ICommandListener { +@@ -524,7 +525,6 @@ public abstract class Entity implements ICommandListener { } public void move(EnumMoveType enummovetype, double d0, double d1, double d2) { @@ -654,7 +654,7 @@ index bae717b18..c6b7d6c22 100644 if (this.noclip) { this.a(this.getBoundingBox().d(d0, d1, d2)); this.recalcPosition(); -@@ -919,7 +919,6 @@ public abstract class Entity implements ICommandListener { +@@ -918,7 +918,6 @@ public abstract class Entity implements ICommandListener { this.world.methodProfiler.b(); } @@ -663,7 +663,7 @@ index bae717b18..c6b7d6c22 100644 public void recalcPosition() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3a92c468c..2c22b6ca2 100644 +index bf2761d53..5a2dbe5ff 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -765,7 +765,7 @@ index c840f6761..14504cbcc 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 39318aaf1..e847f3f1a 100644 +index 249fccce9..3629cbc47 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -47,8 +47,8 @@ import org.bukkit.Bukkit; @@ -1012,7 +1012,7 @@ index eeac34998..e4ed2e991 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1dbdcfa57..63ea04fb4 100644 +index 3bcabb195..7c4fe706a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1023,7 +1023,7 @@ index 1dbdcfa57..63ea04fb4 100644 // CraftBukkit end public class PlayerConnection implements PacketListenerPlayIn, ITickable { -@@ -1346,7 +1347,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1359,7 +1360,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit end private void handleCommand(String s) { @@ -1032,7 +1032,7 @@ index 1dbdcfa57..63ea04fb4 100644 // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); -@@ -1357,22 +1358,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1370,22 +1371,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1056,7 +1056,7 @@ index 1dbdcfa57..63ea04fb4 100644 } - org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot + MinecraftTimings.playerCommandTimer.stopTiming(); // Paper - // this.minecraftServer.getCommandHandler().b(this.player, s); + // this.minecraftServer.getCommandHandler().a(this.player, s); // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -1090,7 +1090,7 @@ index f74b06794..1fc632e0c 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f79683a60..4aaf287ae 100644 +index 35f421164..4a8927798 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1176,7 +1176,7 @@ index 591f4ad7f..e02f0c442 100644 private static final RegistryMaterials> f = new RegistryMaterials(); protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a366b2d70..eafb76003 100644 +index 41f0ac2bf..919f041d9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,11 +18,11 @@ import com.google.common.collect.Maps; @@ -1256,33 +1256,33 @@ index a366b2d70..eafb76003 100644 this.methodProfiler.b(); this.methodProfiler.b(); } -@@ -1621,7 +1626,6 @@ public abstract class World implements IBlockAccess { - entity.ticksLived++; - entity.inactiveTick(); - } else { -- entity.tickTimer.startTiming(); // Spigot - // CraftBukkit end - entity.M = entity.locX; - entity.N = entity.locY; -@@ -1630,6 +1634,7 @@ public abstract class World implements IBlockAccess { - entity.lastPitch = entity.pitch; - if (flag && entity.aa) { - ++entity.ticksLived; -+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper - if (entity.isPassenger()) { - entity.leaveVehicle(); - } else { -@@ -1689,8 +1694,6 @@ public abstract class World implements IBlockAccess { - } +@@ -1623,7 +1628,6 @@ public abstract class World implements IBlockAccess { + } + // CraftBukkit end + +- entity.tickTimer.startTiming(); // Spigot + entity.M = entity.locX; + entity.N = entity.locY; + entity.O = entity.locZ; +@@ -1631,6 +1635,7 @@ public abstract class World implements IBlockAccess { + entity.lastPitch = entity.pitch; + if (flag && entity.aa) { + ++entity.ticksLived; ++ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper + if (entity.isPassenger()) { + entity.leaveVehicle(); + } else { +@@ -1690,8 +1695,6 @@ public abstract class World implements IBlockAccess { } } -- -- entity.tickTimer.stopTiming(); // Spigot } +- entity.tickTimer.stopTiming(); // Spigot +- } + public boolean b(AxisAlignedBB axisalignedbb) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d91de898f..af722bd00 100644 +index b924dad97..63c7d4402 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -256,13 +256,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1935,5 +1935,5 @@ index be23631b2..9eb36f3e9 100644 } } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch index 98586ca983..b9afca7b61 100644 --- a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch @@ -1,4 +1,4 @@ -From a2b70ad6f16f9f9ed468870ddc0e36ad7200ed59 Mon Sep 17 00:00:00 2001 +From 2f4bb5350f76ae64af9b869da3322c0726eed973 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 @@ -30,8 +30,20 @@ index 4f2fa59ac..8af52a61f 100644 public void b() { this.b.l(this.a); this.a = false; +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 0e70cdf6f..8a61c2369 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -109,6 +109,7 @@ public abstract class Entity implements ICommandListener { + public boolean noclip; + public float R; + protected Random random; ++ public boolean fromMobSpawner; // Paper + public int ticksLived; + public int fireTicks; + public boolean inWater; // Spigot - protected -> public // PAIL diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 254955156..09e5408ac 100644 +index 67f26bd62..6adb38de0 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -42,19 +54,24 @@ index 254955156..09e5408ac 100644 public EntityInsentient(World world) { super(world); -@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving { - // Spigot Start - if ( this.fromMobSpawner ) - { +@@ -638,6 +639,17 @@ public abstract class EntityInsentient extends EntityLiving { + this.world.methodProfiler.a("checkDespawn"); + this.L(); + this.world.methodProfiler.b(); ++ // Paper start - Re-add so we can allow them to float in water ++ if (this.fromMobSpawner) { + // Paper start - Allow nerfed mobs to jump and float + if (goalFloat != null) { + if (goalFloat.validConditions()) goalFloat.update(); + this.getControllerJump().jumpIfSet(); + } + // Paper end - return; - } - // Spigot End ++ return; ++ } ++ // Spigot End + this.world.methodProfiler.a("sensing"); + this.bw.a(); + this.world.methodProfiler.b(); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java index b3b303b3b..fc8be86fd 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java @@ -80,6 +97,19 @@ index b3b303b3b..fc8be86fd 100644 public void e() { if (this.a.getRandom().nextFloat() < 0.8F) { this.a.getControllerJump().a(); +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +index 825ca9346..2f409fe1e 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +@@ -557,7 +557,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + + @Override + public boolean hasAI() { +- return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI(): false; ++ return this.getHandle() instanceof EntityInsentient && (!((EntityInsentient) this.getHandle()).isNoAI() || this.getHandle().getWorld().spigotConfig.nerfSpawnerMobs && ((EntityInsentient) this.getHandle()).fromMobSpawner); // Paper + } + + @Override -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch index 1f0c6c2d62..226e3cd8e6 100644 --- a/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch @@ -1,15 +1,15 @@ -From 6ca60e1e0afcb2035f962b12d6079ca9a3347d28 Mon Sep 17 00:00:00 2001 +From 24fe6438b0705833454275e38f9d629102337881 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 fc3d05394..b4507fe0c 100644 +index 186e2df8b..dcd2ac6ab 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -65,6 +65,7 @@ public abstract class EntityHuman extends EntityLiving { - private final ItemCooldown bX; +@@ -64,6 +64,7 @@ public abstract class EntityHuman extends EntityLiving { + private final ItemCooldown bW; @Nullable public EntityFishingHook hookedFish; + public boolean affectsSpawning = true; @@ -17,7 +17,7 @@ index fc3d05394..b4507fe0c 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 be3422adc..2802cc062 100644 +index bb27f5dd8..65b7b33be 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -44,7 +44,7 @@ index dcc251e31..d8344ddc9 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 4c65dc0a9..c56a8e9c2 100644 +index a599a043d..1c7c187c7 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -52,7 +52,7 @@ public final class SpawnerCreature { @@ -57,10 +57,10 @@ index 4c65dc0a9..c56a8e9c2 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 1ff2263eb..b87273aca 100644 +index 6b404e385..3d114cfea 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2724,7 +2724,7 @@ public abstract class World implements IBlockAccess { +@@ -2730,7 +2730,7 @@ public abstract class World implements IBlockAccess { for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); @@ -70,7 +70,7 @@ index 1ff2263eb..b87273aca 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 433aafb33..c5924a2be 100644 +index 06f33f80e..6f042b620 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1456,6 +1456,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -90,5 +90,5 @@ index 433aafb33..c5924a2be 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0023-Entity-Origin-API.patch b/Spigot-Server-Patches/0023-Entity-Origin-API.patch index 9bff8f3547..0bd697ff77 100644 --- a/Spigot-Server-Patches/0023-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0023-Entity-Origin-API.patch @@ -1,14 +1,14 @@ -From 44e197d767a13602fb903ab4dda171ea77898b29 Mon Sep 17 00:00:00 2001 +From cfbb5c43d1d8d555373e69582230686d6986197b 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 bbbd1689e..3dff98596 100644 +index 7ced523cd..2892f31f0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -148,6 +148,7 @@ public abstract class Entity implements ICommandListener { +@@ -149,6 +149,7 @@ public abstract class Entity implements ICommandListener { public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper @@ -101,7 +101,7 @@ index bc6383669..ca9eb2f3b 100644 if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b87273aca..c6cf7754b 100644 +index 3d114cfea..d207092ed 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess { @@ -118,7 +118,7 @@ index b87273aca..c6cf7754b 100644 flag = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f849a8148..63154b647 100644 +index 6375b5c40..87813d59c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -738,4 +738,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -167,5 +167,5 @@ index c493c9c0c..93843aa50 100644 + // Paper end } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0029-Configurable-end-credits.patch b/Spigot-Server-Patches/0029-Configurable-end-credits.patch index 25d33bafcc..49f9e226f0 100644 --- a/Spigot-Server-Patches/0029-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0029-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From 3044d2ae539fbe4d31af51351181e00ac6aed4ba Mon Sep 17 00:00:00 2001 +From 2c7e1cdf4a07b72caa2816f666edd159c9662141 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -20,26 +20,26 @@ index fd606ee14..c00fa83d5 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3ef2ffd2d..586c4ad0d 100644 +index a6f70d846..8b0c126a3 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - private long co = System.currentTimeMillis(); - private Entity cp; + private long cn = System.currentTimeMillis(); + private Entity co; public boolean worldChangeInvuln; -- private boolean cr; -+ private boolean cr; private void setHasSeenCredits(boolean has) { this.cr = has; } // Paper - OBFHELPER - private final RecipeBookServer cs = new RecipeBookServer(); - private Vec3D ct; - private int cu; +- private boolean cq; ++ private boolean cq; private void setHasSeenCredits(boolean has) { this.cq = has; } // Paper - OBFHELPER + private final RecipeBookServer cr = new RecipeBookServer(); + private Vec3D cs; + private int ct; @@ -603,6 +603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.world.kill(this); if (!this.viewingCredits) { this.viewingCredits = true; + if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits - this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cr ? 0.0F : 1.0F)); - this.cr = true; + this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cq ? 0.0F : 1.0F)); + this.cq = true; } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch index 7523f21411..571473c760 100644 --- a/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From cb3b208b6f0f2e6cdf717c41809422b39904827c Mon Sep 17 00:00:00 2001 +From 7f73885db5574e32c41bbb683755cbe795c0e6f5 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,10 +14,10 @@ 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 63ea04fb4..65ab76cc5 100644 +index 7c4fe706a..9be557062 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1279,6 +1279,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1292,6 +1292,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } if (!async && s.startsWith("/")) { @@ -82,5 +82,5 @@ index 637882f1f..ac7890a56 100644 return true; } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch index 33f0d9cf56..eb73f71ba1 100644 --- a/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch @@ -1,11 +1,11 @@ -From cbcc5dfe43b8a0f3e379ef3deb74d1fe79713850 Mon Sep 17 00:00:00 2001 +From 757684a009e33a1bb24e2b7f71e0bed8fc007870 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/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java -index 5f5b3825d..242efb0b9 100644 +index 0663b07ca..f5ef1ba31 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java @@ -4,6 +4,8 @@ import java.io.IOException; @@ -17,7 +17,7 @@ index 5f5b3825d..242efb0b9 100644 private IChatBaseComponent a; private IChatBaseComponent b; -@@ -19,8 +21,19 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet 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/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e712ab370..e9a7565ae 100644 +index a41bfe580..321306cb8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -122,10 +122,10 @@ public abstract class Entity implements ICommandListener { +@@ -123,10 +123,10 @@ public abstract class Entity implements ICommandListener { private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject aE = DataWatcher.a(Entity.class, DataWatcherRegistry.h); @@ -24,7 +24,7 @@ index e712ab370..e9a7565ae 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4b49d1976..b7f502ecd 100644 +index 07596960b..c3449f94c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; @@ -84,5 +84,5 @@ index 4b49d1976..b7f502ecd 100644 this.f.clear(); this.l(); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch index 07548cc5be..8858fc8ca8 100644 --- a/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch @@ -1,14 +1,14 @@ -From 276acf46a94df17de9758755ef9aee7b7933c0e2 Mon Sep 17 00:00:00 2001 +From 42a77fc1a82c991e0fb75264e059997e0a6ad657 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 65ab76cc5..1bc61ef43 100644 +index 9be557062..3b4b5cf8c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1040,7 +1040,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1053,7 +1053,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.x()); @@ -23,7 +23,7 @@ index 65ab76cc5..1bc61ef43 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 cf753d362..5839801f5 100644 +index 4822071c9..409582d5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -82,6 +82,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -71,5 +71,5 @@ index cf753d362..5839801f5 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch index 1188287029..ba69f156f8 100644 --- a/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From 4db1c6925294438d675336f3f9193cb7f6589de5 Mon Sep 17 00:00:00 2001 +From 11e7e276d572aa7ff71afe417b1dc245564d8801 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 e9c5d1465..9015affc5 100644 +index 128096453..fea81de16 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java @@ -48,7 +48,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @@ -17,11 +17,11 @@ index e9c5d1465..9015affc5 100644 super.b(world, blockposition, iblockdata, random); - if (world.getLightLevel(blockposition.up()) >= 9) { + if (world.isLightLevel(blockposition.up(), 9)) { // Paper - int i = this.z(iblockdata); + int i = this.y(iblockdata); if (i < this.g()) { diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java -index fb1bf80b8..8b43e6070 100644 +index d0fa96651..62ec2ad31 100644 --- a/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java @@ -29,7 +29,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { @@ -65,7 +65,7 @@ index fb1bf80b8..8b43e6070 100644 // world.setTypeUpdate(blockposition1, Blocks.GRASS.getBlockData()); org.bukkit.World bworld = world.getWorld(); diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java -index f463b7113..89458cd77 100644 +index b22949368..cb1e5a2a3 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -34,7 +34,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen @@ -78,7 +78,7 @@ index f463b7113..89458cd77 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 c74b6284f..bb96e164e 100644 +index 7492110fa..8d1630ac0 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { @@ -118,18 +118,18 @@ index 21539ff9b..1585bf3bc 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index bf059a746..003e06156 100644 +index 2b619ab93..372890b5d 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster { int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); -- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) { -+ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper +- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) { ++ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper entityzombie.setPosition((double) i1, (double) j1, (double) k1); if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) { this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch index 18bec4a844..e338249a29 100644 --- a/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch @@ -1,4 +1,4 @@ -From e8548ec5455f5fb85d3a3d9fdaf9aabad959d2ba Mon Sep 17 00:00:00 2001 +From c894ad4e12e050a34ade6ec41eeb11deefca9fab Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 05:09:16 -0400 Subject: [PATCH] Add PlayerUseUnknownEntityEvent @@ -18,10 +18,10 @@ index c67cb54a3..521f46262 100644 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 1bc61ef43..25c02c727 100644 +index 3b4b5cf8c..81f8e0fd0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1625,6 +1625,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1638,6 +1638,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } } @@ -39,5 +39,5 @@ index 1bc61ef43..25c02c727 100644 } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch index f2ca294870..022472e077 100644 --- a/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 1932f99dc02044ab955552ac7085246c3be60e2b Mon Sep 17 00:00:00 2001 +From e7e4ca28537998b0f6fe1f8ad176868519f7083c 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,7 +21,7 @@ index 74a49a5fb..3a942c763 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ecdb92397..b55ce6b1a 100644 +index cf2c4ea3b..0ce50541c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -356,8 +356,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -39,10 +39,10 @@ index ecdb92397..b55ce6b1a 100644 if (i1 - j > 1000L) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 036d96fa7..b3c580836 100644 +index fee13283f..33776d905 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -3197,8 +3197,9 @@ public abstract class World implements IBlockAccess { +@@ -3203,8 +3203,9 @@ public abstract class World implements IBlockAccess { int k = i * 16 + 8 - blockposition.getX(); int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; @@ -83,5 +83,5 @@ index 7c1bbb491..1f88cc94c 100644 loadChunk(chunkCoordX + x, chunkCoordZ + z); } else { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 17fe759d1f..659326f440 100644 --- a/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -1,14 +1,14 @@ -From d8fdffcf773a9d75b1b7751a46e1f5bf4e45e56c Mon Sep 17 00:00:00 2001 +From f087f637f551c289f26ad3f4a625b78f1451f747 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 fb24b5407..e301eaf9d 100644 +index 85cd83c35..364cfe885 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -3193,6 +3193,7 @@ public abstract class World implements IBlockAccess { +@@ -3199,6 +3199,7 @@ public abstract class World implements IBlockAccess { return this.P; } @@ -29,5 +29,5 @@ index d0265f960..35d8d1a6e 100644 } } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 1292257f5b..b0ab8304d2 100644 --- a/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -1,4 +1,4 @@ -From ff60a18cc8906862956622e06a7b712bf8603d19 Mon Sep 17 00:00:00 2001 +From 60d656282916a149f91cc19d99609e62805faf32 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 @@ -19,7 +19,7 @@ index 3a942c763..3bd29650c 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b3911fa9f..fa940ad31 100644 +index 5428220a0..3177c17c4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2073,6 +2073,7 @@ public abstract class Entity implements ICommandListener { @@ -31,10 +31,10 @@ index b3911fa9f..fa940ad31 100644 public ScoreboardTeamBase aW() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 25c02c727..353e73b15 100644 +index 81f8e0fd0..b5284cecd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1358,7 +1358,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1371,7 +1371,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { return; } @@ -51,5 +51,5 @@ index 25c02c727..353e73b15 100644 if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch index d25596bebf..fcd1a8968d 100644 --- a/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch @@ -1,17 +1,17 @@ -From ad0cb65019f11a4d6994a21e88fa3b504f60193d Mon Sep 17 00:00:00 2001 +From 054a32d7f09e98ed104f49c379a7f1ccdefd53ed 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 42f6b7206..f4a2e748d 100644 +index 01adb5807..6024b001f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand; public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bW = LogManager.getLogger(); + private static final Logger bV = LogManager.getLogger(); - public String locale = "en_US"; // Spigot private -> public + public String locale = null; // Spigot private -> public // Paper - default to null public PlayerConnection playerConnection; @@ -30,14 +30,14 @@ index 42f6b7206..f4a2e748d 100644 + new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent(); + } + // Paper end - this.cm = packetplayinsettings.c(); - this.cn = packetplayinsettings.d(); + this.cl = packetplayinsettings.c(); + this.cm = packetplayinsettings.d(); this.getDataWatcher().set(EntityPlayer.br, Byte.valueOf((byte) packetplayinsettings.e())); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 00f9229f0..d1f70af51 100644 +index ca0fd5843..234becfd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1688,7 +1688,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1688,7 +1688,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -45,10 +45,9 @@ index 00f9229f0..d1f70af51 100644 + // Paper start - Locale change event + final String locale = getHandle().locale; + return locale != null ? locale : "en_US"; -+ // Paper end } @Override -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index be0fd97f36..82cec1e570 100644 --- a/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From e77006067f56fb55e05d1d378412ef6316111889 Mon Sep 17 00:00:00 2001 +From c7ef28c653eb46e86d9daff8fc58fae7a73b42fe 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 b4507fe0c..29c2fd4c9 100644 +index dcd2ac6ab..7d79e4625 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -549,6 +549,12 @@ public abstract class EntityHuman extends EntityLiving { +@@ -548,6 +548,12 @@ public abstract class EntityHuman extends EntityLiving { return null; } // CraftBukkit end @@ -48,7 +48,7 @@ index 10cafe057..1d0d7453a 100644 Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0ddc03507..634f1c28c 100644 +index 8729a0056..ba554517f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1222,6 +1222,7 @@ public abstract class World implements IBlockAccess { @@ -145,5 +145,5 @@ index 256a13178..5768cd512 100644 public RenderData() { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch index 568d12a94a..f42db0dab0 100644 --- a/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch @@ -1,14 +1,14 @@ -From 08dcbdf8047ae290ac2c4ab36659bf6a1b41823d Mon Sep 17 00:00:00 2001 +From ab9671b2d2930a60b6bf51241fdc3c34f66f0af8 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 b8ec71a93..bac3ba83d 100644 +index c2e93bb45..73baf015b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1816,7 +1816,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1830,7 +1830,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { case CLONE: if (packetplayinwindowclick.c() == 2) { click = ClickType.MIDDLE; @@ -18,5 +18,5 @@ index b8ec71a93..bac3ba83d 100644 } else { Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b()); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch index 23879b3a79..a22ff218b3 100644 --- a/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch @@ -1,11 +1,11 @@ -From ddf7bf9141ddfb1453d79fbe35f88b1cee457219 Mon Sep 17 00:00:00 2001 +From b78b3c09164a097af3331b5285165dd6423fb0d9 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 c758bde3f..d765607c0 100644 +index cf06f8ac3..2001175bf 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -235,4 +235,13 @@ public class PaperConfig { @@ -23,10 +23,10 @@ index c758bde3f..d765607c0 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bac3ba83d..7b8e7f343 100644 +index 73baf015b..de8c9a3a5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -882,13 +882,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -895,13 +895,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; @@ -44,5 +44,5 @@ index bac3ba83d..7b8e7f343 100644 limitedPackets = 0; return true; -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch index 1ceab4772c..f80dd7adf3 100644 --- a/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From e92d02317cc0d4af25558ecd75a66595adb10e22 Mon Sep 17 00:00:00 2001 +From 6c083dc4268feabf71e564d138ea7fbade9eb4ae Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:16:39 -0400 Subject: [PATCH] Auto Save Improvements @@ -96,19 +96,19 @@ index 9836c0c5a..39f0f5a17 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2b01c5395..42eaef8a1 100644 +index 2ee915226..fd7fda511 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bW = LogManager.getLogger(); + private static final Logger bV = LogManager.getLogger(); public String locale = null; // Spigot private -> public // Paper - default to null + public long lastSave = MinecraftServer.currentTick; // Paper public PlayerConnection playerConnection; 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 19a66b64c..1f0e79387 100644 +index 374ab7294..6f6cc49c0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -118,6 +118,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -155,7 +155,7 @@ index 19a66b64c..1f0e79387 100644 this.methodProfiler.a("tallying"); // Spigot start diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e7017883f..31f2704af 100644 +index a6576841b..f40bd1f46 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -339,6 +339,7 @@ public abstract class PlayerList { @@ -192,7 +192,7 @@ index e7017883f..31f2704af 100644 public void addWhitelist(GameProfile gameprofile) { this.whitelist.add(new WhiteListEntry(gameprofile)); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 36e6fdd16..b1253899c 100644 +index 9f297f8de..a49e2302c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1002,8 +1002,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -215,5 +215,5 @@ index 36e6fdd16..b1253899c 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.a(flag); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch index 678d988cfb..ec5c0b8e09 100644 --- a/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch @@ -1,4 +1,4 @@ -From 7030da056719aa24e367550279c56f3b5188c17b Mon Sep 17 00:00:00 2001 +From 940009e3c1babcdad40a0d1b62e2188e4022d432 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 22:54:28 -0400 Subject: [PATCH] Chunk registration fixes @@ -8,18 +8,18 @@ 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 0a473d7d2..888ecce77 100644 +index 28c249718..b12d464dc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1766,7 +1766,7 @@ public abstract class World implements IBlockAccess { - } +@@ -1767,7 +1767,7 @@ public abstract class World implements IBlockAccess { + } - int k = MathHelper.floor(entity.locX / 16.0D); -- int l = MathHelper.floor(entity.locY / 16.0D); -+ int l = Math.min(15, Math.max(0, MathHelper.floor(entity.locY / 16.0D))); // Paper - stay consistent with chunk add/remove behavior - int i1 = MathHelper.floor(entity.locZ / 16.0D); + int i = MathHelper.floor(entity.locX / 16.0D); +- int j = MathHelper.floor(entity.locY / 16.0D); ++ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY / 16.0D))); // Paper - stay consistent with chunk add/remove behavior + int k = MathHelper.floor(entity.locZ / 16.0D); - if (!entity.aa || entity.ab != k || entity.ac != l || entity.ad != i1) { + if (!entity.aa || entity.ab != i || entity.ac != j || entity.ad != k) { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch index 7af977f3a5..105abb6118 100644 --- a/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch @@ -1,11 +1,11 @@ -From 5ce7fe5db1d223b1ac36137aff1bd8a1e4461fa2 Mon Sep 17 00:00:00 2001 +From 5b0f458a7e9c26380be2663e9ea2b7fd21b276b4 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:30 -0700 Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index c2f4337d0..50629ff33 100644 +index cd97aa30f..835fd7461 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -158,6 +158,12 @@ public class EntityPig extends EntityAnimal { @@ -22,7 +22,7 @@ index c2f4337d0..50629ff33 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 67be37ae8..34945598c 100644 +index fa7ec707f..2562cc45e 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -622,6 +622,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { @@ -37,7 +37,7 @@ index 67be37ae8..34945598c 100644 + entitywitch.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); entitywitch.prepare(this.world.D(new BlockPosition(entitywitch)), (GroupDataEntity) null); - entitywitch.setAI(this.hasAI()); + entitywitch.setNoAI(this.isNoAI()); @@ -630,7 +636,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { entitywitch.setCustomNameVisible(this.getCustomNameVisible()); } @@ -67,5 +67,5 @@ index a16694ecc..2ff9cee86 100644 HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power); horse.getBukkitEntity().getServer().getPluginManager().callEvent(event); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0171-Optimise-removeQueue.patch b/Spigot-Server-Patches/0171-Optimise-removeQueue.patch index ebbafe714b..e496bb18dc 100644 --- a/Spigot-Server-Patches/0171-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0171-Optimise-removeQueue.patch @@ -1,11 +1,11 @@ -From 2a0980201b14be31b4fbb88b7a2bb139d0acb07d Mon Sep 17 00:00:00 2001 +From c318f830a7efb9c5f4a9cda7c7d0b25841ae3a14 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 c8183de48..1aa2d2e0a 100644 +index 182513efd..3906d4bf7 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -3,8 +3,10 @@ package net.minecraft.server; @@ -25,9 +25,9 @@ index c8183de48..1aa2d2e0a 100644 public double e; - public final List removeQueue = Lists.newLinkedList(); + public final Deque removeQueue = new ArrayDeque<>(); // Paper - private final AdvancementDataPlayer bZ; - private final ServerStatisticManager ca; - private float cb = Float.MIN_VALUE; + private final AdvancementDataPlayer bY; + private final ServerStatisticManager bZ; + private float ca = Float.MIN_VALUE; @@ -286,10 +288,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { Iterator iterator = this.removeQueue.iterator(); int j = 0; @@ -49,17 +49,17 @@ index c8183de48..1aa2d2e0a 100644 } @@ -1097,7 +1106,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; - this.ci = -1; - // this.cs.a((RecipeBook) entityplayer.cs); // CraftBukkit + this.ch = -1; + // this.cr.a((RecipeBook) entityplayer.cr); // CraftBukkit - this.removeQueue.addAll(entityplayer.removeQueue); -+ //this.removeQueue.addAll(entityplayer.removeQueue); // Paper ++ // Paper start - Optimize remove queue ++ //this.removeQueue.addAll(entityplayer.removeQueue); + if (this.removeQueue != entityplayer.removeQueue) { + this.removeQueue.addAll(entityplayer.removeQueue); + } -+ // Paper end - this.cr = entityplayer.cr; - this.cw = entityplayer.cw; + this.cq = entityplayer.cq; + this.cv = entityplayer.cv; this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch index c9b7210338..275a677a7f 100644 --- a/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch @@ -1,14 +1,14 @@ -From 23a9480ea73edb509eb133e92e578716a845b593 Mon Sep 17 00:00:00 2001 +From 1a83b78d191a6c856d17fc6c5e756af2caa326a7 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 5476aa5f7..ca05b3310 100644 +index 7ced4d196..c5c701f08 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -144,7 +144,7 @@ public abstract class Entity implements ICommandListener { +@@ -145,7 +145,7 @@ public abstract class Entity implements ICommandListener { public boolean ah; public boolean impulse; public int portalCooldown; @@ -18,7 +18,7 @@ index 5476aa5f7..ca05b3310 100644 public int dimension; protected BlockPosition an; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index e6a1e5a2a..d905c338f 100644 +index 1ef0fbe4d..95cc18716 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -185,6 +185,12 @@ public class EntityFishingHook extends Entity { @@ -35,5 +35,5 @@ index e6a1e5a2a..d905c338f 100644 } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch index ed6632651b..07253e4451 100644 --- a/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch @@ -1,11 +1,11 @@ -From e67671b85aa7f183c588d8c6180081451b532cd8 Mon Sep 17 00:00:00 2001 +From 01a1d911ecb592b44ce8101f58c243b4ebf71643 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 16 Dec 2016 22:10:35 -0600 Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ca05b3310..916c63ef7 100644 +index c5c701f08..902df7ac6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -68,7 +68,7 @@ public abstract class Entity implements ICommandListener { @@ -31,7 +31,7 @@ index c0d97f154..363209170 100644 IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cfdd04d8b..42cfbe096 100644 +index 7c12338a5..8537f65fd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1802,6 +1802,33 @@ public abstract class World implements IBlockAccess { @@ -68,8 +68,8 @@ index cfdd04d8b..42cfbe096 100644 public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) { List list = this.getEntities((Entity) null, axisalignedbb); -@@ -2686,7 +2713,7 @@ public abstract class World implements IBlockAccess { - AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition); +@@ -2692,7 +2719,7 @@ public abstract class World implements IBlockAccess { + AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition); // CraftBukkit start - store default return - boolean defaultReturn = axisalignedbb != Block.k && !this.a(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection)); @@ -96,5 +96,5 @@ index 09f009522..2596c2fa0 100644 return event; } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0186-IllegalPacketEvent.patch b/Spigot-Server-Patches/0186-IllegalPacketEvent.patch index a319090384..77be96c824 100644 --- a/Spigot-Server-Patches/0186-IllegalPacketEvent.patch +++ b/Spigot-Server-Patches/0186-IllegalPacketEvent.patch @@ -1,4 +1,4 @@ -From 586ee1ef21797f6f342b7ba3812b8a356d687ef3 Mon Sep 17 00:00:00 2001 +From 81ca3b6d928d35962fbd7988186976ebfaa00756 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 23 Jun 2016 23:33:57 -0400 Subject: [PATCH] IllegalPacketEvent @@ -6,7 +6,7 @@ Subject: [PATCH] IllegalPacketEvent Fired for invalid data from players that represents hacking attempts diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d2742df61..13cce8904 100644 +index 12e07ccc4..9ee2cd17d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -17,7 +17,7 @@ index d2742df61..13cce8904 100644 import co.aikar.timings.MinecraftTimings; // Paper // CraftBukkit end -@@ -2316,8 +2317,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2330,8 +2331,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit } } catch (Exception exception) { @@ -27,7 +27,7 @@ index d2742df61..13cce8904 100644 } } else { String s1; -@@ -2366,8 +2366,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2380,8 +2380,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit } } catch (Exception exception1) { @@ -37,7 +37,7 @@ index d2742df61..13cce8904 100644 } } else if ("MC|TrSel".equals(s)) { try { -@@ -2378,8 +2377,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2392,8 +2391,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { ((ContainerMerchant) container).d(j); } } catch (Exception exception2) { @@ -47,7 +47,7 @@ index d2742df61..13cce8904 100644 } } else { TileEntity tileentity; -@@ -2520,8 +2518,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2534,8 +2532,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { iinventory.update(); } } catch (Exception exception5) { @@ -57,7 +57,7 @@ index d2742df61..13cce8904 100644 } } } else if ("MC|ItemName".equals(s)) { -@@ -2620,8 +2617,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2634,8 +2631,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-2, k, this.player.inventory.getItem(k))); this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex)); } catch (Exception exception7) { @@ -68,5 +68,5 @@ index d2742df61..13cce8904 100644 } // CraftBukkit start -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch index e4c462c91e..7321f9de4e 100644 --- a/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch @@ -1,4 +1,4 @@ -From 0dcf2c05abc7b96dacaeefcfa8bc51bd693f47e5 Mon Sep 17 00:00:00 2001 +From 0b2b35012342c40c9c595e7e0b17b907858f51eb 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,7 +6,7 @@ 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 8d48d7c0c..eca718513 100644 +index 3906d4bf7..0cd711c3e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1477,7 +1477,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,10 +19,10 @@ index 8d48d7c0c..eca718513 100644 public void reset() { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 13cce8904..563781256 100644 +index 9ee2cd17d..32baff5e2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2660,6 +2660,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2674,6 +2674,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start - Add "isDisconnected" method public final boolean isDisconnected() { @@ -31,5 +31,5 @@ index 13cce8904..563781256 100644 } } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch b/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch deleted file mode 100644 index f4d5b70b60..0000000000 --- a/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2f323655c172118c9ceacf8e7fc3ef927eb5d8f1 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 2 Jan 2017 02:07:24 -0500 -Subject: [PATCH] MC-111699: Ignore Improper Anvil Item Name Packets - -The client is improperly sending Item Name Packets to the server BEFORE -the click event. This causes the server to reset before the click event is processed - -This breaks the ability to rename more than 1 item at a time. - -See: https://bugs.mojang.com/browse/MC-111699 - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 563781256..dfeadd9b5 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2529,7 +2529,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767)); - - if (s4.length() <= 30) { -- containeranvil.a(s4); -+ if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699 - } - } else { - containeranvil.a(""); --- -2.13.0 - diff --git a/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch b/Spigot-Server-Patches/0193-ShulkerBox-Dupe-Prevention.patch similarity index 89% rename from Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch rename to Spigot-Server-Patches/0193-ShulkerBox-Dupe-Prevention.patch index 033b9549cd..5ad1e2ad15 100644 --- a/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch +++ b/Spigot-Server-Patches/0193-ShulkerBox-Dupe-Prevention.patch @@ -1,4 +1,4 @@ -From 70ea5a7f810ccde254307100cb4b3e2468e75b2e Mon Sep 17 00:00:00 2001 +From 42c899818ae3a9f16b7da90a314238d331221108 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 16:32:56 -0500 Subject: [PATCH] ShulkerBox Dupe Prevention @@ -7,7 +7,7 @@ This ensures that Shulker Boxes can never drop their contents twice, and that the inventory is cleared incase it some how also got saved to the world. diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java -index e4e0eae60..3fe3af1c2 100644 +index 717dc3245..96a279cb1 100644 --- a/src/main/java/net/minecraft/server/BlockShulkerBox.java +++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java @@ -112,6 +112,7 @@ public class BlockShulkerBox extends BlockTileEntity { @@ -19,5 +19,5 @@ index e4e0eae60..3fe3af1c2 100644 world.updateAdjacentComparators(blockposition, iblockdata.getBlock()); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch b/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch deleted file mode 100644 index 83866368f4..0000000000 --- a/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e02df5ced19ad774237a5a59e10648bdc4221a27 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 2 Jan 2017 02:43:22 -0500 -Subject: [PATCH] MC-112017: Allow 31 instead of 30 for item names - - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index dfeadd9b5..20f026eb8 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2528,7 +2528,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - if (packetplayincustompayload.b() != null && packetplayincustompayload.b().readableBytes() >= 1) { - String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767)); - -- if (s4.length() <= 30) { -+ if (s4.length() <= 31) { // Paper - MC-112017 - if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699 - } - } else { --- -2.13.0 - diff --git a/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0194-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 95% rename from Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-Server-Patches/0194-Provide-E-TE-Chunk-count-stat-methods.patch index e07e0503cf..a2787bf6be 100644 --- a/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0194-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From d8cac48080c65ec26b73eaa47d099a253fc02677 Mon Sep 17 00:00:00 2001 +From 4c9841741385aba32d83180b96b697c9a85fc3dd 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 @@ -41,5 +41,5 @@ index 0466a4f00..7e8913794 100644 public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0195-Enforce-Sync-Player-Saves.patch similarity index 90% rename from Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch rename to Spigot-Server-Patches/0195-Enforce-Sync-Player-Saves.patch index b3ded4b574..4cb8bf3379 100644 --- a/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0195-Enforce-Sync-Player-Saves.patch @@ -1,4 +1,4 @@ -From 705f3fa5e11e66ad53b063acf48c4ac30c964f3f Mon Sep 17 00:00:00 2001 +From 6b831769e307980e82218b51269bb7771119107e 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,7 +7,7 @@ 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 31f2704af..bc2322e62 100644 +index f40bd1f46..772670a03 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1237,6 +1237,7 @@ public abstract class PlayerList { @@ -27,5 +27,5 @@ index 31f2704af..bc2322e62 100644 // Paper end -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/0196-Enforce-Sync-Chunk-Unloads.patch similarity index 94% rename from Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch rename to Spigot-Server-Patches/0196-Enforce-Sync-Chunk-Unloads.patch index b729c21276..88780a2f9c 100644 --- a/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/0196-Enforce-Sync-Chunk-Unloads.patch @@ -1,4 +1,4 @@ -From 5abfe0bb4d3b82b1e0ae4519f32cd6ad047800da Mon Sep 17 00:00:00 2001 +From 9cf1d9a3227e9da7475208a347a6fa6979ad57e8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 16:06:44 -0500 Subject: [PATCH] Enforce Sync Chunk Unloads @@ -27,5 +27,5 @@ index 7e8913794..90565227e 100644 public boolean regenerateChunk(int x, int z) { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0197-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 87% rename from Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch rename to Spigot-Server-Patches/0197-Don-t-allow-entities-to-ride-themselves-572.patch index 02c67d61b6..2655c48919 100644 --- a/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0197-Don-t-allow-entities-to-ride-themselves-572.patch @@ -1,11 +1,11 @@ -From 41e34cb1a54b0b06cdbee8133a921d5ead9f2d56 Mon Sep 17 00:00:00 2001 +From dcc21b45d68b1a0a8f2e60f80db12401e5cb0c76 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 6915be3f1..b8b1b32df 100644 +index 902df7ac6..7339e337b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1932,6 +1932,7 @@ public abstract class Entity implements ICommandListener { @@ -17,5 +17,5 @@ index 6915be3f1..b8b1b32df 100644 throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0200-Fix-block-break-desync.patch b/Spigot-Server-Patches/0198-Fix-block-break-desync.patch similarity index 81% rename from Spigot-Server-Patches/0200-Fix-block-break-desync.patch rename to Spigot-Server-Patches/0198-Fix-block-break-desync.patch index 0f2cb428e5..bab2fa8bfa 100644 --- a/Spigot-Server-Patches/0200-Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/0198-Fix-block-break-desync.patch @@ -1,14 +1,14 @@ -From 04cdbd2f05f55336d24d1c5a7202f432bc1e6fdb Mon Sep 17 00:00:00 2001 +From be57fe91e17458a39a5363009979858e460acb8e 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 20f026eb8..0b6fd67e7 100644 +index 32baff5e2..9b78df95c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -841,6 +841,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -854,6 +854,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { double d3 = d0 * d0 + d1 * d1 + d2 * d2; if (d3 > 36.0D) { @@ -17,5 +17,5 @@ index 20f026eb8..0b6fd67e7 100644 } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) { return; -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch b/Spigot-Server-Patches/0199-Assign-the-World-in-WorldGenStronghold.patch similarity index 90% rename from Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch rename to Spigot-Server-Patches/0199-Assign-the-World-in-WorldGenStronghold.patch index 875ca684a3..fc008207c5 100644 --- a/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch +++ b/Spigot-Server-Patches/0199-Assign-the-World-in-WorldGenStronghold.patch @@ -1,4 +1,4 @@ -From 2584f2a43ff84bf1511982c31e4aa486a7591648 Mon Sep 17 00:00:00 2001 +From bc489cba868db887dd685a83b37709c9ae4b4d7e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 14 Jan 2017 01:22:07 -0600 Subject: [PATCH] Assign the World in WorldGenStronghold @@ -17,5 +17,5 @@ index c93754704..a3b958e01 100644 this.c(); this.b = true; -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch b/Spigot-Server-Patches/0200-Add-fromBottle-flag-to-Experience-Orbs.patch similarity index 97% rename from Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch rename to Spigot-Server-Patches/0200-Add-fromBottle-flag-to-Experience-Orbs.patch index 463b82163e..b5ab00bcd2 100644 --- a/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch +++ b/Spigot-Server-Patches/0200-Add-fromBottle-flag-to-Experience-Orbs.patch @@ -1,4 +1,4 @@ -From 63ae5b4d30b267fadb29c296b011b363297ddf3d Mon Sep 17 00:00:00 2001 +From a47f1a0fe6de4126bee3b618dea9a818eebf696d Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 14 Jan 2017 16:15:26 -0600 Subject: [PATCH] Add fromBottle flag to Experience Orbs @@ -68,5 +68,5 @@ index 3a09cab3d..61e3c6c3e 100644 public EntityExperienceOrb getHandle() { return (EntityExperienceOrb) entity; -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch b/Spigot-Server-Patches/0201-Remove-the-Vanilla-Method-Profiler.patch similarity index 95% rename from Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch rename to Spigot-Server-Patches/0201-Remove-the-Vanilla-Method-Profiler.patch index a4cf914a2b..c520dad95e 100644 --- a/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch +++ b/Spigot-Server-Patches/0201-Remove-the-Vanilla-Method-Profiler.patch @@ -1,11 +1,11 @@ -From b935b5011a9c2baba9f8e995eef8aca014cd5c5a Mon Sep 17 00:00:00 2001 +From 422fc51628abbf451c35a053a7f790458231d0b6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jan 2017 02:00:33 -0500 Subject: [PATCH] Remove the Vanilla Method Profiler Spigot rebrought this back after it was removed for years due to the performance hit. -It is unknown if the JIT will optimize it out as effeciently with how it was +It is unknown if the JIT will optimize it out as efficiently with how it was added, so we do not want any risk of performance degredation. Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior. @@ -79,5 +79,5 @@ index 20aa10c14..ebc324ed1 100644 + } +} -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0202-Cap-Entity-Collisions.patch similarity index 90% rename from Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch rename to Spigot-Server-Patches/0202-Cap-Entity-Collisions.patch index 664d95486d..bcc3e8f2e4 100644 --- a/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0202-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From 32eddc734b4f69b74edd9273e924dce86dd14dda Mon Sep 17 00:00:00 2001 +From 7068d505f0d0666e4ebdeab8cbf002d43aa8d934 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jan 2017 18:07:56 -0500 Subject: [PATCH] Cap Entity Collisions @@ -27,19 +27,19 @@ index 70af657f5..af953dda4 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b8b1b32df..2794ffa5b 100644 +index 7339e337b..883777223 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -169,6 +169,7 @@ public abstract class Entity implements ICommandListener { + public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; - public boolean fromMobSpawner; + protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f59c67b79..096d56026 100644 +index 75dbd8cf1..e5c7ee17f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2182,8 +2182,11 @@ public abstract class EntityLiving extends Entity { @@ -56,5 +56,5 @@ index f59c67b79..096d56026 100644 this.C(entity); } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch b/Spigot-Server-Patches/0203-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch similarity index 95% rename from Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch rename to Spigot-Server-Patches/0203-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch index d1384d62b7..b5292ac1e0 100644 --- a/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch +++ b/Spigot-Server-Patches/0203-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch @@ -1,4 +1,4 @@ -From ad7da1f8a8c69dde2730efb96e7c0a74c3cd591d Mon Sep 17 00:00:00 2001 +From 8347022cb32d2db6581062434ad5b4027a6344a2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 23 Jan 2017 15:10:25 -0600 Subject: [PATCH] Do not allow a zero max height in BiomeJungle @@ -34,5 +34,5 @@ index 6a0b3a62d..38a7af58c 100644 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); } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0204-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 97% rename from Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch rename to Spigot-Server-Patches/0204-Remove-CraftScheduler-Async-Task-Debugger.patch index 7290159919..598542f8a9 100644 --- a/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/Spigot-Server-Patches/0204-Remove-CraftScheduler-Async-Task-Debugger.patch @@ -1,4 +1,4 @@ -From 7378d1bef77bee51e3373b4f298aebe65af66e38 Mon Sep 17 00:00:00 2001 +From e900c91cb908ebd1d4ea8e794a8eae011817b56d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 00:04:04 -0500 Subject: [PATCH] Remove CraftScheduler Async Task Debugger @@ -58,5 +58,5 @@ index e30cfb7b7..448c27cc7 100644 @Deprecated -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch b/Spigot-Server-Patches/0205-Shame-on-you-Mojang.patch similarity index 96% rename from Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch rename to Spigot-Server-Patches/0205-Shame-on-you-Mojang.patch index 422637ec8a..3fdc30858e 100644 --- a/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/0205-Shame-on-you-Mojang.patch @@ -1,4 +1,4 @@ -From 8c35d14fbafa84a274e7547697ab5e4a3e60fb5a Mon Sep 17 00:00:00 2001 +From 8977f9030e587bde981819fe3d98de12f20b9f52 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 19:17:28 -0500 Subject: [PATCH] Shame on you Mojang @@ -55,5 +55,5 @@ index f07ac0186..21075974d 100644 } } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0206-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch similarity index 93% rename from Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch rename to Spigot-Server-Patches/0206-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 99ff073c8c..1f88a5980a 100644 --- a/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0206-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,4 +1,4 @@ -From 58c7b942a8da27964a169fa592b4946437e0819e Mon Sep 17 00:00:00 2001 +From 44eb22893b71a17924d64f097e0f0017b700074e 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 @@ -18,5 +18,5 @@ index 9159ed023..e54f4f47f 100644 Iterator iterator = this.unloadQueue.iterator(); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0207-Do-not-let-armorstands-drown.patch similarity index 93% rename from Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch rename to Spigot-Server-Patches/0207-Do-not-let-armorstands-drown.patch index 083ae8f125..266bc3a7a1 100644 --- a/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0207-Do-not-let-armorstands-drown.patch @@ -1,4 +1,4 @@ -From c2a37eb20a4c9821e051f945c3b199f60cd8823d Mon Sep 17 00:00:00 2001 +From 73392ce2b1ba0373336cc35cdddf20dffd927980 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 18 Feb 2017 19:29:58 -0600 Subject: [PATCH] Do not let armorstands drown @@ -20,7 +20,7 @@ index 091c96411..693f157ea 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1277ba3c2..ff2fe1b9d 100644 +index e5c7ee17f..00201988f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -189,6 +189,7 @@ public abstract class EntityLiving extends Entity { @@ -41,5 +41,5 @@ index 1277ba3c2..ff2fe1b9d 100644 if (this.getAirTicks() == -20) { this.setAirTicks(0); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch b/Spigot-Server-Patches/0208-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch similarity index 89% rename from Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch rename to Spigot-Server-Patches/0208-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch index 41a47006a7..582dff3519 100644 --- a/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch +++ b/Spigot-Server-Patches/0208-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch @@ -1,4 +1,4 @@ -From f2985676a15e56d1c909b738f04c5c039296546b Mon Sep 17 00:00:00 2001 +From 08133ff898c0aa88964c4b9584089cc9ab44c107 Mon Sep 17 00:00:00 2001 From: kashike Date: Sun, 9 Apr 2017 23:50:15 -0700 Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack @@ -6,7 +6,7 @@ Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack Thanks @gabizou diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 4de2e2b25..b8ac7479d 100644 +index 3aefb023e..8c7f57bc7 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -103,7 +103,7 @@ public final class ItemStack { @@ -19,5 +19,5 @@ index 4de2e2b25..b8ac7479d 100644 // CraftBukkit start - Route through setData for filtering // this.damage = Math.max(0, nbttagcompound.getShort("Damage")); -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0209-Properly-handle-async-calls-to-restart-the-server.patch similarity index 97% rename from Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch rename to Spigot-Server-Patches/0209-Properly-handle-async-calls-to-restart-the-server.patch index da8193438d..067ab82a35 100644 --- a/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0209-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From be5defaa5ff4f435f770d33606670e0271d1cf32 Mon Sep 17 00:00:00 2001 +From b181211ad3bd0a7823863febec582c4f38cb219e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 23:34:11 -0500 Subject: [PATCH] Properly handle async calls to restart the server @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 40514d042..f0743e6cc 100644 +index 42769d164..6c5b40f32 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -70,6 +70,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -78,7 +78,7 @@ index 40514d042..f0743e6cc 100644 return this.serverThread; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 072de1f71..4483beeba 100644 +index 772670a03..34f113ee5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1361,10 +1361,15 @@ public abstract class PlayerList { @@ -107,14 +107,16 @@ index 072de1f71..4483beeba 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 49768734d..d51636c8e 100644 +index 49768734d..e1bc3e64e 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -45,88 +45,123 @@ public class RestartCommand extends Command +@@ -45,88 +45,119 @@ public class RestartCommand extends Command AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us try { - if ( script.isFile() ) +- { +- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript ); + // Paper - extract method and cleanup + boolean isRestarting = addShutdownHook(script); + if (isRestarting) { @@ -122,39 +124,11 @@ index 49768734d..d51636c8e 100644 + } else { + System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." ); + } -+ -+ // Stop the watchdog -+ WatchdogThread.doStop(); -+ -+ shutdownServer(isRestarting); -+ } catch ( Exception ex ) -+ { -+ ex.printStackTrace(); -+ } -+ } -+ -+ // Paper start - sync copied from above with minor changes, async added -+ private static void shutdownServer(boolean isRestarting) -+ { -+ if (MinecraftServer.getServer().isMainThread()) -+ { -+ // Kick all players -+ for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) -+ { -+ p.playerConnection.disconnect(SpigotConfig.restartMessage); -+ } -+ // Give the socket a chance to send the packets -+ try -+ { -+ Thread.sleep( 100 ); -+ } catch ( InterruptedException ex ) - { -- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript ); -+ } - // Disable Watchdog - WatchdogThread.doStop(); -+ closeSocket(); ++ // Stop the watchdog ++ WatchdogThread.doStop(); - // Kick all players - for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players ) @@ -170,14 +144,7 @@ index 49768734d..d51636c8e 100644 - } - // Close the socket so we can rebind with the new process - MinecraftServer.getServer().getServerConnection().b(); -+ // Actually shutdown -+ try -+ { -+ MinecraftServer.getServer().stop(); -+ } catch ( Throwable t ) -+ { -+ } - +- - // Give time for it to kick in - try - { @@ -185,8 +152,12 @@ index 49768734d..d51636c8e 100644 - } catch ( InterruptedException ex ) - { - } -+ // Actually stop the JVM -+ System.exit(0); ++ shutdownServer(isRestarting); ++ } catch ( Exception ex ) ++ { ++ ex.printStackTrace(); ++ } ++ } - // Actually shutdown - try @@ -195,10 +166,23 @@ index 49768734d..d51636c8e 100644 - } catch ( Throwable t ) - { - } -+ } else ++ // Paper start - sync copied from above with minor changes, async added ++ private static void shutdownServer(boolean isRestarting) ++ { ++ if (MinecraftServer.getServer().isMainThread()) + { -+ // Mark the server to shutdown at the end of the tick -+ MinecraftServer.getServer().safeShutdown(isRestarting); ++ // Kick all players ++ for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) ++ { ++ p.playerConnection.disconnect(SpigotConfig.restartMessage); ++ } ++ // Give the socket a chance to send the packets ++ try ++ { ++ Thread.sleep( 100 ); ++ } catch ( InterruptedException ex ) ++ { ++ } - // This will be done AFTER the server has completely halted - Thread shutdownHook = new Thread() @@ -225,19 +209,24 @@ index 49768734d..d51636c8e 100644 - } - } - }; ++ closeSocket(); - shutdownHook.setDaemon( true ); - Runtime.getRuntime().addShutdownHook( shutdownHook ); - } else -+ // wait 10 seconds to see if we're actually going to try shutdown ++ // Actually shutdown + try -+ { -+ Thread.sleep(10000); -+ } -+ catch (InterruptedException ignored) { - System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." ); -- ++ MinecraftServer.getServer().stop(); ++ } catch ( Throwable t ) ++ { ++ } ++ } else ++ { ++ // Mark the server to shutdown at the end of the tick ++ MinecraftServer.getServer().safeShutdown(isRestarting); + - // Actually shutdown - try - { @@ -245,6 +234,14 @@ index 49768734d..d51636c8e 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 @@ -306,5 +303,5 @@ index 49768734d..d51636c8e 100644 } } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/0210-Add-system-property-to-disable-book-size-limits.patch similarity index 97% rename from Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch rename to Spigot-Server-Patches/0210-Add-system-property-to-disable-book-size-limits.patch index ff3159fc90..7c433775ab 100644 --- a/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/0210-Add-system-property-to-disable-book-size-limits.patch @@ -1,4 +1,4 @@ -From 3070c87a6a11d298b3182731b7f1f48ffaa0c1e1 Mon Sep 17 00:00:00 2001 +From e0c1617d10bbfc473598b7e10abaccd1a1cc3086 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 13 May 2017 20:11:21 -0500 Subject: [PATCH] Add system property to disable book size limits @@ -57,5 +57,5 @@ index 5d971f07b..6a7d10344 100644 } -- -2.13.0 +2.13.0.windows.1 diff --git a/Spigot-Server-Patches/0213-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0211-Add-option-to-make-parrots-stay-on-shoulders-despite.patch similarity index 89% rename from Spigot-Server-Patches/0213-Add-option-to-make-parrots-stay-on-shoulders-despite.patch rename to Spigot-Server-Patches/0211-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index ae53277e28..aea862a8dd 100644 --- a/Spigot-Server-Patches/0213-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0211-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -1,4 +1,4 @@ -From 20de43ace6818d683b68d70a87343a9760b7a720 Mon Sep 17 00:00:00 2001 +From efc2c4c5cf777c6d3586b5edbb388853de234d86 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,23 +26,23 @@ index af953dda4..1ce3aaa8c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 29c2fd4c9..02f3c001b 100644 +index 7d79e4625..a977a6775 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -400,7 +400,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -399,7 +399,7 @@ public abstract class EntityHuman extends EntityLiving { this.j(this.getShoulderEntityLeft()); this.j(this.getShoulderEntityRight()); - if (!this.world.isClientSide && (!this.onGround || this.isInWater())) { + if (!this.world.isClientSide && (!this.onGround || this.isInWater() || this.isPassenger())) { - this.releaseShoulderEntities(); + if (!this.world.paperConfig.parrotsHangOnBetter) this.releaseShoulderEntities(); // Paper - Hang on! } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0b6fd67e7..7a4673278 100644 +index 9b78df95c..3c59a2f40 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1482,6 +1482,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1495,6 +1495,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { switch (packetplayinentityaction.b()) { case START_SNEAKING: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0214-Workaround-for-jansi-bug-with-Windows.patch b/Spigot-Server-Patches/0212-Workaround-for-jansi-bug-with-Windows.patch similarity index 94% rename from Spigot-Server-Patches/0214-Workaround-for-jansi-bug-with-Windows.patch rename to Spigot-Server-Patches/0212-Workaround-for-jansi-bug-with-Windows.patch index 9e146b70a5..3495df721c 100644 --- a/Spigot-Server-Patches/0214-Workaround-for-jansi-bug-with-Windows.patch +++ b/Spigot-Server-Patches/0212-Workaround-for-jansi-bug-with-Windows.patch @@ -1,4 +1,4 @@ -From 7515b0a14c40747bdfd29e56590134b090e76521 Mon Sep 17 00:00:00 2001 +From 949514e1e5cf558538e8676bcf8c858034539483 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 17 May 2017 17:45:19 -0500 Subject: [PATCH] Workaround for jansi bug with Windows @@ -25,5 +25,5 @@ index dab983481..20902dc38 100644 } else { // This ensures the terminal literal will always match the jline implementation -- -2.13.0 +2.13.0.windows.1 diff --git a/scripts/upstreamMerge.sh b/scripts/upstreamMerge.sh index 11dd71dea3..aa673419d8 100755 --- a/scripts/upstreamMerge.sh +++ b/scripts/upstreamMerge.sh @@ -17,7 +17,7 @@ update Bukkit update CraftBukkit update Spigot -if [[ "$2" = "all" ]] ; then +if [[ "$2" = "all" || "$2" = "a" ]] ; then update BuildData update Paperclip fi diff --git a/work/BuildData b/work/BuildData index f4d4fd9c0f..ceb1b906af 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit f4d4fd9c0ff899191e17fb7f7a3673f5529c0e05 +Subproject commit ceb1b906afeaa302a4038f73c2d2029914c6a6b2 diff --git a/work/Bukkit b/work/Bukkit index 211c15e446..60a4fa84ba 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 211c15e44665dd0365460fb3330411dca6dbbe53 +Subproject commit 60a4fa84ba7a6254d77017501a900b148aad2bfe diff --git a/work/CraftBukkit b/work/CraftBukkit index 3ecbb59cbb..c7920f4302 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 3ecbb59cbb9e20064d04628d26387742705ab9ac +Subproject commit c7920f4302bce2042aa9c5d1d121e488cb88f7f0 diff --git a/work/Spigot b/work/Spigot index 1ffab67d68..662916298a 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 1ffab67d68300a10e9c01d0ae2f87fba30e82a92 +Subproject commit 662916298a344f788a6e3cafaa90f06ad48232d2