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


Java EntityAIFollowParent类代码示例

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


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

示例1: EntityHorse

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityHorse(World worldIn)
{
    super(worldIn);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.initHorseChest();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:EntityHorse.java

示例2: EntitySheep

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntitySheep(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    ((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, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.entityAIEatGrass);
    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.inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:EntitySheep.java

示例3: EntityPig

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
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));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:EntityPig.java

示例4: Elk

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public Elk(World worldIn)
{
	super(worldIn);
	this.setSize(1.8F, 2.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
	this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(3,
			new EntityAITempt(this, 1.25D, Item.getItemFromBlock(Blocks.grass), false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(5, new EntityAIEatGrass(this));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
开发者ID:hero887,项目名称:Tannery,代码行数:18,代码来源:Elk.java

示例5: ElkBaby

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public ElkBaby(World worldIn)
{
	super(worldIn);
	this.setSize(1.8F, 2.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
	this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(3,
			new EntityAITempt(this, 1.25D, Item.getItemFromBlock(Blocks.grass), false));
	this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
	this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(5, new EntityAIEatGrass(this));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));

}
 
开发者ID:hero887,项目名称:Tannery,代码行数:18,代码来源:ElkBaby.java

示例6: EntityDodo

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的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

示例7: EntityPopo

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityPopo(World p_i1691_1_)
{
    super(p_i1691_1_);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    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.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
    this.hasCustomNameTag();
    this.setCustomNameTag("Popo");
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:20,代码来源:EntityPopo.java

示例8: EntityLuckyChicken

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityLuckyChicken(World p_i1682_1_)
{
    super(p_i1682_1_);
    this.setSize(0.3F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.wheat_seeds, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));
    this.hasCustomNameTag();
    this.setCustomNameTag("Lucky Chicken");
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:17,代码来源:EntityLuckyChicken.java

示例9: EntityElk

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityElk(World worldIn) 
{
	super(worldIn);
	this.setSize(1.5F, 1.8F);
	((PathNavigateGround)this.getNavigator()).setCanSwim(true);
	this.tasks.addTask(0, new EntityAISmartSwim(this));
	this.tasks.addTask(4, new EntityAIAttackMelee(this, 0.8D, true));
	this.tasks.addTask(5, new EntityAIFollowParent(this, 0.8D));	
	aiHerdMove = new EntityAIHerdMove(this, 0.5D);
	this.tasks.addTask(6, aiHerdMove);
	this.tasks.addTask(7, new EntityAIWanderHex(this, 0.5D));
	//this.tasks.addTask(7, new EntityAIWander(this, 0.5D));
	//this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	this.tasks.addTask(8, new EntityAILookIdle(this));
	this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true, new Class[0]));//The array seems to be for class types that this task should ignore
	setGender(worldIn.rand.nextBoolean() ? Gender.Male : Gender.Female);
}
 
开发者ID:Deadrik,项目名称:TFC2,代码行数:18,代码来源:EntityElk.java

示例10: EntityPorcodon

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityPorcodon(World curWorld) {
    super(curWorld);

    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));

    dropItem = ARItems.baseItem.getItemStack("porcodonMeat", 1);

}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:20,代码来源:EntityPorcodon.java

示例11: EntityBrontosaurus

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的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

示例12: EntityHorse

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityHorse(World par1World)
{
    super(par1World);
    this.setSize(1.4F, 1.6F);
    this.isImmuneToFire = false;
    this.setChested(false);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.2D));
    this.tasks.addTask(1, new EntityAIRunAroundLikeCrazy(this, 1.2D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWander(this, 0.7D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.func_110226_cD();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:18,代码来源:EntityHorse.java

示例13: EntitySheep

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntitySheep(World par1World)
{
    super(par1World);
    this.setSize(0.9F, 1.3F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false));
    this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D));
    this.tasks.addTask(5, this.field_146087_bs);
    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.field_90016_e.setInventorySlotContents(0, new ItemStack(Items.dye, 1, 0));
    this.field_90016_e.setInventorySlotContents(1, new ItemStack(Items.dye, 1, 0));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:18,代码来源:EntitySheep.java

示例14: EntityPig

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

示例15: EntityTurtleBase

import net.minecraft.entity.ai.EntityAIFollowParent; //导入依赖的package包/类
public EntityTurtleBase(World worldIn)
{
	super(worldIn);
	this.setSize(0.6F, 0.7F);
	((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 EntityAITempt(this, 1.2D, Items.fish, false));
	this.tasks.addTask(3, new EntityAITempt(this, 1.2D, Items.melon, false));
	this.tasks.addTask(4, new EntityAIMate(this, this.getMoveSpeed()));
	this.tasks.addTask(5, new EntityAIFollowOwner(this, this.getMoveSpeed(), 2.0F, 2.0F));
	this.tasks.addTask(6, new EntityAIFollowParent(this, this.getMoveSpeed() * 1.1D));
	this.tasks.addTask(7, new EntityAIWander(this, this.getMoveSpeed()));
	this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(9, new EntityAILookIdle(this));
	this.setTamed(false);
}
 
开发者ID:andykuo1,项目名称:mcplus_mods,代码行数:18,代码来源:EntityTurtleBase.java


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