Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.

This commit is contained in:
Erik Broes
2011-04-20 19:05:14 +02:00
parent ac9f297445
commit 483a878b8b
116 changed files with 3155 additions and 3207 deletions

View File

@@ -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
}