2012-02-03 10:20:48 +01:00
|
|
|
package net.citizensnpcs.npc.entity;
|
|
|
|
|
2012-03-12 11:45:36 +01:00
|
|
|
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;
|
2012-02-03 10:20:48 +01:00
|
|
|
import net.citizensnpcs.npc.CitizensNPCManager;
|
2012-03-12 11:45:36 +01:00
|
|
|
import net.citizensnpcs.npc.ai.NPCHandle;
|
2012-02-04 07:48:23 +01:00
|
|
|
import net.minecraft.server.EntitySkeleton;
|
2012-03-02 10:59:02 +01:00
|
|
|
import net.minecraft.server.PathfinderGoalSelector;
|
2012-02-04 07:48:23 +01:00
|
|
|
import net.minecraft.server.World;
|
2012-02-03 10:20:48 +01:00
|
|
|
|
2012-02-04 07:48:23 +01:00
|
|
|
import org.bukkit.entity.Skeleton;
|
|
|
|
|
|
|
|
public class CitizensSkeletonNPC extends CitizensMobNPC {
|
2012-02-03 10:20:48 +01:00
|
|
|
|
|
|
|
public CitizensSkeletonNPC(CitizensNPCManager manager, int id, String name) {
|
|
|
|
super(manager, id, name, EntitySkeletonNPC.class);
|
|
|
|
}
|
2012-02-04 07:48:23 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public Skeleton getBukkitEntity() {
|
|
|
|
return (Skeleton) getHandle().getBukkitEntity();
|
|
|
|
}
|
|
|
|
|
2012-03-12 11:45:36 +01:00
|
|
|
public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHandle {
|
2012-04-19 05:52:07 +02:00
|
|
|
private final CitizensNPC npc;
|
2012-03-12 11:45:36 +01:00
|
|
|
|
2012-04-19 05:52:07 +02:00
|
|
|
public EntitySkeletonNPC(World world, CitizensNPC npc) {
|
2012-02-04 07:48:23 +01:00
|
|
|
super(world);
|
2012-03-12 11:45:36 +01:00
|
|
|
this.npc = npc;
|
2012-03-02 10:59:02 +01:00
|
|
|
goalSelector = new PathfinderGoalSelector();
|
|
|
|
targetSelector = new PathfinderGoalSelector();
|
2012-02-04 07:48:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2012-03-01 16:12:47 +01:00
|
|
|
public void d_() {
|
2012-04-19 05:52:07 +02:00
|
|
|
npc.update();
|
2012-02-04 07:48:23 +01:00
|
|
|
}
|
2012-03-27 16:42:15 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public NPC getNPC() {
|
|
|
|
return npc;
|
|
|
|
}
|
2012-02-04 07:48:23 +01:00
|
|
|
}
|
2012-02-03 10:20:48 +01:00
|
|
|
}
|