Java Code Examples for net.minecraft.entity.ai.EntityAIPanic

The following are top voted examples for showing how to use net.minecraft.entity.ai.EntityAIPanic. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: BaseClient   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
 
Example 2
Project: BaseClient   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
Example 3
Project: BaseClient   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 0.9F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 4
Project: BaseClient   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
 
Example 5
Project: BaseClient   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
Example 6
Project: BaseClient   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 0.9F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 7
Project: Tannery   File: Elk.java   Source Code and License 6 votes vote down vote up
public Elk(World worldIn)
{
	super(worldIn);
	this.setSize(1.8F, 2.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	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, Item.getItemFromBlock(Blocks.grass), false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(5, new EntityAIEatGrass(this));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
Example 8
Project: Tannery   File: ElkBaby.java   Source Code and License 6 votes vote down vote up
public ElkBaby(World worldIn)
{
	super(worldIn);
	this.setSize(1.8F, 2.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	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, Item.getItemFromBlock(Blocks.grass), false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(5, new EntityAIEatGrass(this));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
Example 9
Project: ARKCraft   File: EntityDodo.java   Source Code and License 6 votes vote down vote up
public EntityDodo(World worldIn)
	{
		super(worldIn);
		this.setSize(0.4F, 0.7F);
		this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;

		this.invDodo = new InventoryDino("Items", true, 9);

		this.tasks.taskEntries.clear();
		int p = 0;
		this.tasks.addTask(++p, new EntityAISwimming(this));
		this.tasks.addTask(++p, this.aiSit);
		this.tasks.addTask(++p, new EntityAIPanic(this, 1.4D));
		this.tasks.addTask(++p, new EntityAIMate(this, 1.0D));
		this.tasks.addTask(++p, new EntityAITempt(this, 1.0D, ARKCraftItems.narcoBerry, false));
		this.tasks.addTask(++p, new EntityAIFollowParent(this, 1.1D));
		this.tasks.addTask(++p, new EntityAIWander(this, 1.0D));
		this.tasks.addTask(++p, new EntityAIFollowOwner(this, 1.0D, 8.0F, 5.0F));
		this.tasks.addTask(++p, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
		// Replace Idle task with one that blinks eyes
		this.tasks.addTask(++p, new EntityDodoAILookIdle(this));

//		this.riddenByEntity = null;
	}
 
Example 10
Project: PopularMMOS-EpicProportions-Mod   File: EntityPopo.java   Source Code and License 6 votes vote down vote up
public EntityPopo(World p_i1691_1_)
{
    super(p_i1691_1_);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
    this.hasCustomNameTag();
    this.setCustomNameTag("Popo");
}
 
Example 11
Project: PopularMMOS-EpicProportions-Mod   File: EntityLuckyChicken.java   Source Code and License 6 votes vote down vote up
public EntityLuckyChicken(World p_i1682_1_)
{
    super(p_i1682_1_);
    this.setSize(0.3F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    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 EntityAITempt(this, 1.0D, Items.wheat_seeds, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    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));
    this.hasCustomNameTag();
    this.setCustomNameTag("Lucky Chicken");
}
 
Example 12
Project: amunra   File: EntityPorcodon.java   Source Code and License 6 votes vote down vote up
public EntityPorcodon(World curWorld) {
    super(curWorld);

    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    // this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    //this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    // this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));

    dropItem = ARItems.baseItem.getItemStack("porcodonMeat", 1);

}
 
Example 13
Project: Resilience-Client-Source   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World par1World)
{
    super(par1World);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
Example 14
Project: Resilience-Client-Source   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
Example 15
Project: Resilience-Client-Source   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 16
Project: NausicaaMod   File: EntityHorseclaw.java   Source Code and License 6 votes vote down vote up
public EntityHorseclaw(World par1World) {
	super(par1World);
	this.setSize(1.4F, 1.6F);
	this.isImmuneToFire = false;
	this.setChested(false);
	this.getNavigator().setAvoidsWater(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
	// this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
	this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
	this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
	this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(8, new EntityAILookIdle(this));
	this.func_110226_cD();
}
 
Example 17
Project: Cauldron   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World p_i1685_1_)
{
    super(p_i1685_1_);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
Example 18
Project: Cauldron   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World p_i1691_1_)
{
    super(p_i1691_1_);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
}
 
Example 19
Project: Cauldron   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World p_i1689_1_)
{
    super(p_i1689_1_);
    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 20
Project: Cauldron   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World p_i1685_1_)
{
    super(p_i1685_1_);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
Example 21
Project: Cauldron   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World p_i1691_1_)
{
    super(p_i1691_1_);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
Example 22
Project: Cauldron   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World p_i1689_1_)
{
    super(p_i1689_1_);
    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 23
Project: RuneCraftery   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World p_i1685_1_) {
   super(p_i1685_1_);
   this.func_70105_a(1.4F, 1.6F);
   this.field_70178_ae = false;
   this.func_110207_m(false);
   this.func_70661_as().func_75491_a(true);
   this.field_70714_bg.func_75776_a(0, new EntityAISwimming(this));
   this.field_70714_bg.func_75776_a(1, new EntityAIPanic(this, 1.2D));
   this.field_70714_bg.func_75776_a(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
   this.field_70714_bg.func_75776_a(2, new EntityAIMate(this, 1.0D));
   this.field_70714_bg.func_75776_a(4, new EntityAIFollowParent(this, 1.0D));
   this.field_70714_bg.func_75776_a(6, new EntityAIWander(this, 0.7D));
   this.field_70714_bg.func_75776_a(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
   this.field_70714_bg.func_75776_a(8, new EntityAILookIdle(this));
   this.func_110226_cD();
}
 
Example 24
Project: RuneCraftery   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World p_i1691_1_) {
   super(p_i1691_1_);
   this.func_70105_a(0.9F, 1.3F);
   this.func_70661_as().func_75491_a(true);
   this.field_70714_bg.func_75776_a(0, new EntityAISwimming(this));
   this.field_70714_bg.func_75776_a(1, new EntityAIPanic(this, 1.25D));
   this.field_70714_bg.func_75776_a(2, new EntityAIMate(this, 1.0D));
   this.field_70714_bg.func_75776_a(3, new EntityAITempt(this, 1.1D, Item.field_77685_T.field_77779_bT, false));
   this.field_70714_bg.func_75776_a(4, new EntityAIFollowParent(this, 1.1D));
   this.field_70714_bg.func_75776_a(5, this.field_70897_f);
   this.field_70714_bg.func_75776_a(6, new EntityAIWander(this, 1.0D));
   this.field_70714_bg.func_75776_a(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
   this.field_70714_bg.func_75776_a(8, new EntityAILookIdle(this));
   this.field_90016_e.func_70299_a(0, new ItemStack(Item.field_77756_aW, 1, 0));
   this.field_90016_e.func_70299_a(1, new ItemStack(Item.field_77756_aW, 1, 0));
}
 
Example 25
Project: RuneCraftery   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World par1World)
{
    super(par1World);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
Example 26
Project: RuneCraftery   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Item.wheat.itemID, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.aiEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Item.dyePowder, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Item.dyePowder, 1, 0));
}
 
Example 27
Project: RuneCraftery   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrotOnAStick.itemID, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrot.itemID, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 28
Project: TheStuffMod   File: EntityTurtle.java   Source Code and License 6 votes vote down vote up
public EntityTurtle(World world) {
	super(world);
	this.setSize(0.9F, 1.0F);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(2, new EntityAIPanic(this, 1.25D));
       this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
       this.tasks.addTask(4, new EntityAITempt(this, 1.2D, new ItemStack(Blocks.pumpkin).getItem(), false));
       this.tasks.addTask(5, new EntityAITempt(this, 1.2D, ModItems.lettuce, false));
       this.tasks.addTask(6, new EntityAITempt(this, 1.2D, ModItems.tomato, false));
       this.tasks.addTask(7, new EntityAIFollowParent(this, 1.1D));
       this.tasks.addTask(8, new EntityAIWander(this, 1.0D));
       this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
       this.tasks.addTask(10, new EntityAILookIdle(this));
	this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true));
}
 
Example 29
Project: TheStuffMod   File: EntityGrawquat.java   Source Code and License 6 votes vote down vote up
public EntityGrawquat(World world) {
	super(world);
	this.setSize(0.9F, 1.3F);
       this.getNavigator().setAvoidsWater(true);
       this.tasks.addTask(0, new EntityAISwimming(this));
       this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
       this.tasks.addTask(2, new EntityAITempt(this, 1.25D, ModItems.voidium, false));
       this.tasks.addTask(3, new EntityAIWander(this, 1.0D));
       this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
       this.tasks.addTask(5, new EntityAILookIdle(this));
       this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
       this.tasks.addTask(7, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
	this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true));
	this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
	
	this.isImmuneToFire = true;
}
 
