本文整理汇总了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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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;
}
示例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));
}
示例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));
}
示例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));
}
示例13: getAIControlledByPlayer
import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
/**
* Return the AI task for player control.
*/
public EntityAIControlledByPlayer getAIControlledByPlayer()
{
return this.aiControlledByPlayer;
}
示例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);
}
示例15: getAIControlledByPlayer
import net.minecraft.entity.ai.EntityAIControlledByPlayer; //导入依赖的package包/类
public EntityAIControlledByPlayer getAIControlledByPlayer()
{
return this.aiControlledByPlayer;
}