View difference between Paste ID: rv73qZxH and T3jezd8T
SHOW: | | - or go back to the newest paste.
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
	protected boolean isAIEnabled()
17
    {
18
        return true;
19
    }
20
21
	public EntityChevalier(World par1World) {
22
		super(par1World);
23
		
24
		this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0.4D, false));
25
		this.targetTasks.addTask(7, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
26
	}
27
	
28
	
29
	  protected void applyEntityAttributes()
30
	    {
31
	        super.applyEntityAttributes();
32
	        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(200D);
33
	        this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(15.0D);
34
	        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.69);
35
	        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(5);
36
37
38
	    }
39
	  protected String getLivingSound()
40
	    {
41
	        return "mob.blaze.breathe";
42
	    }
43
44
	 protected String getHurtSound()
45
	    {
46
	        return "mob.blaze.hit";
47
	    }
48
49
	 
50
	    protected String getDeathSound()
51
	    {
52
	        return "mob.blaze.death";
53
	    }
54
55
56
57
	  protected float getSoundVolume()
58
	    {
59
	        return 0.1F;
60
	    }
61
	  
62-
	  private static final ItemStack defaultHeldItem;
62+
63-
		public ItemStack getHeldItem()
63+
64
	this.setCurrentItemOrAmor(0, new ItemStack(modendercraftmain.EDG);
65-
	        return defaultHeldItem;
65+
66-
	        
66+
67
	  
68
}