3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 22:10:10 +01:00
Paper/src/main/java/net/minecraft/server/EntityZombie.java

49 Zeilen
1.2 KiB
Java

2011-01-08 08:40:42 +01:00
package net.minecraft.server;
import org.bukkit.event.entity.EntityCombustEvent; // CraftBukkit
2011-01-08 08:40:42 +01:00
2011-01-29 22:50:29 +01:00
public class EntityZombie extends EntityMonster {
2011-01-08 08:40:42 +01:00
public EntityZombie(World world) {
super(world);
2011-01-29 22:50:29 +01:00
this.texture = "/mob/zombie.png";
2011-05-28 22:50:08 +02:00
this.aE = 0.5F;
this.damage = 5;
2011-01-08 08:40:42 +01:00
}
2011-06-30 00:02:25 +02:00
public void v() {
2011-03-31 22:40:00 +02:00
if (this.world.d()) {
2011-02-23 03:37:56 +01:00
float f = this.c(1.0F);
2011-01-08 08:40:42 +01:00
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);
2011-02-23 13:56:36 +01:00
2011-01-10 09:30:34 +01:00
if (!event.isCancelled()) {
2011-01-29 22:50:29 +01:00
this.fireTicks = 300;
2011-01-10 09:30:34 +01:00
}
// CraftBukkit end
2011-01-08 08:40:42 +01:00
}
}
2011-01-29 22:50:29 +01:00
2011-06-30 00:02:25 +02:00
super.v();
2011-01-08 08:40:42 +01:00
}
2011-04-20 22:47:26 +02:00
protected String g() {
2011-01-08 08:40:42 +01:00
return "mob.zombie";
}
2011-04-20 22:47:26 +02:00
protected String h() {
2011-01-08 08:40:42 +01:00
return "mob.zombiehurt";
}
2011-04-20 22:47:26 +02:00
protected String i() {
2011-01-08 08:40:42 +01:00
return "mob.zombiedeath";
}
2011-04-20 22:47:26 +02:00
protected int j() {
2011-01-29 22:50:29 +01:00
return Item.FEATHER.id;
2011-01-08 08:40:42 +01:00
}
}