diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/EntityTNTPrimed.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/EntityTNTPrimed.patch')
-rw-r--r-- | nms-patches/EntityTNTPrimed.patch | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/nms-patches/EntityTNTPrimed.patch b/nms-patches/EntityTNTPrimed.patch index f9a1bf21..54037dc2 100644 --- a/nms-patches/EntityTNTPrimed.patch +++ b/nms-patches/EntityTNTPrimed.patch @@ -1,23 +1,24 @@ --- a/net/minecraft/server/EntityTNTPrimed.java +++ b/net/minecraft/server/EntityTNTPrimed.java -@@ -1,9 +1,13 @@ +@@ -1,10 +1,14 @@ package net.minecraft.server; +import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit + public class EntityTNTPrimed extends Entity { - public int fuseTicks; + private static final DataWatcherObject<Integer> FUSE_TICKS = DataWatcher.a(EntityTNTPrimed.class, DataWatcherRegistry.b); private EntityLiving source; + private int c; + public float yield = 4; // CraftBukkit - add field + public boolean isIncendiary = false; // CraftBukkit - add field public EntityTNTPrimed(World world) { super(world); -@@ -52,10 +56,13 @@ - } +@@ -57,10 +61,13 @@ - if (this.fuseTicks-- <= 0) { + --this.c; + if (this.c <= 0) { - this.die(); + // CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event + // this.die(); @@ -27,19 +28,19 @@ + this.die(); + // CraftBukkit end } else { - this.W(); + this.aj(); this.world.addParticle(EnumParticle.SMOKE_NORMAL, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D, new int[0]); -@@ -64,9 +71,18 @@ +@@ -69,9 +76,18 @@ } private void explode() { - float f = 4.0F; + // CraftBukkit start + // float f = 4.0F; -+ -+ org.bukkit.craftbukkit.CraftServer server = this.world.getServer(); - this.world.explode(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, f, 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); + |