mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
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?
This commit is contained in:
parent
c5851f632a
commit
7daac312a5
2 changed files with 58 additions and 0 deletions
57
Spigot-Server-Patches/Shame-on-you-Mojang.patch
Normal file
57
Spigot-Server-Patches/Shame-on-you-Mojang.patch
Normal file
|
@ -0,0 +1,57 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
index f44f05620..74c371179 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockBeacon.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBeacon.java
|
||||
@@ -0,0 +0,0 @@ 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) {
|
||||
@@ -0,0 +0,0 @@ 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) {
|
||||
@@ -0,0 +0,0 @@ public class BlockBeacon extends BlockTileEntity {
|
||||
world.playBlockAction(blockposition, Blocks.BEACON, 1, 0);
|
||||
}
|
||||
|
||||
- }
|
||||
- });
|
||||
+ /*}
|
||||
+ });*/ // Paper
|
||||
}
|
||||
}
|
||||
|
||||
- }
|
||||
- });
|
||||
+ /*}
|
||||
+ });*/ // Paper
|
||||
}
|
||||
}
|
||||
--
|
|
@ -40,6 +40,7 @@ import BaseBlockPosition
|
|||
import BiomeBase
|
||||
import BiomeJungle
|
||||
import BiomeMesa
|
||||
import BlockBeacon
|
||||
import BlockChest
|
||||
import BlockFalling
|
||||
import BlockFurnace
|
||||
|
|
Loading…
Reference in a new issue