Don't double set air in BlockFire

Dieser Commit ist enthalten in:
Shane Freeder 2019-05-07 13:16:22 +01:00
Ursprung c3534f1340
Commit 725cf24308
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -1,11 +1,11 @@
From 7f43982ceaf4025eb8c116872d604a3c575256c5 Mon Sep 17 00:00:00 2001
From 1827205a895feca061f160216b3015c9b06c9451 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Mon, 16 Jul 2018 00:05:05 +0300
Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 73190ccbaa..4086d5ed2d 100644
index 73190ccba..dfb546820 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -25,7 +25,7 @@ index 73190ccbaa..4086d5ed2d 100644
}
Block block = iblockdata.getBlock();
@@ -245,6 +246,13 @@ public class BlockFire extends Block {
@@ -245,6 +246,12 @@ public class BlockFire extends Block {
if (block instanceof BlockTNT) {
BlockTNT blocktnt = (BlockTNT) block;
@ -34,13 +34,12 @@ index 73190ccbaa..4086d5ed2d 100644
+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.FIRE, null).callEvent()) {
+ return;
+ }
+ BlockTNT.a(world, blockposition);; // setair after non cancelled event, it would usually be air by now
+ // Paper end
BlockTNT.a(world, blockposition);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 8cb36ed3a4..88d0238718 100644
index 8cb36ed3a..88d023871 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -1,6 +1,7 @@
@ -114,7 +113,7 @@ index 8cb36ed3a4..88d0238718 100644
world.a(blockposition, false);
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index b0651a7086..6d51413d18 100644
index b0651a708..6d51413d1 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -11,6 +11,7 @@ import org.bukkit.craftbukkit.block.CraftBlock;