Citizens2/src/main/java/net/citizensnpcs/npc/entity/CitizensCreeperNPC.java

49 lines
1.3 KiB
Java
Raw Normal View History

2012-02-03 10:20:48 +01:00
package net.citizensnpcs.npc.entity;
2012-05-31 08:31:31 +02:00
import net.citizensnpcs.api.abstraction.World;
import net.citizensnpcs.api.npc.NPC;
2012-02-04 09:13:20 +01:00
import net.citizensnpcs.npc.CitizensMobNPC;
2012-04-19 05:52:07 +02:00
import net.citizensnpcs.npc.CitizensNPC;
public class CitizensCreeperNPC extends CitizensMobNPC {
2012-02-03 10:20:48 +01:00
public CitizensCreeperNPC(int id, String name) {
super(id, name, EntityCreeperNPC.class);
2012-02-03 10:20:48 +01:00
}
@Override
public Creeper getBukkitEntity() {
return (Creeper) getHandle().getBukkitEntity();
}
public static class EntityCreeperNPC extends EntityCreeper implements NPCHandle {
2012-04-19 05:52:07 +02:00
private final CitizensNPC npc;
public EntityCreeperNPC(World world) {
this(world, null);
}
public EntityCreeperNPC(World world, NPC npc) {
super(world);
this.npc = (CitizensNPC) npc;
2012-03-02 10:59:02 +01:00
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
}
2012-03-27 16:42:15 +02:00
@Override
public void a(EntityWeatherLighting entityweatherlighting) {
}
@Override
public void z_() {
super.z_();
if (npc != null)
npc.update();
}
@Override
2012-03-27 16:42:15 +02:00
public NPC getNPC() {
return npc;
}
}
2012-02-03 10:20:48 +01:00
}