mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 02:19:19 +00:00
Do not try to create fire if explosion was cancelled (#433)
* Do not create fire if explosion was cancelled * [ci/skip] Cleanup
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Overwrite987 <artem.korolev_2003@mail.ru>
|
||||
Date: Mon, 28 Jul 2025 03:35:42 +0300
|
||||
Subject: [PATCH] Do not create fire if explosion was cancelled
|
||||
|
||||
Related to https://github.com/PaperMC/Paper/issues/12441
|
||||
This patch is a similar solution as the part of https://github.com/PaperMC/Paper/pull/11840
|
||||
|
||||
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
|
||||
index 7426a7f4bf17277b0355185b58973140dab3c7b9..8cc97e6fed5221d7240a0be75dcb15f1c9320d41 100644
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -673,6 +673,7 @@ public class ServerExplosion implements Explosion {
|
||||
}
|
||||
|
||||
private void createFire(List<BlockPos> blocks) {
|
||||
+ if (this.wasCanceled) return; // Leaf - Do not create fire if explosion was cancelled
|
||||
for (BlockPos blockPos : blocks) {
|
||||
if (this.level.random.nextInt(3) == 0 && this.level.getBlockState(blockPos).isAir() && this.level.getBlockState(blockPos.below()).isSolidRender()) {
|
||||
// CraftBukkit start - Ignition by explosion
|
||||
Reference in New Issue
Block a user