mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
74f507f4e3
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e461dcfe #555: Item - add getters/setters for owner/thrower CraftBukkit Changes: 055870c4 #758: Item - add getters/setters for owner/thrower
29 lines
1.7 KiB
Diff
29 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Thu, 23 Apr 2020 01:36:39 -0400
|
|
Subject: [PATCH] Don't fire BlockFade on worldgen threads
|
|
|
|
Caused a deadlock
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
|
|
index 4716f366342a3ef70d0ea50e3747786fad1e3573..e5d75a8a93ffe7bc3747b48210eea6189a956d54 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockFire.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockFire.java
|
|
@@ -73,6 +73,7 @@ public class BlockFire extends BlockFireAbstract {
|
|
@Override
|
|
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
|
// CraftBukkit start
|
|
+ if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation
|
|
if (!this.canPlace(iblockdata, generatoraccess, blockposition)) {
|
|
// Suppress during worldgen
|
|
if (!(generatoraccess instanceof World)) {
|
|
@@ -88,7 +89,7 @@ public class BlockFire extends BlockFireAbstract {
|
|
return blockState.getHandle();
|
|
}
|
|
}
|
|
- return this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE));
|
|
+ return this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)); // Paper - diff on change, see "don't fire events in world generation"
|
|
// CraftBukkit end
|
|
}
|
|
|