• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EntityAIMoveTwardsRestriction类的典型用法和代码示例

java 2次浏览

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

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

示例1: EntityTreant

点赞 3

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityTreant(World par1World)
{
    super(par1World);
    this.moveSpeed = 0.16F;
    this.texture = "/mods/DecayingWorld/textures/mob/treant.png";
    this.setSize(1.4F, 2.9F);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed*1.8F, false));
    this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityZombie.class, this.moveSpeed*1.8F, true));
    this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
    this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
    this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityZombie.class, 16.0F, 0, false));
}
 

开发者ID:Draco18s,
项目名称:Decaying-World,
代码行数:18,
代码来源:EntityTreant.java

示例2: EntityCyborg

点赞 3

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
/**
 * 
 * @param world
 */
public EntityCyborg(World world){
	super(world);
	this.texture="/mods/veniocraft/textures/models/CyborgTexture.png";
	this.moveSpeed=0.23F;
	this.getNavigator().setBreakDoors(true);
	this.getNavigator().setAvoidsWater(true);
	this.tasks.addTask(0,new EntityAISwimming(this));
	this.tasks.addTask(1,new EntityAIBreakDoor(this));
	this.tasks.addTask(2,new EntityAIAttackOnCollide(this,EntityPlayer.class,this.moveSpeed,false));
	this.tasks.addTask(3,new EntityAIAttackOnCollide(this,EntityVillager.class,this.moveSpeed,true));
	this.tasks.addTask(4,new EntityAIMoveTwardsRestriction(this,this.moveSpeed));
	this.tasks.addTask(5,new EntityAIMoveThroughVillage(this,this.moveSpeed,false));
	this.tasks.addTask(6,new EntityAIWander(this,this.moveSpeed));
	this.tasks.addTask(7,new EntityAIWatchClosest(this,EntityPlayer.class,8.0F));
	this.tasks.addTask(7,new EntityAILookIdle(this));
	this.targetTasks.addTask(1,new EntityAIHurtByTarget(this,true));
	this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityPlayer.class,16.0F,0,true));
	this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityVillager.class,16.0F,0,false));
	this.tasks.addTask(8,new EntityAITempt(this,0.3F,VenioItems.chip.itemID,false));
}
 

开发者ID:Danis98,
项目名称:Veniocraft,
代码行数:25,
代码来源:EntityCyborg.java

示例3: EntityRobot

点赞 3

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityRobot(World par1World)
{
	super(par1World);
	this.moveSpeed = 0.23F;
	this.getNavigator().setBreakDoors(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIBreakDoor(this));
	this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
	this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityVillager.class, this.moveSpeed, true));
	this.tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
	this.tasks.addTask(5, new EntityAIMoveThroughVillage(this, this.moveSpeed, false));
	this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
	this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
	this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false));
	this.setSize(1.4F, 2F);
	inventory = new ItemStack[EnumRobot.InventorySize.getValue()];
}
 

开发者ID:Pumuckl007,
项目名称:WeaponsMod,
代码行数:21,
代码来源:EntityRobot.java

示例4: EntityBehlmann

点赞 3

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityBehlmann(World par1World) {
	super(par1World);
	this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "behlmann.png";
	this.moveSpeed = this.stepHeight = 1.0F;

	this.getNavigator().setAvoidsWater(true);
	this.getNavigator().setCanSwim(true);

	this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
	this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 0.25F, true));
	this.tasks.addTask(3, new EntityAIMoveTowardsTarget(this, 0.22F, 32.0F));
	this.tasks.addTask(4, new EntityAIMoveThroughVillage(this, 0.16F, true));
	this.tasks.addTask(5, new EntityAIMoveTwardsRestriction(this, 0.16F));
	this.tasks.addTask(6, new EntityAIWander(this, 0.16F));
	this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(8, new EntityAILookIdle(this));
	this.tasks.addTask(9, new EntityAIPanic(this, 0.38F));
	this.tasks.addTask(10, new EntityAITempt(this, 0.25F, Block.brewingStand.blockID, false));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
	this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityAnimal.class, 16.0F, 0, false));
}
 

开发者ID:DrDew2,
项目名称:Amitcraft,
代码行数:22,
代码来源:EntityBehlmann.java

示例5: EntityTComp

点赞 3

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityTComp(World par1World) {
	super(par1World);
	this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "TComp.png";
	this.moveSpeed = this.stepHeight = 1.0F;

	this.moveSpeed = 0.75F;
	this.stepHeight = 2.0F;

	this.getNavigator().setBreakDoors(true);
	this.getNavigator().setAvoidsWater(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
	this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
	this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
	this.tasks.addTask(3, new EntityAIMoveIndoors(this));
	this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
	this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
	this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
	this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
	this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
	this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
	this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
	this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}
 

开发者ID:DrDew2,
项目名称:Amitcraft,
代码行数:27,
代码来源:EntityTComp.java

示例6: EntityMeteorSpawn

点赞 2

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityMeteorSpawn(World par1World) {
	super(par1World);
	this.stepHeight = 3.1F;
	this.moveSpeed = 0.25F;
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
       this.tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
	this.tasks.addTask(6, new EntityAIWander(this, this.moveSpeed));
	this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 32.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 64.0F, 0, true));
	this.experienceValue = 80;
	this.isImmuneToFire = true;
}
 

开发者ID:Hologuardian,
项目名称:FallingEarth,
代码行数:16,
代码来源:EntityMeteorSpawn.java

示例7: EntityPrice

点赞 2

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction; //导入依赖的package包/类
public EntityPrice(World par1World) {
	super(par1World);
	this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "price.png";

	this.moveSpeed = 0.75F;
	this.stepHeight = 2.0F;
	
	this.getNavigator().setBreakDoors(true);
	this.getNavigator().setAvoidsWater(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
	this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
	this.tasks.addTask(1, new EntityPriceAITradePlayer(this));
	this.tasks.addTask(1, new EntityPriceAILookAtTradePlayer(this));
	this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
	this.tasks.addTask(3, new EntityAIMoveIndoors(this));
	this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
	this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
	this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
	this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
	this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
	this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
	this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
	this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}
 

开发者ID:DrDew2,
项目名称:Amitcraft,
代码行数:28,
代码来源:EntityPrice.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)