protected void initEntityAI() { this.aiSit = new EntityAISit(this); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityWolf.AIAvoidEntity(this, EntityLlama.class, 24.0F, 1.5D, 1.5D)); this.tasks.addTask(4, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(5, new EntityAIAttackMelee(this, 1.0D, true)); this.tasks.addTask(6, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWanderAvoidWater(this, 1.0D)); this.tasks.addTask(9, new EntityAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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, new Class[0])); this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>() { public boolean apply(@Nullable Entity p_apply_1_) { return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit; } })); this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, AbstractSkeleton.class, false)); }
protected void initEntityAI() { this.aiSit = new EntityAISit(this); 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 EntityAIAttackMelee(this, 1.0D, true)); this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.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 EntityAIBeg(this, 8.0F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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, new Class[0])); this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>() { public boolean apply(@Nullable Entity p_apply_1_) { return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit; } })); this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, false)); }
public DemoEntityTameable(World worldIn) { super(worldIn); this.setSize(0.6F, 0.8F); ((PathNavigateGround) this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAILeapAtTarget(this, Config.entityTameableAILeapAtTargetHeight)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, Config.entityTameableAIAttackOnCollideSpeed, true)); this.tasks.addTask(5, new EntityAIFollowOwner(this, Config.entityTameableAIFollowOwnerSpeed, Config.entityTameableAIFollowOwnerMaxDistance, Config.entityTameableAIFollowOwnerMinDistance)); this.tasks.addTask(6, new EntityAIMate(this, Config.entityTameableAIMateMoveSpeed)); this.tasks.addTask(7, new EntityAIWander(this, Config.entityTameableAIWanderSpeed)); this.tasks.addTask(8, new DemoEntityAIBeg(this, Config.entityTameableAIBegDistance)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, Config.entityTameableAIWatchClosestDistance)); 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, new Class[0])); this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, DemoEntityHostile.class, false)); this.setTamed(false); }
public EntityWolf(World par1World) { super(par1World); this.setSize(0.6F, 0.8F); this.getNavigator().setAvoidsWater(true); 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, 10.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 EntityAIBeg(this, 8.0F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); }
@Override public void setupGolem(EntityGolemBase golem) { WrappedGolem wrapped = new WrappedGolem(golem); golem.setHomeArea(0, 300000000, 0, 300000000); golem.setMarkers(new ArrayList<Marker>()); golem.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(wrapped)); golem.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(wrapped)); golem.targetTasks.addTask(3, new EntityAIHurtByTarget(golem, true)); golem.tasks.addTask(1, new AISit(golem)); if (golem.decoration.contains("R")) { golem.tasks.addTask(2, new AIUncheckedDartAttack(golem)); } golem.tasks.addTask(3, new AIUncheckedAttackOnCollide(golem)); golem.tasks.addTask(4, new AIFollowOwner(wrapped, 5, 2)); golem.tasks.addTask(5, new AIOpenDoor(golem, true)); golem.tasks.addTask(7, new EntityAIWatchClosest(golem, EntityPlayer.class, 6.0F)); golem.tasks.addTask(8, new EntityAILookIdle(golem)); }
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 EntityKortor(World p_i1696_1_) { super(p_i1696_1_); this.setSize(2F, 2F); this.getNavigator().setAvoidsWater(true); 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, 10.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 EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, 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.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityForisZertum(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 2.0F)); this.tasks.addTask(6, aiFetchBone); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityCustomFZAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityDestroZertum(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 2.0F)); this.tasks.addTask(6, aiFetchBone); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityCustomDeZAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityRedZertum(World p_i1696_1_) { super(p_i1696_1_); this.isImmuneToFire = true; this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 2.0F)); this.tasks.addTask(6, aiFetchBone); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityCustomRZAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityJakan(World p_i1696_1_) { super(p_i1696_1_); this.setSize(2.6F, 2.6F); this.isImmuneToFire = true; this.stepHeight = 1; this.getNavigator().setAvoidsWater(true); 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, 10.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 EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityIceZertum(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAICustomLeapAtTarget(this, 0.4F)); this.tasks.addTask(4, new EntityAICustomArrowAttack(this, 0.1, 60, 10.0F)); this.tasks.addTask(5, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(6, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(7, aiFetchBone); this.tasks.addTask(8, new EntityAIMate(this, 1.0D)); this.tasks.addTask(9, new EntityAIWander(this, 1.0D)); this.tasks.addTask(10, new EntityCustomIZAIBeg(this, 8.0F)); this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(11, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityZertum(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 2.0F)); this.tasks.addTask(6, aiFetchBone); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityCustomZAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityDarkZertum(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 1.5F); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 2.0F)); this.tasks.addTask(6, aiFetchBone); this.tasks.addTask(7, new EntityAIMate(this, 1.0D)); this.tasks.addTask(8, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityCustomDarkZAIBeg(this, 8.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(10, 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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); this.inventory = new InventoryPack(this); }
public PetChicken(World world) { super(world); entityName = "chicken"; this.setSize(0.3F, 0.7F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(0, 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, 10.0F, 2.0F)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(7, 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)); }
public PetCow(World world) { super(world); entityName = "cow"; this.setSize(0.9F, 1.3F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(0, 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, 10.0F, 2.0F)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(7, 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)); }
public PetDog(World world) { super(world); entityName = "wolf"; this.setSize(0.6F, 0.8F); this.getNavigator().setAvoidsWater(true); 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, 10.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 EntityAIBegPet(this, 8.0F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); }
public PetPig(World world) { super(world); entityName = "pig"; this.setSize(0.9F, 0.9F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(0, 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, 10.0F, 2.0F)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(7, 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)); }
public PetCat(World world) { super(world); entityName = "cat"; this.setSize(0.6F, 0.8F); this.setTameSkin(1 + this.worldObj.rand.nextInt(3)); this.getNavigator().setAvoidsWater(true); 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, 10.0F, 5.0F)); this.tasks.addTask(6, new EntityAIWander(this, 0.8D)); this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F)); this.tasks.addTask(8, 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)); }
public PetSheep(World world) { super(world); entityName = "sheep"; this.setFleeceColor(getRandomFleeceColor(this.worldObj.rand)); this.setSize(0.9F, 1.3F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, this.field_146087_bs); 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, 10.0F, 2.0F)); 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.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); }
public EntityWolf(World p_i1696_1_) { super(p_i1696_1_); this.setSize(0.6F, 0.8F); this.getNavigator().setAvoidsWater(true); 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, 10.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 EntityAIBeg(this, 8.0F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); }
public EntityWolf(World p_i1696_1_) { super(p_i1696_1_); this.func_70105_a(0.6F, 0.8F); this.func_70661_as().func_75491_a(true); this.field_70714_bg.func_75776_a(1, new EntityAISwimming(this)); this.field_70714_bg.func_75776_a(2, this.field_70911_d); this.field_70714_bg.func_75776_a(3, new EntityAILeapAtTarget(this, 0.4F)); this.field_70714_bg.func_75776_a(4, new EntityAIAttackOnCollide(this, 1.0D, true)); this.field_70714_bg.func_75776_a(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.field_70714_bg.func_75776_a(6, new EntityAIMate(this, 1.0D)); this.field_70714_bg.func_75776_a(7, new EntityAIWander(this, 1.0D)); this.field_70714_bg.func_75776_a(8, new EntityAIBeg(this, 8.0F)); this.field_70714_bg.func_75776_a(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.field_70714_bg.func_75776_a(9, new EntityAILookIdle(this)); this.field_70715_bh.func_75776_a(1, new EntityAIOwnerHurtByTarget(this)); this.field_70715_bh.func_75776_a(2, new EntityAIOwnerHurtTarget(this)); this.field_70715_bh.func_75776_a(3, new EntityAIHurtByTarget(this, true)); this.field_70715_bh.func_75776_a(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.func_70903_f(false); }
public EntityMinion(World par1World) { super(par1World); getNavigator().setAvoidsWater(true); this.getNavigator().setAvoidsWater(true); setSize(0.6F, 1.8F); ticksExisted = 0; tasks.addTask(0, aiMinion); tasks.addTask(1, aiSit); tasks.addTask(2, aiControlledByPlayer); tasks.addTask(4, new EntityAITempt(this, 0.3F, ItemGeneric.getItemStackFromName("Brain on a Stick").getItem().itemID, false)); targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); dataWatcher.addObject(20, "UNDEFINED"); dataWatcher.addObject(21, "UNDEFINED"); dataWatcher.addObject(22, "UNDEFINED"); dataWatcher.addObject(23, "UNDEFINED"); dataWatcher.addObject(24, "UNDEFINED"); dataWatcher.addObject(25, Byte.valueOf((byte) 0)); dataWatcher.addObject(26, Byte.valueOf((byte) 0)); onBodyChange(); }
public EntityWolf(World worldIn) { super(worldIn); this.setSize(0.6F, 0.8F); ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true); 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, 10.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 EntityAIBeg(this, 8.0F)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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, new Class[0])); this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>() { public boolean apply(Entity p_apply_1_) { return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit; } })); this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, false)); this.setTamed(false); }
public EntitySummonZombie(World world, EntityPlayer p, float clarity) { super(world); this.setSize(0.8F, 1.6F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(5, new EntityAIMate(this, 1.0D)); this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, 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.type = world.rand.nextInt(4); if (p != null) { this.setTamed(true); this.setPathToEntity((PathEntity)null); this.setAttackTarget((EntityLivingBase)null); this.setHealth(10.0F + clarity / 15); this.func_152115_b(p.getUniqueID().toString()); this.worldObj.setEntityState(this, (byte)7); } }
public EntityCreeperDragon(World world) { super(world); this.getNavigator().setAvoidsWater(false); this.setSize(1.8F, 1.9F); this.isImmuneToFire = true; this.experienceValue = 5; // clearAITasks(); // AI int p = 1; this.tasks.addTask(p++, new EntityAISwimming(this)); // this.tasks.addTask(p++, new EntityAIPanic(this, 1.25D)); this.tasks.addTask(p++, new EntityAIWander(this, 1.0D)); this.tasks.addTask(p++, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(p++, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(p++, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F)); this.tasks.addTask(p++, this.aiSit); this.tasks.addTask(p++, new EntityAILookIdle(this)); // Target tasks p = 1; this.targetTasks.addTask(p++, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(p++, new EntityAIOwnerHurtTarget(this)); this.targetTasks.addTask(p++, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(p++, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); this.setTamed(false); }
public EntityGoodDragon(World par1World) { super(par1World); this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); this.dragonPartArray = new EntityGoodDragonPart[] {this.dragonPartHead = new EntityGoodDragonPart(this, "head", 6.0F, 6.0F), this.dragonPartBody = new EntityGoodDragonPart(this, "body", 8.0F, 8.0F), this.dragonPartTail1 = new EntityGoodDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartTail2 = new EntityGoodDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartTail3 = new EntityGoodDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartWing1 = new EntityGoodDragonPart(this, "wing", 4.0F, 4.0F), this.dragonPartWing2 = new EntityGoodDragonPart(this, "wing", 4.0F, 4.0F), this.dragonPartTailSpike1 = new EntityGoodDragonPart(this, "tail", 2.0F, 2.0F), this.dragonPartTailSpike2 = new EntityGoodDragonPart(this, "tail", 2.0F, 2.0F), this.dragonPartTailSpike3 = new EntityGoodDragonPart(this, "tail", 2.0F, 2.0F), this.dragonPartTailSpike4 = new EntityGoodDragonPart(this, "tail", 2.0F, 2.0F), this.dragonPartTailSpike5 = new EntityGoodDragonPart(this, "tail", 2.0F, 2.0F)}; this.setHealth(this.getMaxHealth()); this.setSize(16.0F, 8.0F); this.noClip = true; this.isImmuneToFire = true; this.targetY = 100.0D; this.ignoreFrustumCheck = true; }
public EntityMinionZ(World var1) { super(var1); // this.texture = "/mob/zombie.png"; // this.moveSpeed = 0.35F; this.Following(); this.getNavigator().setAvoidsWater(true); this.setPathToEntity((PathEntity) null); this.setAttackTarget((EntityLiving) null); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks .addTask(2, new EntityAIFollowOwner(this, 0.32f, 10.0F, 2.0F)); this.tasks.addTask(3, new EntityAIWander(this, 0.32f)); this.tasks.addTask(4, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(5, new EntityAIAttackOnCollide(this, 0.32f, true)); // This lets the mobs look around at any living entity mobs, to see if // they need to attack it or not. Also makes minions appear curious ;) this.tasks.addTask(6, new EntityAIWatchClosest(this, Entity.class, 8.0F)); this.tasks.addTask(7, 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(2, this.aiSit); this.player = this.worldObj.getPlayerEntityByName(this.func_152113_b()); //getOwnerName this.setSize(0.7F, 1.7F); }
public EntityKortor(World worldIn) { super(worldIn); this.setSize(0.6F, 1.5F); 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, 10.0F, 2.0F)); this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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, new Class[0])); this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate() { private static final String __OBFID = "CL_00002229"; public boolean func_180094_a(Entity p_180094_1_) { return p_180094_1_ instanceof EntityPig || p_180094_1_ instanceof EntityRabbit; } @Override public boolean apply(Object p_apply_1_) { return this.func_180094_a((Entity) p_apply_1_); } })); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntityJakan(World worldIn) { super(worldIn); this.setSize(2.6F, 2.6F); this.isImmuneToFire = true; 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, 10.0F, 2.0F)); this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.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, new Class[0])); this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate() { private static final String __OBFID = "CL_00002229"; public boolean func_180094_a(Entity p_180094_1_) { return p_180094_1_ instanceof EntitySheep || p_180094_1_ instanceof EntityPig || p_180094_1_ instanceof EntityCow; } @Override public boolean apply(Object p_apply_1_) { return this.func_180094_a((Entity) p_apply_1_); } })); this.setTamed(false); this.inventory = new InventoryPack(this); }
public EntitySven(World world) { super(world); setSize(3F, 2.5F); tasks.addTask(1, new EntityAISwimming(this)); tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); tasks.addTask(3, new EntityAIFollowOwner(this, 0.6D, 4.0F, 20.0F)); tasks.addTask(4, new EntityAIWander(this, 1.0D)); tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); tasks.addTask(5, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); }
@SuppressWarnings("rawtypes") public EntitySabertooth(World world, int raptorType) { super(world, SaddleType.SMALL, true, CoreBalance.DINO_PROPERTIES.SECONDS_TO_TAME_RAPTOR); this.setSize(0.8F, 1.5F); ((PathNavigateGround) this.getNavigator()).func_179690_a(true); this.tasks.addTask(0, new EntityAISwimming(this)); // this.tasks.addTask(2, new EntityAIAttackOnCollide(this, // EntityPlayer.class, 1.0D, false)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, false)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); // For // going // through // doors this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.5D, 10.0F, 2.0F)); // like // wolf, // but // faster // (wolf // is // 1.0D // speed) this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); int p = 1; attackPlayerTarget = new EntityAINearestAttackableTarget(this, EntityPlayer.class, true); this.targetTasks.addTask(p++, attackPlayerTarget); this.targetTasks.addTask(p++, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(p++, new EntityAIOwnerHurtTarget(this)); // this.targetTasks.addTask(p++, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0])); this.targetTasks.addTask(p++, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate() { public boolean func_180094_a(Entity p_180094_1_) { return p_180094_1_ instanceof EntitySheep || p_180094_1_ instanceof EntityRabbit; } public boolean apply(Object p_apply_1_) { return this.func_180094_a((Entity) p_apply_1_); } })); this.saberType = raptorType; this.setTamed(false); }