Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/src/main/java/net/minecraft/server/EntityZombie.java

57 Zeilen
1.5 KiB
Java

2011-01-08 08:40:42 +01:00
package net.minecraft.server;
// CraftBukkit start
import org.bukkit.craftbukkit.entity.CraftZombie;
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;
// 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;
// CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
this.bukkitEntity = new CraftZombie(server, this);
// CraftBukkit end
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) {
// CraftBukkit start
2011-01-10 09:30:34 +01:00
CraftServer server = ((WorldServer) l).getServer();
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, this.getBukkitEntity());
2011-01-10 09:30:34 +01:00
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
Z = 300;
}
// 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
}
}