2018-01-18 07:00:51 +01:00
|
|
|
From 4d09624b3f9bfda502cf181485092be9ba875a0d Mon Sep 17 00:00:00 2001
|
2017-02-06 01:19:35 +01:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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
|
2018-01-18 07:00:51 +01:00
|
|
|
index f07ac0186..21075974d 100644
|
2017-02-06 01:19:35 +01:00
|
|
|
--- 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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2018-01-18 07:00:51 +01:00
|
|
|
2.16.1
|
2017-02-06 01:19:35 +01:00
|
|
|
|