Example 30
Project: BetterNutritionMod   File: EntityHorse.java   Source Code and License 6 votes vote down vote up
public EntityHorse(World par1World)
{
    super(par1World);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
Example 31
Project: BetterNutritionMod   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Item.wheat.itemID, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.aiEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.field_90016_e.setInventorySlotContents(0, new ItemStack(Item.dyePowder, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Item.dyePowder, 1, 0));
}
 
Example 32
Project: BetterNutritionMod   File: EntityPig.java   Source Code and License 6 votes vote down vote up
public EntityPig(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 0.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrotOnAStick.itemID, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrot.itemID, false));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 33
Project: AgeCraft-Old   File: EntitySheep.java   Source Code and License 6 votes vote down vote up
public EntitySheep(World world) {
	super(world);
	setSize(0.9F, 1.3F);
	getNavigator().setAvoidsWater(true);
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(1, new EntityAIPanic(this, 1.25D));
	tasks.addTask(2, new EntityAIMate(this, 1.0D));
	tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
	tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
	tasks.addTask(5, taskEatGrass);
	tasks.addTask(6, new EntityAIWander(this, 1.0D));
	tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	tasks.addTask(8, new EntityAILookIdle(this));
	inventory.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
	inventory.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
Example 34
Project: Amitcraft   File: EntityBehlmann.java   Source Code and License 6 votes vote down vote up
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));
}
 
Example 35
Project: BaseClient   File: EntityChicken.java   Source Code and License 5 votes vote down vote up
public EntityChicken(World worldIn)
{
    super(worldIn);
    this.setSize(0.4F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    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 EntityAITempt(this, 1.0D, Items.wheat_seeds, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    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 36
Project: BaseClient   File: EntityCow.java   Source Code and License 5 votes vote down vote up
public EntityCow(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    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.wheat, 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 37
Project: BaseClient   File: EntityChicken.java   Source Code and License 5 votes vote down vote up
public EntityChicken(World worldIn)
{
    super(worldIn);
    this.setSize(0.4F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    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 EntityAITempt(this, 1.0D, Items.wheat_seeds, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    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 38
Project: BaseClient   File: EntityCow.java   Source Code and License 5 votes vote down vote up
public EntityCow(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    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.wheat, 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 39
Project: Backmemed   File: EntityLlama.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAILlamaFollowCaravan(this, 2.0999999046325684D));
    this.tasks.addTask(3, new EntityAIAttackRanged(this, 1.25D, 40, 20.0F));
    this.tasks.addTask(3, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(4, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityLlama.AIHurtByTarget(this));
    this.targetTasks.addTask(2, new EntityLlama.AIDefendTarget(this));
}
 
Example 40
Project: Backmemed   File: EntityChicken.java   Source Code and License 5 votes vote down vote up
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 EntityAITempt(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 41
Project: Backmemed   File: AbstractHorse.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D, AbstractHorse.class));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 42
Project: Backmemed   File: EntityCow.java   Source Code and License 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 EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
    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 43
Project: Backmemed   File: EntitySheep.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.entityAIEatGrass = new EntityAIEatGrass(this);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 44
Project: Backmemed   File: EntityPig.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.CARROT_ON_A_STICK, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 45
Project: CustomWorldGen   File: EntityChicken.java   Source Code and License 5 votes vote down vote up
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 EntityAITempt(this, 1.0D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    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 46
Project: CustomWorldGen   File: EntityHorse.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 47
Project: CustomWorldGen   File: EntityCow.java   Source Code and License 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 EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.WHEAT, 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 48
Project: CustomWorldGen   File: EntitySheep.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.entityAIEatGrass = new EntityAIEatGrass(this);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.WHEAT, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 49
Project: CustomWorldGen   File: EntityPig.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.CARROT_ON_A_STICK, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 50
Project: MineMania-Rebirth-1.7.10   File: EntityLegoguy110Mob.java   Source Code and License 5 votes vote down vote up
public EntityLegoguy110Mob(World par1World) {
	super(par1World);
	this.setSize(0.9F, 0.9F);
	this.tasks.addTask(0, new EntityAIWander(this, 0.7D));
	this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
	this.tasks.addTask(2, new EntityAITempt(this, 1.0D, ms.Ruby, false));
	this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
	this.tasks.addTask(5, new EntityAISwimming(this));
}
 
Example 51
Project: MineMania-Rebirth-1.7.10   File: EntityPanguin.java   Source Code and License 5 votes vote down vote up
public EntityPanguin(World par1World) {
	super(par1World);
	this.setSize(0.9F, 0.9F);
	this.tasks.addTask(0, new EntityAIWander(this, 0.5D));
	this.tasks.addTask(1, new EntityAIPanic(this, 0.8D));
	this.tasks.addTask(2, new EntityAITempt(this, 0.6D, ms.Ruby, false));
	this.tasks.addTask(3, new EntityAIMate(this, 0.5D));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 0.5D));
	this.tasks.addTask(5, new EntityAISwimming(this));
}
 
Example 52
Project: mobycraft   File: EntityMoby.java   Source Code and License 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 53
Project: Thelta   File: EntityMinivox.java   Source Code and License 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 EntityAITempt(this, 1.25D, Items.WHEAT, false));
    this.tasks.addTask(3, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(5, new EntityAILookIdle(this));
}
 
Example 54
Project: ToroQuest   File: EntityVillageLord.java   Source Code and License 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 55
Project: ToroQuest   File: EntityToro.java   Source Code and License 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 56
Project: Aether-Legacy   File: EntityPhyg.java   Source Code and License 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.25D));
this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
      this.tasks.addTask(3, new EntityAITempt(this, 1.25D, ItemsAether.blue_berry, false));
this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(5, new EntityAILookIdle(this));
this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
  }
 
Example 57
Project: Aether-Legacy   File: EntityFlyingCow.java   Source Code and License 5 votes vote down vote up
@Override
  protected void initEntityAI()
  {
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, ItemsAether.blue_berry, 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 58
Project: Aether-Legacy   File: EntitySheepuff.java   Source Code and License 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.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.25D, ItemsAether.blue_berry, false));
    this.tasks.addTask(5, this.entityAIEatGrass = new SheepuffAIEatAetherGrass(this));
    this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
}
 
Example 59
Project: KalStuff   File: EntityDuck.java   Source Code and License 5 votes vote down vote up
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.0D, false, TEMPTATION_ITEMS));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(7, new EntityAILookIdle(this));
}
 
Example 60
Project: ARKCraft-Code   File: EntityDodo.java   Source Code and License 5 votes vote down vote up
public EntityDodo(World worldIn)
{
	super(worldIn);
	this.setSize(0.4F, 0.7F);
	this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;

	this.getDataWatcher().addObject(DODO_EYE_WATCHER, Byte.valueOf((byte) 1));
	this.getDataWatcher().addObject(DODO_CHEST_WATCHER, Byte.valueOf((byte) 0));

	this.invDodo = new InventoryDino("Items", true, 9);

	this.tasks.taskEntries.clear();
	int p = 0;
	this.tasks.addTask(++p, new EntityAISwimming(this));
	this.tasks.addTask(++p, this.aiSit);
	this.tasks.addTask(++p, new EntityAIPanic(this, 1.4D));
	this.tasks.addTask(++p, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(++p, new EntityAITempt(this, 1.0D, ARKCraftItems.narcoBerry, false));
	this.tasks.addTask(++p, new EntityAIFollowParent(this, 1.1D));
	this.tasks.addTask(++p, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(++p, new EntityAIFollowOwner(this, 1.0D, 8.0F, 5.0F));
	this.tasks.addTask(++p, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	// Replace Idle task with one that blinks eyes
	this.tasks.addTask(++p, new EntityDodoAILookIdle(this));

	this.riddenByEntity = null;
}