2014-03-23 01:06:43 +01:00
|
|
|
From 86bd60d04387192040cab0800891c2e08bd28f40 Mon Sep 17 00:00:00 2001
|
2013-09-16 02:54:11 +02: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
|
2014-03-23 01:06:43 +01:00
|
|
|
index e943676..7320a88 100644
|
2013-09-16 02:54:11 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
2013-09-20 08:02:42 +02:00
|
|
|
@@ -54,7 +54,7 @@ public class BlockTNT extends Block {
|
|
|
|
|
|
|
|
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
|
2014-03-23 01:06:43 +01:00
|
|
|
if (entityhuman.bE() != null && entityhuman.bE().getItem() == Items.FLINT_AND_STEEL) {
|
2013-09-20 08:02:42 +02:00
|
|
|
- this.a(world, i, j, k, 1, entityhuman);
|
|
|
|
+ this.a(world, i, j, k, 1, (EntityLiving) entityhuman); // Spigot - Fix decompile error!
|
|
|
|
world.setAir(i, j, k);
|
2014-03-23 01:06:43 +01:00
|
|
|
entityhuman.bE().damage(1, entityhuman);
|
2013-09-20 08:02:42 +02:00
|
|
|
return true;
|
2013-09-16 02:54:11 +02:00
|
|
|
@@ -68,6 +68,11 @@ public class BlockTNT extends Block {
|
|
|
|
EntityArrow entityarrow = (EntityArrow) entity;
|
|
|
|
|
|
|
|
if (entityarrow.isBurning()) {
|
|
|
|
+ // CraftBukkit start
|
2013-12-01 06:17:16 +01:00
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, i, j, k, Blocks.AIR, 0).isCancelled()) {
|
2013-09-16 02:54:11 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.a(world, i, j, k, 1, entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
|
|
|
|
world.setAir(i, j, k);
|
|
|
|
}
|
|
|
|
--
|
2014-03-23 01:06:43 +01:00
|
|
|
1.8.5.2.msysgit.0
|
2013-09-16 02:54:11 +02:00
|
|
|
|