Advertisement
robin4002

Untitled

Mar 3rd, 2014
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.68 KB | None | 0 0
  1. package modendercraft;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.entity.SharedMonsterAttributes;
  5. import net.minecraft.entity.ai.EntityAIAttackOnCollide;
  6. import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
  7. import net.minecraft.entity.monster.EntityMob;
  8. import net.minecraft.entity.player.EntityPlayer;
  9. import net.minecraft.item.Item;
  10. import net.minecraft.item.ItemStack;
  11. import net.minecraft.nbt.NBTTagCompound;
  12. import net.minecraft.world.World;
  13.  
  14. public class EntityChevalier extends EntityMob
  15. {
  16.     private final ItemStack defaultHeldItem  = new ItemStack(modendercraftmain.EDG, 1);
  17.  
  18.     protected boolean isAIEnabled()
  19.     {
  20.         return true;
  21.     }
  22.  
  23.     public EntityChevalier(World world)
  24.     {
  25.         super(world);
  26.  
  27.         this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0.4D, false));
  28.         this.targetTasks.addTask(7, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
  29.     }
  30.  
  31.     protected void applyEntityAttributes()
  32.     {
  33.         super.applyEntityAttributes();
  34.         this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(200D);
  35.         this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(15.0D);
  36.         this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.69);
  37.         this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(5);
  38.  
  39.     }
  40.  
  41.     protected String getLivingSound()
  42.     {
  43.         return "mob.blaze.breathe";
  44.     }
  45.  
  46.     protected String getHurtSound()
  47.     {
  48.         return "mob.blaze.hit";
  49.     }
  50.  
  51.     protected String getDeathSound()
  52.     {
  53.         return "mob.blaze.death";
  54.     }
  55.  
  56.     protected float getSoundVolume()
  57.     {
  58.         return 0.1F;
  59.     }
  60.  
  61.     public ItemStack getHeldItem()
  62.     {
  63.         return defaultHeldItem;
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement