mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Don't fire BlockFade on worldgen threads - Fixes #3208
Caused a deadlock
This commit is contained in:
parent
509a828e06
commit
938bd97255
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
From 492da5a6f36c3344dccb916e62ddf9968c2e5f2e 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 b41de95a63..9e501514f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockFire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockFire.java
|
||||
@@ -44,6 +44,7 @@ public class BlockFire extends Block {
|
||||
@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((IBlockAccess) generatoraccess, blockposition).set(BlockFire.AGE, iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation
|
||||
if (!iblockdata.canPlace(generatoraccess, blockposition)) {
|
||||
CraftBlockState blockState = CraftBlockState.getBlockState(generatoraccess, blockposition);
|
||||
blockState.setData(Blocks.AIR.getBlockData());
|
||||
--
|
||||
2.25.1
|
||||
|
Loading…
Reference in a new issue