diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/EntityTNTPrimed.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityTNTPrimed.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityTNTPrimed.java | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java deleted file mode 100644 index 13cbc79b..00000000 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ /dev/null @@ -1,98 +0,0 @@ -package net.minecraft.server; - -import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit - -public class EntityTNTPrimed extends Entity { - - public int fuseTicks; - private EntityLiving source; - public float yield = 4; // CraftBukkit - add field - public boolean isIncendiary = false; // CraftBukkit - add field - - public EntityTNTPrimed(World world) { - super(world); - this.k = true; - this.a(0.98F, 0.98F); - this.height = this.length / 2.0F; - } - - public EntityTNTPrimed(World world, double d0, double d1, double d2, EntityLiving entityliving) { - this(world); - this.setPosition(d0, d1, d2); - float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); - - this.motX = (double) (-((float) Math.sin((double) f)) * 0.02F); - this.motY = 0.20000000298023224D; - this.motZ = (double) (-((float) Math.cos((double) f)) * 0.02F); - this.fuseTicks = 80; - this.lastX = d0; - this.lastY = d1; - this.lastZ = d2; - this.source = entityliving; - } - - protected void c() {} - - protected boolean g_() { - return false; - } - - public boolean R() { - return !this.dead; - } - - public void h() { - this.lastX = this.locX; - this.lastY = this.locY; - this.lastZ = this.locZ; - this.motY -= 0.03999999910593033D; - this.move(this.motX, this.motY, this.motZ); - this.motX *= 0.9800000190734863D; - this.motY *= 0.9800000190734863D; - this.motZ *= 0.9800000190734863D; - if (this.onGround) { - this.motX *= 0.699999988079071D; - this.motZ *= 0.699999988079071D; - this.motY *= -0.5D; - } - - if (this.fuseTicks-- <= 0) { - // CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event - if (!this.world.isStatic) { - this.explode(); - } - this.die(); - // CraftBukkit end - } else { - this.world.addParticle("smoke", this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); - } - } - - private void explode() { - // CraftBukkit start - // float f = 4.0F; - - 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); - - if (!event.isCancelled()) { - // give 'this' instead of (Entity) null so we know what causes the damage - this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), true); - } - // CraftBukkit end - } - - protected void b(NBTTagCompound nbttagcompound) { - nbttagcompound.setByte("Fuse", (byte) this.fuseTicks); - } - - protected void a(NBTTagCompound nbttagcompound) { - this.fuseTicks = nbttagcompound.getByte("Fuse"); - } - - public EntityLiving getSource() { - return this.source; - } -} |