mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
57dd397155
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: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From d4c9271457c31e20ca2245fcc187e3032eff10d2 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.26.2
|
|
|