Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package mod.ElementalWorld;
- import net.minecraft.src.Entity;
- import net.minecraft.src.EntityAIAttackOnCollide;
- import net.minecraft.src.EntityAIHurtByTarget;
- import net.minecraft.src.EntityAINearestAttackableTarget;
- import net.minecraft.src.EntityAISwimming;
- import net.minecraft.src.EntityAIWander;
- import net.minecraft.src.EntityAIWatchClosest;
- import net.minecraft.src.EntityMob;
- import net.minecraft.src.EntityPlayer;
- import net.minecraft.src.EnumCreatureAttribute;
- import net.minecraft.src.Item;
- import net.minecraft.src.ItemStack;
- import net.minecraft.src.World;
- public class EntityDragonKnight extends EntityMob
- {
- public EntityDragonKnight(World par1World)
- {
- super(par1World);
- this.texture = "/textures/Dragon Knight.png";
- this.moveSpeed = 0.25F;
- this.tasks.addTask(0, new EntityAISwimming(this));
- this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
- this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
- this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
- this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
- this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
- this.canPickUpLoot = true;
- this.setCurrentItemOrArmor(0, new ItemStack(Item.swordSteel));
- }
- public EnumCreatureAttribute getCreatureAttribute()
- {
- return EnumCreatureAttribute.UNDEFINED;
- }
- public int getAttackStrength(Entity par1Entity)
- {
- return 10;
- }
- protected boolean isAIEnabled()
- {
- return true;
- }
- public int getTotalArmorValue()
- {
- return 16;
- }
- protected String getLivingSound()
- {
- return "mob.zombie.say";
- }
- protected String getHurtSound()
- {
- return "mob.zombie.hurt";
- }
- protected String getDeathSound()
- {
- return "mob.zombie.death";
- }
- protected void playStepSound(int par1, int par2, int par3, int par4)
- {
- this.worldObj.playSoundAtEntity(this, "mob.zombie.step", 0.15F, 1.0F);
- }
- protected int getDropItemId()
- {
- return ElementalWorld.magicEco.shiftedIndex;
- }
- protected void dropRareDrop(int par1)
- {
- switch (this.rand.nextInt(2))
- {
- case 0:
- this.dropItem(Item.ingotIron.shiftedIndex, 1);
- break;
- case 1:
- this.dropItem(Item.helmetSteel.shiftedIndex, 1);
- break;
- }
- }
- public void initCreature()
- {
- this.canPickUpLoot = true;
- this.setCurrentItemOrArmor(0, new ItemStack(Item.swordSteel));
- }
- public int getMaxHealth()
- {
- return 20;
- }
- public String getTexture()
- {
- return "/textures/ElementalWorld/Dragon Knight.png";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement