blob: f5c276d5aa62887331617991312c5d9df739a564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package net.minecraft.server;
import org.bukkit.event.entity.EntityCombustEvent; // CraftBukkit
public class EntityZombie extends EntityMonster {
public EntityZombie(World world) {
super(world);
this.texture = "/mob/zombie.png";
this.aE = 0.5F;
this.damage = 5;
}
public void v() {
if (this.world.d()) {
float f = this.c(1.0F);
if (f > 0.5F && this.world.isChunkLoaded(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
// CraftBukkit start
EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity());
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
this.fireTicks = 300;
}
// CraftBukkit end
}
}
super.v();
}
protected String g() {
return "mob.zombie";
}
protected String h() {
return "mob.zombiehurt";
}
protected String i() {
return "mob.zombiedeath";
}
protected int j() {
return Item.FEATHER.id;
}
}
|