本文整理汇总了Java中net.minecraft.entity.ai.EntityAIOwnerHurtTarget类的典型用法代码示例。如果您正苦于以下问题:Java EntityAIOwnerHurtTarget类的具体用法?Java EntityAIOwnerHurtTarget怎么用?Java EntityAIOwnerHurtTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityAIOwnerHurtTarget类属于net.minecraft.entity.ai包,在下文中一共展示了EntityAIOwnerHurtTarget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEntityAI
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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));
}
示例2: initEntityAI
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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));
}
示例3: DemoEntityTameable
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例4: EntityIatWolf
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
public EntityIatWolf(World world) {
super(world);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, 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(11, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIOwnerHurtTarget(this));
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
this.setTamed(false);
}
示例5: EntityWolf
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例6: setupGolem
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
@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));
}
示例7: BeastMasterPet
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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));
}
示例8: EntityKortor
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例9: EntityForisZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例10: EntityDestroZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例11: EntityRedZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例12: EntityJakan
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例13: EntityIceZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例14: EntityZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}
示例15: EntityDarkZertum
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; //导入依赖的package包/类
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);
}