From ec31ab32af36990e2bfcfb3db779e3fded42d1f5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 19:19:35 -0500 Subject: [PATCH] Shame on you Mojang Someone wrote some horrible code that throws a world accessing task onto the HTTP DOWNLOADER Thread Pool, for an activity that is not even heavy enough to warrant async operation. This then triggers async chunk loads! What in the hell were you thinking? --- .../0210-Shame-on-you-Mojang.patch | 59 +++++++++++++++++++ scripts/importmcdev.sh | 1 + 2 files changed, 60 insertions(+) create mode 100644 Spigot-Server-Patches/0210-Shame-on-you-Mojang.patch diff --git a/Spigot-Server-Patches/0210-Shame-on-you-Mojang.patch b/Spigot-Server-Patches/0210-Shame-on-you-Mojang.patch new file mode 100644 index 0000000000..315e71c4b1 --- /dev/null +++ b/Spigot-Server-Patches/0210-Shame-on-you-Mojang.patch @@ -0,0 +1,59 @@ +From b951de24deaad1aa60d6c8ec76b9788a6091fae0 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 5 Feb 2017 19:17:28 -0500 +Subject: [PATCH] Shame on you Mojang + +Someone wrote some horrible code that throws a world accessing task +onto the HTTP DOWNLOADER Thread Pool, for an activity that is not even +heavy enough to warrant async operation. + +This then triggers async chunk loads! + +What in the hell were you thinking? + +diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java +index f44f05620..74c371179 100644 +--- a/src/main/java/net/minecraft/server/BlockBeacon.java ++++ b/src/main/java/net/minecraft/server/BlockBeacon.java +@@ -62,8 +62,8 @@ public class BlockBeacon extends BlockTileEntity { + } + + public static void c(final World world, final BlockPosition blockposition) { +- HttpUtilities.a.submit(new Runnable() { +- public void run() { ++ /*HttpUtilities.a.submit(new Runnable() { ++ public void run() {*/ // Paper + Chunk chunk = world.getChunkAtWorldCoords(blockposition); + + for (int i = blockposition.getY() - 1; i >= 0; --i) { +@@ -76,8 +76,8 @@ public class BlockBeacon extends BlockTileEntity { + IBlockData iblockdata = world.getType(blockposition1); + + if (iblockdata.getBlock() == Blocks.BEACON) { +- ((WorldServer) world).postToMainThread(new Runnable() { +- public void run() { ++ /*((WorldServer) world).postToMainThread(new Runnable() { ++ public void run() {*/ // Paper + TileEntity tileentity = world.getTileEntity(blockposition); + + if (tileentity instanceof TileEntityBeacon) { +@@ -85,12 +85,12 @@ public class BlockBeacon extends BlockTileEntity { + world.playBlockAction(blockposition, Blocks.BEACON, 1, 0); + } + +- } +- }); ++ /*} ++ });*/ // Paper + } + } + +- } +- }); ++ /*} ++ });*/ // Paper + } + } +-- +2.11.0 + diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 42bdbdf403..b4f4c1f8a6 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -40,6 +40,7 @@ import BaseBlockPosition import BiomeBase import BiomeJungle import BiomeMesa +import BlockBeacon import BlockChest import BlockFalling import BlockFurnace