mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-04 06:31:35 +01:00
Call EntityChangeBlockEvent for Fire Arrows hitting TNT
By: md_5 <git@md-5.net>
This commit is contained in:
parent
9797cf7e43
commit
713c31929a
14
paper-server/nms-patches/BlockTNT.patch
Normal file
14
paper-server/nms-patches/BlockTNT.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- a/net/minecraft/server/BlockTNT.java
|
||||||
|
+++ b/net/minecraft/server/BlockTNT.java
|
||||||
|
@@ -75,6 +75,11 @@
|
||||||
|
EntityArrow entityarrow = (EntityArrow) entity;
|
||||||
|
|
||||||
|
if (entityarrow.isBurning()) {
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, blockposition, 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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user