update to new mob AI

This commit is contained in:
aPunch 2012-03-02 03:59:02 -06:00
parent 89197d3acb
commit 3d4c02dfea
26 changed files with 76 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityBlaze; import net.minecraft.server.EntityBlaze;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Blaze; import org.bukkit.entity.Blaze;
@ -23,6 +24,8 @@ public class CitizensBlazeNPC extends CitizensMobNPC {
public EntityBlazeNPC(World world) { public EntityBlazeNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCaveSpider; import net.minecraft.server.EntityCaveSpider;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.CaveSpider; import org.bukkit.entity.CaveSpider;
@ -23,6 +24,8 @@ public class CitizensCaveSpiderNPC extends CitizensMobNPC {
public EntityCaveSpiderNPC(World world) { public EntityCaveSpiderNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityChicken; import net.minecraft.server.EntityChicken;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Chicken; import org.bukkit.entity.Chicken;
@ -23,6 +24,8 @@ public class CitizensChickenNPC extends CitizensMobNPC {
public EntityChickenNPC(World world) { public EntityChickenNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCow; import net.minecraft.server.EntityCow;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Cow; import org.bukkit.entity.Cow;
@ -23,6 +24,8 @@ public class CitizensCowNPC extends CitizensMobNPC {
public EntityCowNPC(World world) { public EntityCowNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCreeper; import net.minecraft.server.EntityCreeper;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Creeper; import org.bukkit.entity.Creeper;
@ -23,6 +24,8 @@ public class CitizensCreeperNPC extends CitizensMobNPC {
public EntityCreeperNPC(World world) { public EntityCreeperNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityEnderDragon; import net.minecraft.server.EntityEnderDragon;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.EnderDragon; import org.bukkit.entity.EnderDragon;
@ -23,6 +24,8 @@ public class CitizensEnderDragonNPC extends CitizensMobNPC {
public EntityEnderDragonNPC(World world) { public EntityEnderDragonNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityEnderman; import net.minecraft.server.EntityEnderman;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Enderman; import org.bukkit.entity.Enderman;
@ -23,6 +24,8 @@ public class CitizensEndermanNPC extends CitizensMobNPC {
public EntityEndermanNPC(World world) { public EntityEndermanNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityGhast; import net.minecraft.server.EntityGhast;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Ghast; import org.bukkit.entity.Ghast;
@ -23,6 +24,8 @@ public class CitizensGhastNPC extends CitizensMobNPC {
public EntityGhastNPC(World world) { public EntityGhastNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityGiantZombie; import net.minecraft.server.EntityGiantZombie;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Giant; import org.bukkit.entity.Giant;
@ -23,6 +24,8 @@ public class CitizensGiantNPC extends CitizensMobNPC {
public EntityGiantNPC(World world) { public EntityGiantNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityIronGolem; import net.minecraft.server.EntityIronGolem;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.IronGolem; import org.bukkit.entity.IronGolem;
@ -23,6 +24,8 @@ public class CitizensIronGolemNPC extends CitizensMobNPC {
public EntityIronGolemNPC(World world) { public EntityIronGolemNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityMagmaCube; import net.minecraft.server.EntityMagmaCube;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.MagmaCube; import org.bukkit.entity.MagmaCube;
@ -24,6 +25,8 @@ public class CitizensMagmaCubeNPC extends CitizensMobNPC {
public EntityMagmaCubeNPC(World world) { public EntityMagmaCubeNPC(World world) {
super(world); super(world);
setSize(3); setSize(3);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityMushroomCow; import net.minecraft.server.EntityMushroomCow;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.MushroomCow; import org.bukkit.entity.MushroomCow;
@ -23,6 +24,8 @@ public class CitizensMushroomCowNPC extends CitizensMobNPC {
public EntityMushroomCowNPC(World world) { public EntityMushroomCowNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityOcelot; import net.minecraft.server.EntityOcelot;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Ocelot; import org.bukkit.entity.Ocelot;
@ -23,6 +24,8 @@ public class CitizensOcelotNPC extends CitizensMobNPC {
public EntityOcelotNPC(World world) { public EntityOcelotNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityPig; import net.minecraft.server.EntityPig;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Pig; import org.bukkit.entity.Pig;
@ -23,6 +24,8 @@ public class CitizensPigNPC extends CitizensMobNPC {
public EntityPigNPC(World world) { public EntityPigNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityPigZombie; import net.minecraft.server.EntityPigZombie;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.PigZombie; import org.bukkit.entity.PigZombie;
@ -23,6 +24,8 @@ public class CitizensPigZombieNPC extends CitizensMobNPC {
public EntityPigZombieNPC(World world) { public EntityPigZombieNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySheep; import net.minecraft.server.EntitySheep;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Sheep; import org.bukkit.entity.Sheep;
@ -23,6 +24,8 @@ public class CitizensSheepNPC extends CitizensMobNPC {
public EntitySheepNPC(World world) { public EntitySheepNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySilverfish; import net.minecraft.server.EntitySilverfish;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Silverfish; import org.bukkit.entity.Silverfish;
@ -23,6 +24,8 @@ public class CitizensSilverfishNPC extends CitizensMobNPC {
public EntitySilverfishNPC(World world) { public EntitySilverfishNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySkeleton; import net.minecraft.server.EntitySkeleton;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Skeleton; import org.bukkit.entity.Skeleton;
@ -23,6 +24,8 @@ public class CitizensSkeletonNPC extends CitizensMobNPC {
public EntitySkeletonNPC(World world) { public EntitySkeletonNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySlime; import net.minecraft.server.EntitySlime;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Slime; import org.bukkit.entity.Slime;
@ -24,6 +25,8 @@ public class CitizensSlimeNPC extends CitizensMobNPC {
public EntitySlimeNPC(World world) { public EntitySlimeNPC(World world) {
super(world); super(world);
setSize(3); setSize(3);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySnowman; import net.minecraft.server.EntitySnowman;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Snowman; import org.bukkit.entity.Snowman;
@ -23,6 +24,8 @@ public class CitizensSnowmanNPC extends CitizensMobNPC {
public EntitySnowmanNPC(World world) { public EntitySnowmanNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySpider; import net.minecraft.server.EntitySpider;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Spider; import org.bukkit.entity.Spider;
@ -23,6 +24,8 @@ public class CitizensSpiderNPC extends CitizensMobNPC {
public EntitySpiderNPC(World world) { public EntitySpiderNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySquid; import net.minecraft.server.EntitySquid;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Squid; import org.bukkit.entity.Squid;
@ -23,6 +24,8 @@ public class CitizensSquidNPC extends CitizensMobNPC {
public EntitySquidNPC(World world) { public EntitySquidNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityVillager; import net.minecraft.server.EntityVillager;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Villager; import org.bukkit.entity.Villager;
@ -23,6 +24,8 @@ public class CitizensVillagerNPC extends CitizensMobNPC {
public EntityVillagerNPC(World world) { public EntityVillagerNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityWolf; import net.minecraft.server.EntityWolf;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
@ -23,6 +24,8 @@ public class CitizensWolfNPC extends CitizensMobNPC {
public EntityWolfNPC(World world) { public EntityWolfNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager; import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityZombie; import net.minecraft.server.EntityZombie;
import net.minecraft.server.PathfinderGoalSelector;
import net.minecraft.server.World; import net.minecraft.server.World;
import org.bukkit.entity.Zombie; import org.bukkit.entity.Zombie;
@ -23,6 +24,8 @@ public class CitizensZombieNPC extends CitizensMobNPC {
public EntityZombieNPC(World world) { public EntityZombieNPC(World world) {
super(world); super(world);
goalSelector = new PathfinderGoalSelector();
targetSelector = new PathfinderGoalSelector();
} }
@Override @Override

View File

@ -70,6 +70,7 @@ public class LookClose extends Trait implements Runnable {
npc.getHandle().yaw = (float) yaw - 90; npc.getHandle().yaw = (float) yaw - 90;
npc.getHandle().pitch = (float) pitch; npc.getHandle().pitch = (float) pitch;
npc.getHandle().X = npc.getHandle().yaw;
} }
@Override @Override