geforkt von Mirrors/Paper
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
27 Zeilen
1.2 KiB
Diff
27 Zeilen
1.2 KiB
Diff
From 17b8ffe2da66b3b20f4f94f1501b9b1fc074fef6 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index cc61759..7443873 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
|
@@ -77,6 +77,11 @@ public class BlockTNT extends Block {
|
|
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);
|
|
}
|
|
--
|
|
2.1.0
|
|
|