Java 类net.minecraft.entity.ai.EntityAIMoveTwardsRestriction 实例源码

项目:Decaying-World    文件:EntityTreant.java   
public EntityTreant(World par1World)
{
    super(par1World);
    this.moveSpeed = 0.16F;
    this.texture = "/mods/DecayingWorld/textures/mob/treant.png";
    this.setSize(1.4F, 2.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed*1.8F, false));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityZombie.class, this.moveSpeed*1.8F, true));
    this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
    this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
    this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityZombie.class, 16.0F, 0, false));
}
项目:Veniocraft    文件:EntityCyborg.java   
/**
 * 
 * @param world
 */
public EntityCyborg(World world){
    super(world);
    this.texture="/mods/veniocraft/textures/models/CyborgTexture.png";
    this.moveSpeed=0.23F;
    this.getNavigator().setBreakDoors(true);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0,new EntityAISwimming(this));
    this.tasks.addTask(1,new EntityAIBreakDoor(this));
    this.tasks.addTask(2,new EntityAIAttackOnCollide(this,EntityPlayer.class,this.moveSpeed,false));
    this.tasks.addTask(3,new EntityAIAttackOnCollide(this,EntityVillager.class,this.moveSpeed,true));
    this.tasks.addTask(4,new EntityAIMoveTwardsRestriction(this,this.moveSpeed));
    this.tasks.addTask(5,new EntityAIMoveThroughVillage(this,this.moveSpeed,false));
    this.tasks.addTask(6,new EntityAIWander(this,this.moveSpeed));
    this.tasks.addTask(7,new EntityAIWatchClosest(this,EntityPlayer.class,8.0F));
    this.tasks.addTask(7,new EntityAILookIdle(this));
    this.targetTasks.addTask(1,new EntityAIHurtByTarget(this,true));
    this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityPlayer.class,16.0F,0,true));
    this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityVillager.class,16.0F,0,false));
    this.tasks.addTask(8,new EntityAITempt(this,0.3F,VenioItems.chip.itemID,false));
}
项目:WeaponsMod    文件:EntityRobot.java   
public EntityRobot(World par1World)
{
    super(par1World);
    this.moveSpeed = 0.23F;
    this.getNavigator().setBreakDoors(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIBreakDoor(this));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
    this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityVillager.class, this.moveSpeed, true));
    this.tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
    this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, this.moveSpeed, false));
    this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false));
    this.setSize(1.4F, 2F);
    inventory = new ItemStack[EnumRobot.InventorySize.getValue()];
}
项目:Amitcraft    文件:EntityBehlmann.java   
public EntityBehlmann(World par1World) {
    super(par1World);
    this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "behlmann.png";
    this.moveSpeed = this.stepHeight = 1.0F;

    this.getNavigator().setAvoidsWater(true);
    this.getNavigator().setCanSwim(true);

    this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 0.25F, true));
    this.tasks.addTask(3, new EntityAIMoveTowardsTarget(this, 0.22F, 32.0F));
    this.tasks.addTask(4, new EntityAIMoveThroughVillage(this, 0.16F, true));
    this.tasks.addTask(5, new EntityAIMoveTwardsRestriction(this, 0.16F));
    this.tasks.addTask(6, new EntityAIWander(this, 0.16F));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.tasks.addTask(9, new EntityAIPanic(this, 0.38F));
    this.tasks.addTask(10, new EntityAITempt(this, 0.25F, Block.brewingStand.blockID, false));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityAnimal.class, 16.0F, 0, false));
}
项目:Amitcraft    文件:EntityTComp.java   
public EntityTComp(World par1World) {
    super(par1World);
    this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "TComp.png";
    this.moveSpeed = this.stepHeight = 1.0F;

    this.moveSpeed = 0.75F;
    this.stepHeight = 2.0F;

    this.getNavigator().setBreakDoors(true);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
    this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
    this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
    this.tasks.addTask(3, new EntityAIMoveIndoors(this));
    this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
    this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
    this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}
项目:FallingEarth    文件:EntityMeteorSpawn.java   
public EntityMeteorSpawn(World par1World) {
    super(par1World);
    this.stepHeight = 3.1F;
    this.moveSpeed = 0.25F;
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
       this.tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
    this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 32.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 64.0F, 0, true));
    this.experienceValue = 80;
    this.isImmuneToFire = true;
}
项目:Amitcraft    文件:EntityPrice.java   
public EntityPrice(World par1World) {
    super(par1World);
    this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "price.png";

    this.moveSpeed = 0.75F;
    this.stepHeight = 2.0F;

    this.getNavigator().setBreakDoors(true);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
    this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
    this.tasks.addTask(1, new EntityPriceAITradePlayer(this));
    this.tasks.addTask(1, new EntityPriceAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
    this.tasks.addTask(3, new EntityAIMoveIndoors(this));
    this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
    this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
    this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}