From cbd70031ec25041cdfd1e25dbc1eb7187263f1fa Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 6 Dec 2018 22:02:57 -0500 Subject: Update upstream CB/S --- work/CraftBukkit Submodule work/CraftBukkit d7bebeff0..acbc348e9: > SPIGOT-4477: Arrows only firing direction of boat > Improve zombie villagers --- work/Spigot Submodule work/Spigot dcd16439b..e8ded36bc: > Rebuild patches > Add PlayerConnection timings --- Spigot-Server-Patches/0008-MC-Utils.patch | 8 +- Spigot-Server-Patches/0009-Timings-v2.patch | 31 ++++-- ...icon-encoding-to-show-properly-on-1.13-cl.patch | 36 +++++++ ...Keep-players-yaw-pitch-on-vehicle-updates.patch | 28 ------ ...icon-encoding-to-show-properly-on-1.13-cl.patch | 36 ------- Spigot-Server-Patches/0368-Limit-Book-Sizes.patch | 86 +++++++++++++++++ Spigot-Server-Patches/0369-Limit-Book-Sizes.patch | 86 ----------------- ...0369-Prevent-rayTrace-from-loading-chunks.patch | 35 +++++++ ...Handle-Large-Packets-disconnecting-client.patch | 104 +++++++++++++++++++++ ...0370-Prevent-rayTrace-from-loading-chunks.patch | 35 ------- ...Handle-Large-Packets-disconnecting-client.patch | 104 --------------------- ...IGOT-2719-Comparator-and-Observer-don-t-t.patch | 72 ++++++++++++++ ...IGOT-2719-Comparator-and-Observer-don-t-t.patch | 72 -------------- work/CraftBukkit | 2 +- work/Spigot | 2 +- 15 files changed, 363 insertions(+), 374 deletions(-) create mode 100644 Spigot-Server-Patches/0367-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch delete mode 100644 Spigot-Server-Patches/0367-Keep-players-yaw-pitch-on-vehicle-updates.patch delete mode 100644 Spigot-Server-Patches/0368-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch create mode 100644 Spigot-Server-Patches/0368-Limit-Book-Sizes.patch delete mode 100644 Spigot-Server-Patches/0369-Limit-Book-Sizes.patch create mode 100644 Spigot-Server-Patches/0369-Prevent-rayTrace-from-loading-chunks.patch create mode 100644 Spigot-Server-Patches/0370-Handle-Large-Packets-disconnecting-client.patch delete mode 100644 Spigot-Server-Patches/0370-Prevent-rayTrace-from-loading-chunks.patch delete mode 100644 Spigot-Server-Patches/0371-Handle-Large-Packets-disconnecting-client.patch create mode 100644 Spigot-Server-Patches/0371-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch delete mode 100644 Spigot-Server-Patches/0372-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch diff --git a/Spigot-Server-Patches/0008-MC-Utils.patch b/Spigot-Server-Patches/0008-MC-Utils.patch index 354aee9dc4..b34ec5852e 100644 --- a/Spigot-Server-Patches/0008-MC-Utils.patch +++ b/Spigot-Server-Patches/0008-MC-Utils.patch @@ -1,4 +1,4 @@ -From 314b0b3eeb050f45dc3e9ba4eb41acf52e24e80f Mon Sep 17 00:00:00 2001 +From 736cdf2368b8d0f95b7c643fa2766d9787378c10 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -354,7 +354,7 @@ index e0cb6aa6..bc638366 100644 public NBTTagList() {} diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 25dedb9d..c98dfd26 100644 +index 8c604ef8..8efcb831 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -65,9 +65,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -370,7 +370,7 @@ index 25dedb9d..c98dfd26 100644 // CraftBukkit start - multithreaded fields private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); -@@ -2160,6 +2160,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2162,6 +2162,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } @@ -379,5 +379,5 @@ index 25dedb9d..c98dfd26 100644 return System.nanoTime() / 1000000L; } -- -2.19.1 +2.19.2 diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 44048cbedd..81216043db 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 4434336cca0aea35c9261dd4abbc5679c8c6a7ca Mon Sep 17 00:00:00 2001 +From 5e253ec4989164677875afdb670324f72b6161bf Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -987,7 +987,7 @@ index eeac3499..e4ed2e99 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c98dfd26..4174fbfd 100644 +index 8efcb831..27a6d1e2 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; @@ -998,7 +998,23 @@ index c98dfd26..4174fbfd 100644 // CraftBukkit end public class PlayerConnection implements PacketListenerPlayIn, ITickable { -@@ -1380,7 +1381,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -135,7 +136,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + // CraftBukkit end + + public void e() { +- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot + this.syncPosition(); + this.player.playerTick(); + this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch); +@@ -208,7 +208,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854 + this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0])); + } +- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot + + } + +@@ -1382,7 +1381,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit end private void handleCommand(String s) { @@ -1007,7 +1023,7 @@ index c98dfd26..4174fbfd 100644 // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); -@@ -1391,22 +1392,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1393,22 +1392,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1428,10 +1444,10 @@ index 14851a3a..9042deed 100644 org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 4c8ab2bc..00000000 +index 666d1eb9..00000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null -@@ -1,174 +0,0 @@ +@@ -1,175 +0,0 @@ -package org.bukkit.craftbukkit; - -import com.google.common.collect.Maps; @@ -1451,6 +1467,7 @@ index 4c8ab2bc..00000000 - public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List"); - public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions"); - public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler"); +- public static final CustomTimingsHandler playerConnectionTimer = new CustomTimingsHandler("** PlayerConnection"); - public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables"); - public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler"); - public static final CustomTimingsHandler chunkIOTickTimer = new CustomTimingsHandler("ChunkIOTick"); @@ -1909,5 +1926,5 @@ index 2bd690fd..38be7ed7 100644 } } -- -2.19.1 +2.19.2 diff --git a/Spigot-Server-Patches/0367-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch b/Spigot-Server-Patches/0367-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch new file mode 100644 index 0000000000..e0cd0bbe8b --- /dev/null +++ b/Spigot-Server-Patches/0367-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch @@ -0,0 +1,36 @@ +From 88f7737821901b4291d56f94b497b50068cda9d0 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Mon, 5 Nov 2018 21:50:13 -0500 +Subject: [PATCH] Fix server icon encoding to show properly on 1.13 clients as + well + + +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index e0546e3d..3b982f99 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -735,7 +735,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs + ImageIO.write(bufferedimage, "PNG", new ByteBufOutputStream(bytebuf)); + /*ByteBuf */ bytebuf1 = Base64.encode(bytebuf); // Paper - cleanup favicon bytebuf + +- serverping.setFavicon("data:image/png;base64," + bytebuf1.toString(StandardCharsets.UTF_8)); ++ serverping.setFavicon("data:image/png;base64," + bytebuf1.toString(StandardCharsets.UTF_8).replace("\n", "")); // Paper - Fix encoding for 1.13+ clients, still compat w/ 1.12 clients + } catch (Exception exception) { + MinecraftServer.LOGGER.error("Couldn\'t load server icon", exception); + } finally { +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 9fe55598..7c82e18b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -1778,7 +1778,7 @@ public final class CraftServer implements Server { + ImageIO.write(image, "PNG", new ByteBufOutputStream(bytebuf)); + ByteBuf bytebuf1 = Base64.encode(bytebuf); + +- return new CraftIconCache("data:image/png;base64," + bytebuf1.toString(Charsets.UTF_8)); ++ return new CraftIconCache("data:image/png;base64," + bytebuf1.toString(Charsets.UTF_8).replace("\n", "")); // Paper - Fix encoding for 1.13+ clients, still compat w/ 1.12 clients + } + + @Override +-- +2.19.2 + diff --git a/Spigot-Server-Patches/0367-Keep-players-yaw-pitch-on-vehicle-updates.patch b/Spigot-Server-Patches/0367-Keep-players-yaw-pitch-on-vehicle-updates.patch deleted file mode 100644 index fc6a018bfb..0000000000 --- a/Spigot-Server-Patches/0367-Keep-players-yaw-pitch-on-vehicle-updates.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 182ee0d285eaeedc1c500912fc51359878544406 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 2 Nov 2018 23:22:34 -0400 -Subject: [PATCH] Keep players yaw/pitch on vehicle updates - - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 398f2fdf83..edd7ba353d 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -375,12 +375,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - Location curPos = this.getPlayer().getLocation(); // Spigot - - entity.setLocation(d3, d4, d5, f, f1); -- player.setLocation(d3, d4, d5, f, f1); // CraftBukkit -+ player.setLocation(d3, d4, d5, player.yaw, player.pitch); // CraftBukkit // Paper - boolean flag2 = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D)).isEmpty(); - - if (flag && (flag1 || !flag2)) { - entity.setLocation(d0, d1, d2, f, f1); -- player.setLocation(d0, d1, d2, f, f1); // CraftBukkit -+ player.setLocation(d3, d4, d5, player.yaw, player.pitch); // CraftBukkit // Paper - this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); - return; - } --- -2.19.1 - diff --git a/Spigot-Server-Patches/0368-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch b/Spigot-Server-Patches/0368-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch deleted file mode 100644 index 2752544c77..0000000000 --- a/Spigot-Server-Patches/0368-Fix-server-icon-encoding-to-show-properly-on-1.13-cl.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4bca90c7e6140df3eedf5527f28d9081ea048508 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Mon, 5 Nov 2018 21:50:13 -0500 -Subject: [PATCH] Fix server icon encoding to show properly on 1.13 clients as - well - - -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e0546e3dd..3b982f990 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -735,7 +735,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs - ImageIO.write(bufferedimage, "PNG", new ByteBufOutputStream(bytebuf)); - /*ByteBuf */ bytebuf1 = Base64.encode(bytebuf); // Paper - cleanup favicon bytebuf - -- serverping.setFavicon("data:image/png;base64," + bytebuf1.toString(StandardCharsets.UTF_8)); -+ serverping.setFavicon("data:image/png;base64," + bytebuf1.toString(StandardCharsets.UTF_8).replace("\n", "")); // Paper - Fix encoding for 1.13+ clients, still compat w/ 1.12 clients - } catch (Exception exception) { - MinecraftServer.LOGGER.error("Couldn\'t load server icon", exception); - } finally { -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9fe555986..7c82e18b9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1778,7 +1778,7 @@ public final class CraftServer implements Server { - ImageIO.write(image, "PNG", new ByteBufOutputStream(bytebuf)); - ByteBuf bytebuf1 = Base64.encode(bytebuf); - -- return new CraftIconCache("data:image/png;base64," + bytebuf1.toString(Charsets.UTF_8)); -+ return new CraftIconCache("data:image/png;base64," + bytebuf1.toString(Charsets.UTF_8).replace("\n", "")); // Paper - Fix encoding for 1.13+ clients, still compat w/ 1.12 clients - } - - @Override --- -2.19.1 - diff --git a/Spigot-Server-Patches/0368-Limit-Book-Sizes.patch b/Spigot-Server-Patches/0368-Limit-Book-Sizes.patch new file mode 100644 index 0000000000..aebda329b4 --- /dev/null +++ b/Spigot-Server-Patches/0368-Limit-Book-Sizes.patch @@ -0,0 +1,86 @@ +From a9f81124c623c9d1003357bb6c4c89ca834f3c2f Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 17 Nov 2018 00:08:54 -0500 +Subject: [PATCH] Limit Book Sizes + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java +index 332e90f8..0ac61f4d 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +@@ -320,4 +320,12 @@ public class PaperConfig { + tabSpamIncrement = getInt("settings.spam-limiter.tab-spam-increment", tabSpamIncrement); + tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); + } ++ ++ ++ public static int maxBookPageSize = 1024; ++ public static double maxBookTotalSizeMultiplier = 0.90D; ++ private static void maxBookSize() { ++ maxBookPageSize = getInt("settings.book-size.page-max", maxBookPageSize); ++ maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); ++ } + } +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index d6d2010d..ea999b70 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -2329,6 +2329,39 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + this.player.a(packetplayinsettings); + } + ++ // Paper start ++ private boolean validateBook(ItemStack testStack) { ++ NBTTagList pageList = testStack.getTag().getList("pages", 8); ++ long byteTotal = 0; ++ int maxBookPageSize = com.destroystokyo.paper.PaperConfig.maxBookPageSize; ++ double multiplier = Math.max(0.3D, Math.min(1D, com.destroystokyo.paper.PaperConfig.maxBookTotalSizeMultiplier)); ++ long byteAllowed = maxBookPageSize; ++ for (int i = 0; i < pageList.size(); ++i) { ++ String testString = pageList.getString(i); ++ int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; ++ byteTotal += byteLength; ++ if (byteTotal > byteAllowed) { ++ PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); ++ minecraftServer.postToMainThread(() -> this.disconnect("Book too large!")); ++ return false; ++ } ++ int length = testString.length(); ++ int multibytes = byteLength == length ? byteLength : (int) Math.round((double) byteLength / (double) length); ++ for (int x = 1; x < multibytes; x++) { ++ multiplier *= multiplier; ++ } ++ byteAllowed += (maxBookPageSize * Math.min(1, Math.max(0.1D, (double) length / 255D))) * multiplier; ++ multiplier *= multiplier; ++ ++ if (multibytes > 1) { ++ // penalize MB some more ++ byteAllowed -= length; ++ } ++ } ++ return true; ++ } ++ // Paper end ++ + public void a(PacketPlayInCustomPayload packetplayincustompayload) { + PlayerConnectionUtils.ensureMainThread(packetplayincustompayload, this, this.player.x()); + String s = packetplayincustompayload.a(); +@@ -2362,6 +2395,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + } + + if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { ++ if (!validateBook(itemstack)) return; // Paper + itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8)); + CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit + } +@@ -2397,6 +2431,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + } + + if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) { ++ if (!validateBook(itemstack)) return; // Paper + ItemStack itemstack2 = new ItemStack(Items.WRITTEN_BOOK); + + itemstack2.a("author", (NBTBase) (new NBTTagString(this.player.getName()))); +-- +2.19.2 + diff --git a/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch b/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch deleted file mode 100644 index 8ec9027669..0000000000 --- a/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b037f9c518d26ee6c566647b9df1d2ceed356fda Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 17 Nov 2018 00:08:54 -0500 -Subject: [PATCH] Limit Book Sizes - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 332e90f86b..0ac61f4de0 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -320,4 +320,12 @@ public class PaperConfig { - tabSpamIncrement = getInt("settings.spam-limiter.tab-spam-increment", tabSpamIncrement); - tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); - } -+ -+ -+ public static int maxBookPageSize = 1024; -+ public static double maxBookTotalSizeMultiplier = 0.90D; -+ private static void maxBookSize() { -+ maxBookPageSize = getInt("settings.book-size.page-max", maxBookPageSize); -+ maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); -+ } - } -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index edd7ba353d..4c35132892 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2329,6 +2329,39 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - this.player.a(packetplayinsettings); - } - -+ // Paper start -+ private boolean validateBook(ItemStack testStack) { -+ NBTTagList pageList = testStack.getTag().getList("pages", 8); -+ long byteTotal = 0; -+ int maxBookPageSize = com.destroystokyo.paper.PaperConfig.maxBookPageSize; -+ double multiplier = Math.max(0.3D, Math.min(1D, com.destroystokyo.paper.PaperConfig.maxBookTotalSizeMultiplier)); -+ long byteAllowed = maxBookPageSize; -+ for (int i = 0; i < pageList.size(); ++i) { -+ String testString = pageList.getString(i); -+ int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; -+ byteTotal += byteLength; -+ if (byteTotal > byteAllowed) { -+ PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); -+ minecraftServer.postToMainThread(() -> this.disconnect("Book too large!")); -+ return false; -+ } -+ int length = testString.length(); -+ int multibytes = byteLength == length ? byteLength : (int) Math.round((double) byteLength / (double) length); -+ for (int x = 1; x < multibytes; x++) { -+ multiplier *= multiplier; -+ } -+ byteAllowed += (maxBookPageSize * Math.min(1, Math.max(0.1D, (double) length / 255D))) * multiplier; -+ multiplier *= multiplier; -+ -+ if (multibytes > 1) { -+ // penalize MB some more -+ byteAllowed -= length; -+ } -+ } -+ return true; -+ } -+ // Paper end -+ - public void a(PacketPlayInCustomPayload packetplayincustompayload) { - PlayerConnectionUtils.ensureMainThread(packetplayincustompayload, this, this.player.x()); - String s = packetplayincustompayload.a(); -@@ -2362,6 +2395,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - } - - if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { -+ if (!validateBook(itemstack)) return; // Paper - itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8)); - CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit - } -@@ -2397,6 +2431,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - } - - if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) { -+ if (!validateBook(itemstack)) return; // Paper - ItemStack itemstack2 = new ItemStack(Items.WRITTEN_BOOK); - - itemstack2.a("author", (NBTBase) (new NBTTagString(this.player.getName()))); --- -2.19.1 - diff --git a/Spigot-Server-Patches/0369-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0369-Prevent-rayTrace-from-loading-chunks.patch new file mode 100644 index 0000000000..9ea4fada3a --- /dev/null +++ b/Spigot-Server-Patches/0369-Prevent-rayTrace-from-loading-chunks.patch @@ -0,0 +1,35 @@ +From a55fa31b0d23301861e55b4c70ebee7ad66c519d Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 26 Nov 2018 19:44:01 -0500 +Subject: [PATCH] Prevent rayTrace from loading chunks + +ray tracing into an unloaded chunk should be treated as a miss +this saves a ton of lag for when AI tries to raytrace near unloaded chunks. + +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 7633a613..bc231c7f 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -932,7 +932,8 @@ public abstract class World implements IBlockAccess { + int i1 = MathHelper.floor(vec3d.y); + int j1 = MathHelper.floor(vec3d.z); + BlockPosition blockposition = new BlockPosition(l, i1, j1); +- IBlockData iblockdata = this.getType(blockposition); ++ IBlockData iblockdata = this.getTypeIfLoaded(blockposition); // Paper ++ if (iblockdata == null) return null; // Paper + Block block = iblockdata.getBlock(); + + if ((!flag1 || iblockdata.d(this, blockposition) != Block.k) && block.a(iblockdata, flag)) { +@@ -1034,7 +1035,8 @@ public abstract class World implements IBlockAccess { + i1 = MathHelper.floor(vec3d.y) - (enumdirection == EnumDirection.UP ? 1 : 0); + j1 = MathHelper.floor(vec3d.z) - (enumdirection == EnumDirection.SOUTH ? 1 : 0); + blockposition = new BlockPosition(l, i1, j1); +- IBlockData iblockdata1 = this.getType(blockposition); ++ IBlockData iblockdata1 = this.getTypeIfLoaded(blockposition); // Paper ++ if (iblockdata1 == null) return null; // Paper + Block block1 = iblockdata1.getBlock(); + + if (!flag1 || iblockdata1.getMaterial() == Material.PORTAL || iblockdata1.d(this, blockposition) != Block.k) { +-- +2.19.2 + diff --git a/Spigot-Server-Patches/0370-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0370-Handle-Large-Packets-disconnecting-client.patch new file mode 100644 index 0000000000..3aa860fedd --- /dev/null +++ b/Spigot-Server-Patches/0370-Handle-Large-Packets-disconnecting-client.patch @@ -0,0 +1,104 @@ +From 68670b9f2491fd93af0b802272f6d9f08ed75474 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Tue, 27 Nov 2018 21:18:06 -0500 +Subject: [PATCH] Handle Large Packets disconnecting client + +If a players inventory is too big to send in a single packet, +split the inventory set into multiple packets instead. + +diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java +index 3d32e005..a7fcc14f 100644 +--- a/src/main/java/net/minecraft/server/NetworkManager.java ++++ b/src/main/java/net/minecraft/server/NetworkManager.java +@@ -112,6 +112,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { + } + + public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) throws Exception { ++ // Paper start ++ if (throwable instanceof io.netty.handler.codec.EncoderException && throwable.getCause() instanceof PacketEncoder.PacketTooLargeException) { ++ if (((PacketEncoder.PacketTooLargeException) throwable.getCause()).getPacket().packetTooLarge(this)) { ++ return; ++ } else { ++ throwable = throwable.getCause(); ++ } ++ } ++ // Paper end + ChatMessage chatmessage; + + if (throwable instanceof TimeoutException) { +diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java +index fdc142b7..b283e155 100644 +--- a/src/main/java/net/minecraft/server/Packet.java ++++ b/src/main/java/net/minecraft/server/Packet.java +@@ -8,5 +8,10 @@ public interface Packet { + + void b(PacketDataSerializer packetdataserializer) throws IOException; + ++ // Paper start ++ default boolean packetTooLarge(NetworkManager manager) { ++ return false; ++ } ++ // Paper end + void a(T t0); + } +diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java +index a6da6f5c..4e263aa8 100644 +--- a/src/main/java/net/minecraft/server/PacketEncoder.java ++++ b/src/main/java/net/minecraft/server/PacketEncoder.java +@@ -44,11 +44,32 @@ public class PacketEncoder extends MessageToByteEncoder> { + PacketEncoder.a.error(throwable); + } + ++ // Paper start ++ int packetLength = bytebuf.readableBytes(); ++ if (packetLength > MAX_PACKET_SIZE) { ++ throw new PacketTooLargeException(packet, packetLength); ++ } ++ // Paper end + } + } + } + +- protected void encode(ChannelHandlerContext channelhandlercontext, Object object, ByteBuf bytebuf) throws Exception { ++ // Paper start ++ private static int MAX_PACKET_SIZE = 2097152; ++ public static class PacketTooLargeException extends RuntimeException { ++ private final Packet packet; ++ PacketTooLargeException(Packet packet, int packetLength) { ++ super("PacketTooLarge - " + packet.getClass().getSimpleName() + " is " + packetLength +". Max is " + MAX_PACKET_SIZE); ++ this.packet = packet; ++ } ++ ++ public Packet getPacket() { ++ return packet; ++ } ++ } ++ // Paper end ++ ++ protected void encode(ChannelHandlerContext channelhandlercontext, Packet object, ByteBuf bytebuf) throws Exception { // Paper - decompile fix + this.a(channelhandlercontext, (Packet) object, bytebuf); + } + } +diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +index bf47c824..e054757d 100644 +--- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java ++++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +@@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet { + private int a; + private List b; + ++ //Paper start ++ @Override ++ public boolean packetTooLarge(NetworkManager manager) { ++ for (int i = 0 ; i < this.b.size() ; i++) { ++ manager.sendPacket(new PacketPlayOutSetSlot(this.a, i, this.b.get(i))); ++ } ++ return true; ++ } ++ // Paper end + public PacketPlayOutWindowItems() {} + + public PacketPlayOutWindowItems(int i, NonNullList nonnulllist) { +-- +2.19.2 + diff --git a/Spigot-Server-Patches/0370-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0370-Prevent-rayTrace-from-loading-chunks.patch deleted file mode 100644 index 74fbc08b90..0000000000 --- a/Spigot-Server-Patches/0370-Prevent-rayTrace-from-loading-chunks.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b0f9bb4104252c176abf468b9563a0008409e688 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 26 Nov 2018 19:44:01 -0500 -Subject: [PATCH] Prevent rayTrace from loading chunks - -ray tracing into an unloaded chunk should be treated as a miss -this saves a ton of lag for when AI tries to raytrace near unloaded chunks. - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7633a61342..bc231c7f29 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -932,7 +932,8 @@ public abstract class World implements IBlockAccess { - int i1 = MathHelper.floor(vec3d.y); - int j1 = MathHelper.floor(vec3d.z); - BlockPosition blockposition = new BlockPosition(l, i1, j1); -- IBlockData iblockdata = this.getType(blockposition); -+ IBlockData iblockdata = this.getTypeIfLoaded(blockposition); // Paper -+ if (iblockdata == null) return null; // Paper - Block block = iblockdata.getBlock(); - - if ((!flag1 || iblockdata.d(this, blockposition) != Block.k) && block.a(iblockdata, flag)) { -@@ -1034,7 +1035,8 @@ public abstract class World implements IBlockAccess { - i1 = MathHelper.floor(vec3d.y) - (enumdirection == EnumDirection.UP ? 1 : 0); - j1 = MathHelper.floor(vec3d.z) - (enumdirection == EnumDirection.SOUTH ? 1 : 0); - blockposition = new BlockPosition(l, i1, j1); -- IBlockData iblockdata1 = this.getType(blockposition); -+ IBlockData iblockdata1 = this.getTypeIfLoaded(blockposition); // Paper -+ if (iblockdata1 == null) return null; // Paper - Block block1 = iblockdata1.getBlock(); - - if (!flag1 || iblockdata1.getMaterial() == Material.PORTAL || iblockdata1.d(this, blockposition) != Block.k) { --- -2.19.1 - diff --git a/Spigot-Server-Patches/0371-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0371-Handle-Large-Packets-disconnecting-client.patch deleted file mode 100644 index 4fe46ff061..0000000000 --- a/Spigot-Server-Patches/0371-Handle-Large-Packets-disconnecting-client.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 158c65a57917f6a0b3c27f5b67f834306e229194 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Tue, 27 Nov 2018 21:18:06 -0500 -Subject: [PATCH] Handle Large Packets disconnecting client - -If a players inventory is too big to send in a single packet, -split the inventory set into multiple packets instead. - -diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 3d32e0056..a7fcc14f2 100644 ---- a/src/main/java/net/minecraft/server/NetworkManager.java -+++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -112,6 +112,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { - } - - public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) throws Exception { -+ // Paper start -+ if (throwable instanceof io.netty.handler.codec.EncoderException && throwable.getCause() instanceof PacketEncoder.PacketTooLargeException) { -+ if (((PacketEncoder.PacketTooLargeException) throwable.getCause()).getPacket().packetTooLarge(this)) { -+ return; -+ } else { -+ throwable = throwable.getCause(); -+ } -+ } -+ // Paper end - ChatMessage chatmessage; - - if (throwable instanceof TimeoutException) { -diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index fdc142b75..b283e1557 100644 ---- a/src/main/java/net/minecraft/server/Packet.java -+++ b/src/main/java/net/minecraft/server/Packet.java -@@ -8,5 +8,10 @@ public interface Packet { - - void b(PacketDataSerializer packetdataserializer) throws IOException; - -+ // Paper start -+ default boolean packetTooLarge(NetworkManager manager) { -+ return false; -+ } -+ // Paper end - void a(T t0); - } -diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index a6da6f5cc..4e263aa8d 100644 ---- a/src/main/java/net/minecraft/server/PacketEncoder.java -+++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -44,11 +44,32 @@ public class PacketEncoder extends MessageToByteEncoder> { - PacketEncoder.a.error(throwable); - } - -+ // Paper start -+ int packetLength = bytebuf.readableBytes(); -+ if (packetLength > MAX_PACKET_SIZE) { -+ throw new PacketTooLargeException(packet, packetLength); -+ } -+ // Paper end - } - } - } - -- protected void encode(ChannelHandlerContext channelhandlercontext, Object object, ByteBuf bytebuf) throws Exception { -+ // Paper start -+ private static int MAX_PACKET_SIZE = 2097152; -+ public static class PacketTooLargeException extends RuntimeException { -+ private final Packet packet; -+ PacketTooLargeException(Packet packet, int packetLength) { -+ super("PacketTooLarge - " + packet.getClass().getSimpleName() + " is " + packetLength +". Max is " + MAX_PACKET_SIZE); -+ this.packet = packet; -+ } -+ -+ public Packet getPacket() { -+ return packet; -+ } -+ } -+ // Paper end -+ -+ protected void encode(ChannelHandlerContext channelhandlercontext, Packet object, ByteBuf bytebuf) throws Exception { // Paper - decompile fix - this.a(channelhandlercontext, (Packet) object, bytebuf); - } - } -diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -index bf47c8249..e054757d2 100644 ---- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -+++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -@@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet { - private int a; - private List b; - -+ //Paper start -+ @Override -+ public boolean packetTooLarge(NetworkManager manager) { -+ for (int i = 0 ; i < this.b.size() ; i++) { -+ manager.sendPacket(new PacketPlayOutSetSlot(this.a, i, this.b.get(i))); -+ } -+ return true; -+ } -+ // Paper end - public PacketPlayOutWindowItems() {} - - public PacketPlayOutWindowItems(int i, NonNullList nonnulllist) { --- -2.19.1 - diff --git a/Spigot-Server-Patches/0371-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch b/Spigot-Server-Patches/0371-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch new file mode 100644 index 0000000000..f4e7d4fdfe --- /dev/null +++ b/Spigot-Server-Patches/0371-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch @@ -0,0 +1,72 @@ +From ae78e5026972a2c6190432b90775db89adab66da Mon Sep 17 00:00:00 2001 +From: Amosar +Date: Sat, 1 Dec 2018 20:00:22 +0000 +Subject: [PATCH] backport: SPIGOT-2719: Comparator and Observer don't trigger + BlockRedstoneEvent + + +diff --git a/src/main/java/net/minecraft/server/BlockObserver.java b/src/main/java/net/minecraft/server/BlockObserver.java +index 59e93e6f..5836a763 100644 +--- a/src/main/java/net/minecraft/server/BlockObserver.java ++++ b/src/main/java/net/minecraft/server/BlockObserver.java +@@ -1,6 +1,7 @@ + package net.minecraft.server; + + import java.util.Random; ++import org.bukkit.craftbukkit.event.CraftEventFactory; // Paper + + public class BlockObserver extends BlockDirectional { + +@@ -26,8 +27,18 @@ public class BlockObserver extends BlockDirectional { + + public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { + if (((Boolean) iblockdata.get(BlockObserver.a)).booleanValue()) { ++ // Paper start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) { ++ return; ++ } ++ // Paper end + world.setTypeAndData(blockposition, iblockdata.set(BlockObserver.a, Boolean.valueOf(false)), 2); + } else { ++ // Paper start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) { ++ return; ++ } ++ // Paper end + world.setTypeAndData(blockposition, iblockdata.set(BlockObserver.a, Boolean.valueOf(true)), 2); + world.a(blockposition, (Block) this, 2); + } +diff --git a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java +index 78ad3374..04d973d9 100644 +--- a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java ++++ b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java +@@ -4,6 +4,7 @@ import com.google.common.base.Predicate; + import java.util.List; + import java.util.Random; + import javax.annotation.Nullable; ++import org.bukkit.craftbukkit.event.CraftEventFactory; //Paper + + public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity { + +@@ -164,8 +165,18 @@ public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITile + boolean flag1 = this.A(iblockdata); + + if (flag1 && !flag) { ++ // Paper start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) { ++ return; ++ } ++ // Paper end + world.setTypeAndData(blockposition, iblockdata.set(BlockRedstoneComparator.POWERED, Boolean.valueOf(false)), 2); + } else if (!flag1 && flag) { ++ // Paper start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) { ++ return; ++ } ++ // Paper end + world.setTypeAndData(blockposition, iblockdata.set(BlockRedstoneComparator.POWERED, Boolean.valueOf(true)), 2); + } + +-- +2.19.2 + diff --git a/Spigot-Server-Patches/0372-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch b/Spigot-Server-Patches/0372-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch deleted file mode 100644 index e412e02214..0000000000 --- a/Spigot-Server-Patches/0372-backport-SPIGOT-2719-Comparator-and-Observer-don-t-t.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 778d563e5b2d8141a1df1c4b3fc074928f6552c2 Mon Sep 17 00:00:00 2001 -From: Amosar -Date: Sat, 1 Dec 2018 20:00:22 +0000 -Subject: [PATCH] backport: SPIGOT-2719: Comparator and Observer don't trigger - BlockRedstoneEvent - - -diff --git a/src/main/java/net/minecraft/server/BlockObserver.java b/src/main/java/net/minecraft/server/BlockObserver.java -index 59e93e6f6..5836a7637 100644 ---- a/src/main/java/net/minecraft/server/BlockObserver.java -+++ b/src/main/java/net/minecraft/server/BlockObserver.java -@@ -1,6 +1,7 @@ - package net.minecraft.server; - - import java.util.Random; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // Paper - - public class BlockObserver extends BlockDirectional { - -@@ -26,8 +27,18 @@ public class BlockObserver extends BlockDirectional { - - public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { - if (((Boolean) iblockdata.get(BlockObserver.a)).booleanValue()) { -+ // Paper start -+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) { -+ return; -+ } -+ // Paper end - world.setTypeAndData(blockposition, iblockdata.set(BlockObserver.a, Boolean.valueOf(false)), 2); - } else { -+ // Paper start -+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) { -+ return; -+ } -+ // Paper end - world.setTypeAndData(blockposition, iblockdata.set(BlockObserver.a, Boolean.valueOf(true)), 2); - world.a(blockposition, (Block) this, 2); - } -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java -index 78ad3374d..04d973d9a 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java -@@ -4,6 +4,7 @@ import com.google.common.base.Predicate; - import java.util.List; - import java.util.Random; - import javax.annotation.Nullable; -+import org.bukkit.craftbukkit.event.CraftEventFactory; //Paper - - public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity { - -@@ -164,8 +165,18 @@ public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITile - boolean flag1 = this.A(iblockdata); - - if (flag1 && !flag) { -+ // Paper start -+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) { -+ return; -+ } -+ // Paper end - world.setTypeAndData(blockposition, iblockdata.set(BlockRedstoneComparator.POWERED, Boolean.valueOf(false)), 2); - } else if (!flag1 && flag) { -+ // Paper start -+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) { -+ return; -+ } -+ // Paper end - world.setTypeAndData(blockposition, iblockdata.set(BlockRedstoneComparator.POWERED, Boolean.valueOf(true)), 2); - } - --- -2.19.2 - diff --git a/work/CraftBukkit b/work/CraftBukkit index d7bebeff02..acbc348e92 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d7bebeff028af7baf52105394529598f1c4093c4 +Subproject commit acbc348e925cbdbae41b2055d60bbe40031d470c diff --git a/work/Spigot b/work/Spigot index dcd16439b5..e8ded36bc9 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit dcd16439b51429c18f1028bbe36ff805547050de +Subproject commit e8ded36bc9c1661fc04f83762e3e0e94a273787b -- cgit v1.2.3