2011-01-08 08:40:42 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
2011-01-11 09:25:13 +01:00
|
|
|
// CraftBukkit start
|
2011-01-15 22:23:28 +01:00
|
|
|
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
2011-01-08 08:40:42 +01:00
|
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
|
|
import org.bukkit.event.Event.Type;
|
|
|
|
import org.bukkit.event.entity.EntityCombustEvent;
|
2011-01-11 09:25:13 +01:00
|
|
|
// CraftBukkit end
|
2011-01-08 08:40:42 +01:00
|
|
|
|
|
|
|
public class EntityZombie extends EntityMobs {
|
|
|
|
|
|
|
|
public EntityZombie(World world) {
|
|
|
|
super(world);
|
2011-01-14 14:31:10 +01:00
|
|
|
aP = "/mob/zombie.png";
|
|
|
|
bC = 0.5F;
|
|
|
|
c = 5;
|
2011-01-08 08:40:42 +01:00
|
|
|
}
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
public void o() {
|
2011-01-08 08:40:42 +01:00
|
|
|
if (l.b()) {
|
|
|
|
float f1 = b(1.0F);
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
if (f1 > 0.5F && l.i(MathHelper.b(p), MathHelper.b(q), MathHelper.b(r)) && W.nextFloat() * 30F < (f1 - 0.4F) * 2.0F) {
|
2011-01-11 09:25:13 +01:00
|
|
|
// CraftBukkit start
|
2011-01-10 09:30:34 +01:00
|
|
|
CraftServer server = ((WorldServer) l).getServer();
|
|
|
|
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, new CraftLivingEntity(server, (EntityLiving) this));
|
|
|
|
server.getPluginManager().callEvent(event);
|
|
|
|
if (!event.isCancelled()) {
|
|
|
|
Z = 300;
|
|
|
|
}
|
2011-01-11 09:25:13 +01:00
|
|
|
// CraftBukkit end
|
2011-01-08 08:40:42 +01:00
|
|
|
}
|
|
|
|
}
|
2011-01-14 14:31:10 +01:00
|
|
|
super.o();
|
2011-01-08 08:40:42 +01:00
|
|
|
}
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
protected String e() {
|
2011-01-08 08:40:42 +01:00
|
|
|
return "mob.zombie";
|
|
|
|
}
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
protected String f() {
|
2011-01-08 08:40:42 +01:00
|
|
|
return "mob.zombiehurt";
|
|
|
|
}
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
protected String g() {
|
2011-01-08 08:40:42 +01:00
|
|
|
return "mob.zombiedeath";
|
|
|
|
}
|
|
|
|
|
2011-01-14 14:31:10 +01:00
|
|
|
protected int h() {
|
|
|
|
return Item.J.ba;
|
2011-01-08 08:40:42 +01:00
|
|
|
}
|
|
|
|
}
|