当前位置: 首页>>代码示例>>Java>>正文


Java EntityAIFollowOwner类代码示例

本文整理汇总了Java中net.minecraft.entity.ai.EntityAIFollowOwner的典型用法代码示例。如果您正苦于以下问题:Java EntityAIFollowOwner类的具体用法?Java EntityAIFollowOwner怎么用?Java EntityAIFollowOwner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EntityAIFollowOwner类属于net.minecraft.entity.ai包,在下文中一共展示了EntityAIFollowOwner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: EntityOcelot

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntityOcelot(World worldIn)
{
    super(worldIn);
    this.setSize(0.6F, 0.7F);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:EntityOcelot.java

示例2: initEntityAI

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的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));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:27,代码来源:EntityWolf.java

示例3: initEntityAI

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.aiTempt = new EntityAITempt(this, 0.6D, Items.FISH, true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt);
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWanderAvoidWater(this, 0.8D, 1.0000001E-5F));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:EntityOcelot.java

示例4: initEntityAI

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的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));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:26,代码来源:EntityWolf.java

示例5: initEntityAI

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.aiTempt = new EntityAITempt(this, 0.6D, Items.FISH, true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt);
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, false, (Predicate)null));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:EntityOcelot.java

示例6: initEntityAI

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
@Override
protected void initEntityAI()
{
    super.initEntityAI();
    this.aiSit = new EntityAISit(this);
    this.tasks.addTask(0, new AISwim(this));
    this.tasks.addTask(1, this.aiSit);
    this.tasks.addTask(4, new AIMeleeAttack());
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));

    this.targetTasks.addTask(1, new AIDefendOwner(this));
    this.targetTasks.addTask(2, new AIHelpOwnerAttack(this));
    this.targetTasks.addTask(3, new AIDefendSelf(this, true, new Class[0]));
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:18,代码来源:EntityTamedPolarBear.java

示例7: EntitySlave

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntitySlave(World p_i1688_1_)
{
    super(p_i1688_1_);
    this.setSize(0.8F, 1.6F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, Items.diamond, true));
    this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(5, new EntityAIAvoidEntity(this, EntityCreeper.class, 16.0F, 0.8D, 1.33D));
    this.tasks.addTask(6, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(7, new EntityAIOcelotAttack(this));
    this.tasks.addTask(8, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(9, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityMob.class, 750, false));
    this.setType(this.rand.nextInt(4));
    this.setRandomStuff();
}
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:20,代码来源:EntitySlave.java

示例8: EntityStymph

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntityStymph(World w)
{
    super(w);
    this.setSize(0.6F, 1.4F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, ItemRegister.BERRY_RED, true));
    this.tasks.addTask(4, new EntityAIAvoidEntity(this, EntityCow.class, 16.0F, 0.8D, 1.33D));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntitySnowCube.class, 750, false));
    this.setTameSkin(this.worldObj.rand.nextInt(3));
}
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:19,代码来源:EntityStymph.java

示例9: EntityDodo

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
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;
	}
 
开发者ID:BubbleTrouble14,项目名称:ARKCraft,代码行数:25,代码来源:EntityDodo.java

示例10: EntityKitty

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntityKitty(World p_i1688_1_)
{
    super(p_i1688_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, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    //this.tasks.addTask(4, new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 0.8D, 1.33D));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIKittySit(this, 1.33D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, 750, false));
    this.hasCustomNameTag();
    this.setCustomNameTag("Kitty");
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:21,代码来源:EntityKitty.java

示例11: DemoEntityTameable

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的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);
}
 
开发者ID:worldwidewoogie,项目名称:demomod,代码行数:23,代码来源:DemoEntityTameable.java

示例12: EntityBrontosaurus

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntityBrontosaurus(World w)
{
	super(w);
	this.setSize(5.5F, 4.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.taskEntries.clear();
	int p = 0;
	this.tasks.addTask(++p, new EntityAISwimming(this));
	this.tasks.addTask(++p, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(++p, new EntityAILookIdle(this));
	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));
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:18,代码来源:EntityBrontosaurus.java

示例13: EntityIatWolf

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的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);
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:18,代码来源:EntityIatWolf.java

示例14: EntityWolf

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的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);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:EntityWolf.java

示例15: EntityOcelot

import net.minecraft.entity.ai.EntityAIFollowOwner; //导入依赖的package包/类
public EntityOcelot(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, this.aiTempt = new EntityAITempt(this, 0.6D, Items.fish, true));
    this.tasks.addTask(4, new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 0.8D, 1.33D));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
    this.tasks.addTask(6, new EntityAIOcelotSit(this, 1.33D));
    this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
    this.tasks.addTask(8, new EntityAIOcelotAttack(this));
    this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
    this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
    this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
    this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntityChicken.class, 750, false));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:19,代码来源:EntityOcelot.java


注:本文中的net.minecraft.entity.ai.EntityAIFollowOwner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。