diff options
Diffstat (limited to 'nms-patches/EntityTNTPrimed.patch')
-rw-r--r-- | nms-patches/EntityTNTPrimed.patch | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nms-patches/EntityTNTPrimed.patch b/nms-patches/EntityTNTPrimed.patch index 6b765dd8..37d5ae34 100644 --- a/nms-patches/EntityTNTPrimed.patch +++ b/nms-patches/EntityTNTPrimed.patch @@ -1,13 +1,15 @@ --- a/net/minecraft/server/EntityTNTPrimed.java +++ b/net/minecraft/server/EntityTNTPrimed.java -@@ -1,10 +1,14 @@ +@@ -1,6 +1,7 @@ package net.minecraft.server; + import javax.annotation.Nullable; +import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit -+ + public class EntityTNTPrimed extends Entity { - private static final DataWatcherObject<Integer> FUSE_TICKS = DataWatcher.a(EntityTNTPrimed.class, DataWatcherRegistry.b); +@@ -8,6 +9,8 @@ + @Nullable private EntityLiving source; private int c; + public float yield = 4; // CraftBukkit - add field @@ -15,7 +17,7 @@ public EntityTNTPrimed(World world) { super(world); -@@ -60,10 +64,13 @@ +@@ -63,10 +66,13 @@ --this.c; if (this.c <= 0) { @@ -30,7 +32,7 @@ } else { this.ak(); this.world.addParticle(EnumParticle.SMOKE_NORMAL, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D, new int[0]); -@@ -72,9 +79,18 @@ +@@ -75,9 +81,17 @@ } private void explode() { @@ -40,7 +42,6 @@ - this.world.explode(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, 4.0F, true); + org.bukkit.craftbukkit.CraftServer server = this.world.getServer(); -+ + ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(server, this)); + server.getPluginManager().callEvent(event); + |