aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch')
-rw-r--r--patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch
new file mode 100644
index 0000000000..8a262c1f35
--- /dev/null
+++ b/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Thu, 23 Apr 2020 01:36:39 -0400
+Subject: [PATCH] Don't fire BlockFade on worldgen threads
+
+
+diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
+index 886b8d2284e3ae85184c842b24869029b9ee4ebe..ceaa2a7048afc4955d3695af5291e83a79d83c5d 100644
+--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
+@@ -108,6 +108,7 @@ public class FireBlock extends BaseFireBlock {
+ @Override
+ protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
+ // CraftBukkit start
++ if (!(world instanceof ServerLevel)) return this.canSurvive(state, world, pos) ? (BlockState) this.getStateWithAge(world, pos, (Integer) state.getValue(FireBlock.AGE)) : Blocks.AIR.defaultBlockState(); // Paper - don't fire events in world generation
+ if (!this.canSurvive(state, world, pos)) {
+ // Suppress during worldgen
+ if (!(world instanceof Level)) {
+@@ -123,7 +124,7 @@ public class FireBlock extends BaseFireBlock {
+ return blockState.getHandle();
+ }
+ }
+- return this.getStateWithAge(world, pos, (Integer) state.getValue(FireBlock.AGE));
++ return this.getStateWithAge(world, pos, (Integer) state.getValue(FireBlock.AGE)); // Paper - don't fire events in world generation; diff on change, see "don't fire events in world generation"
+ // CraftBukkit end
+ }
+