net.minecraft.entity.ai.EntityAIPanic Java Examples

The following examples show how to use net.minecraft.entity.ai.EntityAIPanic. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityPenguin.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI() {
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(0,
			new EntityAIAvoidEntity<EntityPolarBear>(this, EntityPolarBear.class, 16, 0.5D, 1.5D));
	this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
	this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.FISH, false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(6, new EntityAIMate(this, 0.5D));
	this.tasks.addTask(7, new EntityAILookIdle(this));
}
 
Example #2
Source File: EntityExplodingChicken.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI()
   {
       this.tasks.addTask(0, new EntityAISwimming(this));
       this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
       this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
       this.tasks.addTask(3, new EntityAITemptAndExplode(this, 1.0D, false, TEMPTATION_ITEMS));
       this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
       this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
       this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
       this.tasks.addTask(7, new EntityAILookIdle(this));
   }
 
Example #3
Source File: EntityDabSquirrel.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void initEntityAI() {
	this.tasks.addTask(1, new EntityAISwimming(this));
	this.tasks.addTask(2, new EntityAIPanic(this, 0.72D));
	this.tasks.addTask(3, new EntityAIMate(this, 0.5D));
	this.tasks.addTask(4, new EntityAITempt(this, 0.5D, Items.WHEAT_SEEDS, false));
	this.tasks.addTask(5, new EntityAIAvoidEntity<EntityPlayer>(this, EntityPlayer.class, 10F, 0.5D, 0.7D));
	this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.5D));
}
 
Example #4
Source File: EntityMoby.java    From mobycraft with Apache License 2.0 5 votes vote down vote up
public EntityMoby(World worldIn)
{
    super(worldIn);
    this.setSize(1.8F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(false);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.fish, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
}
 
Example #5
Source File: EntityVillageLord.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void initEntityAI() {
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(1, new EntityAIPanic(this, 1.0D));
	tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	tasks.addTask(8, new EntityAILookIdle(this));
	if (isEntityAlive()) {
		setHasLord(true);
	}
}
 
Example #6
Source File: EntityToro.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void initEntityAI() {
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
	this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.75, false));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
Example #7
Source File: EntityEasterCow.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void initEntityAI() {
  tasks.addTask(0, new EntityAISwimming(this));
  tasks.addTask(1, new EntityAIPanic(this, 2.0D));
  tasks.addTask(2, new EntityAIMate(this, 1.0D));
  tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.GOLDEN_CARROT, false));
  tasks.addTask(4, new EntityAIAvoidEntity<EntityPlayer>
      (this, EntityPlayer.class, 8.0F, 2.2D, 2.2D));
  tasks.addTask(4, new EntityAIAvoidEntity<EntityWolf>
      (this, EntityWolf.class, 10.0F, 2.2D, 2.2D));
  tasks.addTask(6, new EntityAIWander(this, 0.6D));
  tasks.addTask(7, new EntityAILookIdle(this));
  tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
}