mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user