package modendercraft; import net.minecraft.block.Block; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class EntityChevalier extends EntityMob { protected boolean isAIEnabled() { return true; } public EntityChevalier(World par1World) { super(par1World); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0.4D, false)); this.targetTasks.addTask(7, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(200D); this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(15.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.69); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(5); } protected String getLivingSound() { return "mob.blaze.breathe"; } protected String getHurtSound() { return "mob.blaze.hit"; } protected String getDeathSound() { return "mob.blaze.death"; } protected float getSoundVolume() { return 0.1F; } protected void entityInit() { super.entityInit(); this.setCurrentItemOrAmor(0, new ItemStack(modendercraftmain.EDG); } }