diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityCreeper.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityCreeper.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java index e7439d79..cc6a97a6 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -8,7 +8,7 @@ import org.bukkit.event.entity.ExplosionPrimeEvent; public class EntityCreeper extends EntityMonster { - int a; + int fuseTicks; int b; public EntityCreeper(World world) { @@ -30,21 +30,21 @@ public class EntityCreeper extends EntityMonster { } public void f_() { - this.b = this.a; + this.b = this.fuseTicks; if (this.world.isStatic) { int i = this.v(); - if (i > 0 && this.a == 0) { - this.world.a(this, "random.fuse", 1.0F, 0.5F); + if (i > 0 && this.fuseTicks == 0) { + this.world.makeSound(this, "random.fuse", 1.0F, 0.5F); } - this.a += i; - if (this.a < 0) { - this.a = 0; + this.fuseTicks += i; + if (this.fuseTicks < 0) { + this.fuseTicks = 0; } - if (this.a >= 30) { - this.a = 30; + if (this.fuseTicks >= 30) { + this.fuseTicks = 30; } } @@ -71,18 +71,18 @@ public class EntityCreeper extends EntityMonster { if ((i > 0 || f >= 3.0F) && (i <= 0 || f >= 7.0F)) { this.e(-1); - --this.a; - if (this.a < 0) { - this.a = 0; + --this.fuseTicks; + if (this.fuseTicks < 0) { + this.fuseTicks = 0; } } else { - if (this.a == 0) { - this.world.a(this, "random.fuse", 1.0F, 0.5F); + if (this.fuseTicks == 0) { + this.world.makeSound(this, "random.fuse", 1.0F, 0.5F); } this.e(1); - ++this.a; - if (this.a >= 30) { + ++this.fuseTicks; + if (this.fuseTicks >= 30) { // CraftBukkit start CraftServer server = ((WorldServer) this.world).getServer(); @@ -90,10 +90,10 @@ public class EntityCreeper extends EntityMonster { server.getPluginManager().callEvent(event); if (!event.isCancelled()) { - this.world.a(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire()); - this.D(); + this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire()); + this.die(); } else { - this.a = 0; + this.fuseTicks = 0; } // CraftBukkit end } |