本文整理汇总了Java中net.minecraft.entity.ai.EntityAIVillagerInteract类的典型用法代码示例。如果您正苦于以下问题:Java EntityAIVillagerInteract类的具体用法?Java EntityAIVillagerInteract怎么用?Java EntityAIVillagerInteract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityAIVillagerInteract类属于net.minecraft.entity.ai包,在下文中一共展示了EntityAIVillagerInteract类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: EntityVillager
import net.minecraft.entity.ai.EntityAIVillagerInteract; //导入依赖的package包/类
public EntityVillager(World worldIn, int professionId)
{
super(worldIn);
this.villagerInventory = new InventoryBasic("Items", false, 8);
this.setProfession(professionId);
this.setSize(0.6F, 1.8F);
((PathNavigateGround)this.getNavigator()).setBreakDoors(true);
((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
this.tasks.addTask(1, new EntityAITradePlayer(this));
this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
this.tasks.addTask(2, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
this.tasks.addTask(6, new EntityAIVillagerMate(this));
this.tasks.addTask(7, new EntityAIFollowGolem(this));
this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.tasks.addTask(9, new EntityAIVillagerInteract(this));
this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
this.setCanPickUpLoot(true);
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:EntityVillager.java
示例2: initEntityAI
import net.minecraft.entity.ai.EntityAIVillagerInteract; //导入依赖的package包/类
protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEvoker.class, 12.0F, 0.8D, 0.8D));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVindicator.class, 8.0F, 0.8D, 0.8D));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVex.class, 8.0F, 0.6D, 0.6D));
this.tasks.addTask(1, new EntityAITradePlayer(this));
this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
this.tasks.addTask(2, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
this.tasks.addTask(6, new EntityAIVillagerMate(this));
this.tasks.addTask(7, new EntityAIFollowGolem(this));
this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.tasks.addTask(9, new EntityAIVillagerInteract(this));
this.tasks.addTask(9, new EntityAIWanderAvoidWater(this, 0.6D));
this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:EntityVillager.java
示例3: initEntityAI
import net.minecraft.entity.ai.EntityAIVillagerInteract; //导入依赖的package包/类
protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
this.tasks.addTask(1, new EntityAITradePlayer(this));
this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
this.tasks.addTask(2, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
this.tasks.addTask(6, new EntityAIVillagerMate(this));
this.tasks.addTask(7, new EntityAIFollowGolem(this));
this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.tasks.addTask(9, new EntityAIVillagerInteract(this));
this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:EntityVillager.java
注:本文中的net.minecraft.entity.ai.EntityAIVillagerInteract类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论