當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityAIPanic類代碼示例

本文整理匯總了Java中net.minecraft.entity.ai.EntityAIPanic的典型用法代碼示例。如果您正苦於以下問題:Java EntityAIPanic類的具體用法?Java EntityAIPanic怎麽用?Java EntityAIPanic使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EntityAIPanic類屬於net.minecraft.entity.ai包,在下文中一共展示了EntityAIPanic類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: EntityHorse

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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.EntityAIPanic; //導入依賴的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: EntityPorcodon

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的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

示例10: EntityHorse

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的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

示例11: EntitySheep

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的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

示例12: EntityPig

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的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

示例13: EntityHorseclaw

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的package包/類
public EntityHorseclaw(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:mookie1097,項目名稱:NausicaaMod,代碼行數:17,代碼來源:EntityHorseclaw.java

示例14: EntityHorse

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的package包/類
public EntityHorse(World p_i1685_1_)
{
    super(p_i1685_1_);
    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:xtrafrancyz,項目名稱:Cauldron,代碼行數:18,代碼來源:EntityHorse.java

示例15: EntitySheep

import net.minecraft.entity.ai.EntityAIPanic; //導入依賴的package包/類
public EntitySheep(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.field_90016_e.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:19,代碼來源:EntitySheep.java


注:本文中的net.minecraft.entity.ai.EntityAIPanic類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。