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


Java EntityAIControlledByPlayer类代码示例

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


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

示例1: EntityPig

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

示例2: EntitySkyChicken

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntitySkyChicken(World par1World)
    {
        super(par1World);
        this.setSize(0.3F, 0.7F);
        this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
        togglekey = "SPACE";
        itogglekey = Keyboard.getKeyIndex(togglekey);
        this.tasks.addTask(0, new EntityAISwimming(this));
//        this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
        this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F));
        this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.wheat_seeds, 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:Stormister,项目名称:Rediscovered-Mod-1.8,代码行数:17,代码来源:EntitySkyChicken.java

示例3: EntityPig

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

示例4: BeastMasterPet

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
private BeastMasterPet(World par1World) {
	super(par1World);
	this.moveSpeed = 0.35F;

	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, 5.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 EntityAITempt(this, 0.5D, RpgMastersAddon.whistle,false));
	this.tasks.addTask(9, new EntityAIWatchClosest(this,EntityLivingBase.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.tasks.addTask(1, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.1F));

	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this,IMob.class, 0, true));
}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:23,代码来源:BeastMasterPet.java

示例5: EntityPig

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntityPig(World p_i1689_1_)
{
    super(p_i1689_1_);
    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:xtrafrancyz,项目名称:Cauldron,代码行数:17,代码来源:EntityPig.java

示例6: EntitySkyChicken

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntitySkyChicken(World par1World)
{
    super(par1World);
    this.setSize(0.3F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    togglekey = "SPACE";
    itogglekey = Keyboard.getKeyIndex(togglekey);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F));
    this.tasks.addTask(4, new EntityAITempt(this, 1.0D, Item.seeds.itemID, 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:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:17,代码来源:EntitySkyChicken.java

示例7: EntityPig

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的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, Item.carrotOnAStick.itemID, false));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrot.itemID, 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:HATB0T,项目名称:RuneCraftery,代码行数:17,代码来源:EntityPig.java

示例8: EntitySkyChicken

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntitySkyChicken(World par1World)
{
    super(par1World);
    this.setSize(0.3F, 0.7F);
    this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
    togglekey = "SPACE";
    itogglekey = Keyboard.getKeyIndex(togglekey);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(3, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 1.0F));
    this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.wheat_seeds, 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:Stormister,项目名称:Rediscovered-Mod-1.7.10,代码行数:17,代码来源:EntitySkyChicken.java

示例9: getAIControlledByPlayer

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public static EntityAIControlledByPlayer getAIControlledByPlayer(EntityCow cow) {
    for (Object obj : cow.tasks.taskEntries) {
        EntityAITasks.EntityAITaskEntry taskEntry = (EntityAITasks.EntityAITaskEntry) obj;
        if (taskEntry.action instanceof EntityAIControlledByPlayer)
            return (EntityAIControlledByPlayer) taskEntry.action;
    }
    return null;
}
 
开发者ID:MrIbby,项目名称:RideableCows,代码行数:9,代码来源:RideableCows.java

示例10: OCMobsPig

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public OCMobsPig(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, Item.carrotOnAStick.itemID, false));
       this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Item.carrot.itemID, 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:Gnomorian,项目名称:ore-cattle,代码行数:16,代码来源:OCMobsPig.java

示例11: EntityPig

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntityPig(World p_i1689_1_) {
   super(p_i1689_1_);
   this.func_70105_a(0.9F, 0.9F);
   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 EntityAIPanic(this, 1.25D));
   this.field_70714_bg.func_75776_a(2, this.field_82184_d = new EntityAIControlledByPlayer(this, 0.3F));
   this.field_70714_bg.func_75776_a(3, new EntityAIMate(this, 1.0D));
   this.field_70714_bg.func_75776_a(4, new EntityAITempt(this, 1.2D, Item.field_82793_bR.field_77779_bT, false));
   this.field_70714_bg.func_75776_a(4, new EntityAITempt(this, 1.2D, Item.field_82797_bK.field_77779_bT, false));
   this.field_70714_bg.func_75776_a(5, new EntityAIFollowParent(this, 1.1D));
   this.field_70714_bg.func_75776_a(6, new EntityAIWander(this, 1.0D));
   this.field_70714_bg.func_75776_a(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
   this.field_70714_bg.func_75776_a(8, new EntityAILookIdle(this));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:EntityPig.java

示例12: EntityPiggycorn

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntityPiggycorn(World world) {
	super(world);
	this.tasks.taskEntries.clear();
	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.cookie, false));
       this.tasks.addTask(4, new EntityAITempt(this, 1.2D, DerpyItems.cookie, 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:Wuerfel21,项目名称:The-Derpy-Shiz-Mod,代码行数:15,代码来源:EntityPiggycorn.java

示例13: getAIControlledByPlayer

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
/**
 * Return the AI task for player control.
 */
public EntityAIControlledByPlayer getAIControlledByPlayer()
{
    return this.aiControlledByPlayer;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:EntityPig.java

示例14: newAIControlledByPlayer

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
@Override
public AIControlledByPlayer newAIControlledByPlayer(EntityLiving entity, float speed) {
    return (AIControlledByPlayer) new EntityAIControlledByPlayer((net.minecraft.entity.EntityLiving) entity, speed);
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:5,代码来源:NeptuneAIFactory.java

示例15: getAIControlledByPlayer

import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntityAIControlledByPlayer getAIControlledByPlayer()
{
    return this.aiControlledByPlayer;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:5,代码来源:EntityPig.java


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