Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
Call EntityChangeBlockEvent for Fire Arrows hitting TNT
Dieser Commit ist enthalten in:
Ursprung
d7c257e120
Commit
e3b4dd3d9a
14
nms-patches/BlockTNT.patch
Normale Datei
14
nms-patches/BlockTNT.patch
Normale Datei
@ -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);
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren