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)); }
public EntitySkyChicken(World par1World) { super(par1World); this.setSize(0.3F, 0.7F); this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; togglekey = "SPACE"; itogglekey = Keyboard.getKeyIndex(togglekey); this.tasks.addTask(0, new EntityAISwimming(this)); // this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F)); this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.wheat_seeds, 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)); }
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)); }
private BeastMasterPet(World par1World) { super(par1World); this.moveSpeed = 0.35F; this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 5.0F, 2.0F)); this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAITempt(this, 0.5D, RpgMastersAddon.whistle,false)); this.tasks.addTask(9, new EntityAIWatchClosest(this,EntityLivingBase.class, 8.0F)); this.tasks.addTask(9, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); this.tasks.addTask(1, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.1F)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this,IMob.class, 0, true)); }
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)); }
public EntitySkyChicken(World par1World) { super(par1World); this.setSize(0.3F, 0.7F); this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; togglekey = "SPACE"; itogglekey = Keyboard.getKeyIndex(togglekey); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F)); this.tasks.addTask(4, new EntityAITempt(this, 1.0D, Item.seeds.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)); }
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)); }
public EntitySkyChicken(World par1World) { super(par1World); this.setSize(0.3F, 0.7F); this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; togglekey = "SPACE"; itogglekey = Keyboard.getKeyIndex(togglekey); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F)); this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.wheat_seeds, 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)); }
public static EntityAIControlledByPlayer getAIControlledByPlayer(EntityCow cow) { for (Object obj : cow.tasks.taskEntries) { EntityAITasks.EntityAITaskEntry taskEntry = (EntityAITasks.EntityAITaskEntry) obj; if (taskEntry.action instanceof EntityAIControlledByPlayer) return (EntityAIControlledByPlayer) taskEntry.action; } return null; }
public OCMobsPig(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)); }
public EntityPig(World p_i1689_1_) { super(p_i1689_1_); this.func_70105_a(0.9F, 0.9F); 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, this.field_82184_d = new EntityAIControlledByPlayer(this, 0.3F)); this.field_70714_bg.func_75776_a(3, new EntityAIMate(this, 1.0D)); this.field_70714_bg.func_75776_a(4, new EntityAITempt(this, 1.2D, Item.field_82793_bR.field_77779_bT, false)); this.field_70714_bg.func_75776_a(4, new EntityAITempt(this, 1.2D, Item.field_82797_bK.field_77779_bT, false)); this.field_70714_bg.func_75776_a(5, new EntityAIFollowParent(this, 1.1D)); 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)); }
public EntityPiggycorn(World world) { super(world); this.tasks.taskEntries.clear(); 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.cookie, false)); this.tasks.addTask(4, new EntityAITempt(this, 1.2D, DerpyItems.cookie, 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)); }
/** * Return the AI task for player control. */ public EntityAIControlledByPlayer getAIControlledByPlayer() { return this.aiControlledByPlayer; }
@Override public AIControlledByPlayer newAIControlledByPlayer(EntityLiving entity, float speed) { return (AIControlledByPlayer) new EntityAIControlledByPlayer((net.minecraft.entity.EntityLiving) entity, speed); }
public EntityAIControlledByPlayer getAIControlledByPlayer() { return this.aiControlledByPlayer; }
public EntityAIControlledByPlayer func_82183_n() { return this.field_82184_d; }