Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- {
- private final ItemStack defaultHeldItem = new ItemStack(modendercraftmain.EDG, 1);
- protected boolean isAIEnabled()
- {
- return true;
- }
- public EntityChevalier(World world)
- {
- super(world);
- 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;
- }
- public ItemStack getHeldItem()
- {
- return defaultHeldItem;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement