本文整理汇总了Java中net.minecraft.entity.ai.EntityAIArrowAttack类的典型用法代码示例。如果您正苦于以下问题:Java EntityAIArrowAttack类的具体用法?Java EntityAIArrowAttack怎么用?Java EntityAIArrowAttack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityAIArrowAttack类属于net.minecraft.entity.ai包,在下文中一共展示了EntityAIArrowAttack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EntityWither
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityWither(World worldIn)
{
super(worldIn);
this.setHealth(this.getMaxHealth());
this.setSize(0.9F, 3.5F);
this.isImmuneToFire = true;
((PathNavigateGround)this.getNavigator()).setCanSwim(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
this.experienceValue = 50;
}
示例2: EntityHornedHuntsman
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityHornedHuntsman(World par1World) {
super(par1World);
this.setSize(1.4F, 3.2F);
super.isImmuneToFire = true;
this.getNavigator().setAvoidsWater(true);
this.getNavigator().setCanSwim(true);
super.tasks.addTask(1, new EntityAISwimming(this));
super.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
super.tasks.addTask(3, new EntityAIMoveTowardsTarget(this, 1.0D, 48.0F));
super.tasks.addTask(4, new EntityAIArrowAttack(this, 1.0D, 20, 60, 30.0F));
super.tasks.addTask(5, new EntityAIWander(this, 1.0D));
super.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
super.tasks.addTask(7, new EntityAILookIdle(this));
super.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
super.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
super.experienceValue = 70;
}
示例3: EntityNinjaMaster
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityNinjaMaster(World p_i1745_1_)
{
super(p_i1745_1_);
this.getNavigator().setBreakDoors(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true));
this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
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 EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
//this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false));
this.tasks.addTask(1, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
this.setSize(0.6F, 1.8F);
}
示例4: EntityLongbowGuard
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityLongbowGuard(World world){
super(world);
if (this.worldObj.difficultySetting == EnumDifficulty.EASY)
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, true));
else
this.tasks.addTask(1, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityCreature.class, 0, true, false,
new IEntitySelector() {
public boolean isEntityApplicable(Entity entity) {
if (!isLookingForHome && ((EntityCreature) entity).isWithinHomeDistanceCurrentPosition() && entity instanceof EntityZombie)
return true;
return false;
}
}));
setGuardWeaponType(type);
}
示例5: EntityCrossbowGuard
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityCrossbowGuard(World world){
super(world);
if (this.worldObj.difficultySetting == EnumDifficulty.EASY)
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, true));
else
this.tasks.addTask(1, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityCreature.class, 0, true, false,
new IEntitySelector() {
public boolean isEntityApplicable(Entity entity) {
if (!isLookingForHome && ((EntityCreature) entity).isWithinHomeDistanceCurrentPosition() && entity instanceof EntityZombie)
return true;
return false;
}
}));
setGuardWeaponType(type);
}
示例6: EntityWither
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityWither(World par1World)
{
super(par1World);
this.setHealth(this.getMaxHealth());
this.setSize(0.9F, 4.0F);
this.isImmuneToFire = true;
this.getNavigator().setCanSwim(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
this.experienceValue = 50;
}
示例7: EntitySkeletalKnight
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntitySkeletalKnight(World world)
{
super(world);
setWeapon((byte)0);
this.tasks.addTask(3, new EntityAIArrowAttack(this, 0.25F, 20, 60, 15.0F));
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIBreakDoorAnimate(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityLiving.class, 1.0D, true));
this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, 1.0D, false));
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.equipmentDropChances[0] = 2.0F;
}
示例8: EntityWither
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityWither(World p_i1701_1_)
{
super(p_i1701_1_);
this.setHealth(this.getMaxHealth());
this.setSize(0.9F, 4.0F);
this.isImmuneToFire = true;
this.getNavigator().setCanSwim(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 40, 20.0F));
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, attackEntitySelector));
this.experienceValue = 50;
}
示例9: EntityIsaacNormal
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityIsaacNormal(World par1World) {
super(par1World);
isImmuneToFire = true;
setSize(0.6F, 1.8F);
moveSpeed = 0.25F;
tasks.addTask(1, new EntityAISwimming(this));
tasks.addTask(2, new EntityAIRestrictSun(this));
tasks.addTask(3, new EntityAIFleeSun(this, moveSpeed));
tasks.addTask(5, new EntityAIWander(this, moveSpeed));
tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
tasks.addTask(6, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
if (!par1World.isRemote) {
tasks.addTask(1, new EntityAIArrowAttack(this, moveSpeed, 18, 50F));
}
}
示例10: EntityBehlmann
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
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));
}
示例11: EntityTComp
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityTComp(World par1World) {
super(par1World);
this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "TComp.png";
this.moveSpeed = this.stepHeight = 1.0F;
this.moveSpeed = 0.75F;
this.stepHeight = 2.0F;
this.getNavigator().setBreakDoors(true);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
this.tasks.addTask(3, new EntityAIMoveIndoors(this));
this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}
示例12: EntitySnowman
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntitySnowman(World worldIn)
{
super(worldIn);
this.setSize(0.7F, 1.9F);
((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
this.tasks.addTask(1, new EntityAIArrowAttack(this, 1.25D, 20, 10.0F));
this.tasks.addTask(2, new EntityAIWander(this, 1.0D));
this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(4, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, true, false, IMob.mobSelector));
}
示例13: EntityWitch
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityWitch(World worldIn)
{
super(worldIn);
this.setSize(0.6F, 1.95F);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 60, 10.0F));
this.tasks.addTask(2, new EntityAIWander(this, 1.0D));
this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(3, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
示例14: EntityEvolvedSkeleton
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntityEvolvedSkeleton(World par1World)
{
super(par1World);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIRestrictSun(this));
this.tasks.addTask(3, new EntityAIFleeSun(this, 0.25F));
this.tasks.addTask(4, new EntityAIArrowAttack(this, 0.25F, 25, 20));
this.tasks.addTask(5, new EntityAIWander(this, 0.25F));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.setSize(0.7F, 2.5F);
}
示例15: EntitySnowCube
import net.minecraft.entity.ai.EntityAIArrowAttack; //导入依赖的package包/类
public EntitySnowCube(World p_i1692_1_)
{
super(p_i1692_1_);
this.setSize(0.4F, 1.8F);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(1, new EntityAIArrowAttack(this, 1.25D, 1, 10.0F));
this.tasks.addTask(2, new EntityAIWander(this, 1.0D));
this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(4, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector));
}