2016-02-29 22:33:06 +01:00
|
|
|
From 56a850636f2d5ea0d5bb4632a26e662d119be4b7 Mon Sep 17 00:00:00 2001
|
2014-11-28 02:17:45 +01:00
|
|
|
From: BlackHole <black-hole@live.com>
|
|
|
|
Date: Tue, 16 Jul 2013 22:34:50 +0200
|
|
|
|
Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
|
|
|
|
|
|
|
Adds BUKKIT-4355
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
2016-02-29 22:33:06 +01:00
|
|
|
index 54140f7..f794167 100644
|
2014-11-28 02:17:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
2016-02-29 22:33:06 +01:00
|
|
|
@@ -73,6 +73,11 @@ public class BlockTNT extends Block {
|
2014-11-28 02:17:45 +01:00
|
|
|
EntityArrow entityarrow = (EntityArrow) entity;
|
|
|
|
|
|
|
|
if (entityarrow.isBurning()) {
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.a(world, blockposition, world.getType(blockposition).set(BlockTNT.EXPLODE, Boolean.valueOf(true)), entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
|
|
|
|
world.setAir(blockposition);
|
|
|
|
}
|
|
|
|
--
|
2016-02-29 22:33:06 +01:00
|
|
|
2.5.0
|
2014-11-28 02:17:45 +01:00
|
|
|
|