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


Java EntityAIVillagerMate类代码示例

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


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

示例1: EntityVillager

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

示例4: EntityVillager

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
public EntityVillager(World par1World, int par2)
{
    super(par1World);
    this.setProfession(par2);
    this.setSize(0.6F, 1.8F);
    this.getNavigator().setBreakDoors(true);
    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(8, new EntityAIPlay(this, 0.32D));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:24,代码来源:EntityVillager.java

示例5: EntityMagician

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
public EntityMagician(World world) {
	super(world);
       this.setSize(0.6F, 1.8F);
       this.getNavigator().setBreakDoors(true);
       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(8, new EntityAIPlay(this, 0.32D));
       this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
       this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
       this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
       this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
 
开发者ID:MagiciansArtificeTeam,项目名称:Magicians-Artifice,代码行数:22,代码来源:EntityMagician.java

示例6: EntityVillager

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
public EntityVillager(World p_i1748_1_, int p_i1748_2_)
{
    super(p_i1748_1_);
    this.setProfession(p_i1748_2_);
    this.setSize(0.6F, 1.8F);
    this.getNavigator().setBreakDoors(true);
    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(8, new EntityAIPlay(this, 0.32D));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
    this.tasks.addTask(9, new EntityAIWander(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:24,代码来源:EntityVillager.java

示例7: EntityVillager

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
public EntityVillager(World p_i1748_1_, int p_i1748_2_) {
   super(p_i1748_1_);
   this.func_70938_b(p_i1748_2_);
   this.func_70105_a(0.6F, 1.8F);
   this.func_70661_as().func_75498_b(true);
   this.func_70661_as().func_75491_a(true);
   this.field_70714_bg.func_75776_a(0, new EntityAISwimming(this));
   this.field_70714_bg.func_75776_a(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
   this.field_70714_bg.func_75776_a(1, new EntityAITradePlayer(this));
   this.field_70714_bg.func_75776_a(1, new EntityAILookAtTradePlayer(this));
   this.field_70714_bg.func_75776_a(2, new EntityAIMoveIndoors(this));
   this.field_70714_bg.func_75776_a(3, new EntityAIRestrictOpenDoor(this));
   this.field_70714_bg.func_75776_a(4, new EntityAIOpenDoor(this, true));
   this.field_70714_bg.func_75776_a(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
   this.field_70714_bg.func_75776_a(6, new EntityAIVillagerMate(this));
   this.field_70714_bg.func_75776_a(7, new EntityAIFollowGolem(this));
   this.field_70714_bg.func_75776_a(8, new EntityAIPlay(this, 0.32D));
   this.field_70714_bg.func_75776_a(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
   this.field_70714_bg.func_75776_a(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
   this.field_70714_bg.func_75776_a(9, new EntityAIWander(this, 0.6D));
   this.field_70714_bg.func_75776_a(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:EntityVillager.java

示例8: EntityGoron

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
public EntityGoron(World world, int profession) {
	super(world, profession);
	setSize(1.5F, 2.8F);
	//setCanPickUpLoot(true);
	tasks.taskEntries.clear();
	tasks.addTask(0, new EntityAISwimming(this));
	//tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
	tasks.addTask(1, new EntityAITradePlayer(this));
	tasks.addTask(1, new EntityAILookAtTradePlayer(this));
	tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
	tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, false));
	tasks.addTask(3, new EntityAIMoveTowardsTarget(this, getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue(), 16.0F));
	tasks.addTask(4, new EntityAIMoveThroughVillage(this, 0.6D, true));
	//tasks.addTask(2, new EntityAIMoveIndoors(this));
	//tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
	//tasks.addTask(4, new EntityAIOpenDoor(this, true));
	tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
	tasks.addTask(6, new EntityAIVillagerMate(this));
	tasks.addTask(7, new EntityAIFollowGolem(this));
	tasks.addTask(8, new EntityAIPlay(this, 0.32D));
	tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
	tasks.addTask(9, new EntityAIWatchClosest2(this, EntityVillager.class, 5.0F, 0.02F));
	tasks.addTask(9, new EntityAIWander(this, 0.6D));
	tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
	targetTasks.addTask(1, new GenericAIDefendVillage(this));
	targetTasks.addTask(2, new EntityAIHurtByTarget(this, true));
	//targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:29,代码来源:EntityGoron.java

示例9: isSuitableForEntity

import net.minecraft.entity.ai.EntityAIVillagerMate; //导入依赖的package包/类
@Override
public boolean isSuitableForEntity(EntityLiving entity, Class<? extends EntityAIBase> c)
{
    if(c == EntityAICreeperSwell.class && !(entity instanceof EntityCreeper))
        return false;
    else if(c == EntityAIAvoidEntity.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIAttackOnCollide.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIWander.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAINearestAttackableTarget.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIHurtByTarget.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIArrowAttack.class && !(entity instanceof IRangedAttackMob))
        return false;
    else if(c == EntityAIBeg.class && !(entity instanceof EntityWolf))
        return false;
    else if(c == EntityAIDefendVillage.class && !(entity instanceof EntityIronGolem))
        return false;
    else if(c == EntityAIFleeSun.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIFollowGolem.class && !(entity instanceof EntityVillager))
        return false;
    else if(c == EntityAIFollowOwner.class && !(entity instanceof EntityTameable))
        return false;
    else if(c == EntityAIFollowParent.class && !(entity instanceof EntityAnimal))
        return false;
    else if(c == EntityAILookAtTradePlayer.class && !(entity instanceof EntityVillager))
        return false;
    else if(c == EntityAILookAtVillager.class && !(entity instanceof EntityIronGolem))
        return false;
    else if(c == EntityAIMate.class && !(entity instanceof EntityAnimal))
        return false;
    else if(c == EntityAIPanic.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAITempt.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIMoveIndoors.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIMoveThroughVillage.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIOcelotSit.class && !(entity instanceof EntityOcelot))
        return false;
    else if(c == EntityAIPlay.class && !(entity instanceof EntityVillager))
        return false;
    else if(c == EntityAIRestrictOpenDoor.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIRestrictSun.class && !(entity instanceof EntityCreature))
        return false;
    else if(c == EntityAIRunAroundLikeCrazy.class && !(entity instanceof EntityHorse))
        return false;
    else if(c == EntityAISit.class && !(entity instanceof EntityTameable))
        return false;
    else if(c == EntityAITargetNonTamed.class && !(entity instanceof EntityTameable))
        return false;
    else if(c == EntityAITradePlayer.class && !(entity instanceof EntityVillager))
        return false;
    else if(c == EntityAIVillagerMate.class && !(entity instanceof EntityVillager))
        return false;
    else if(c == EntityAIOwnerHurtTarget.class && !(entity instanceof EntityTameable))
        return false;
    else if(c == EntityAIOwnerHurtByTarget.class && !(entity instanceof EntityTameable))
        return false;
    return true;
}
 
开发者ID:jglrxavpok,项目名称:CustomAI,代码行数:68,代码来源:EntityAIVanillaWorker.java


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