SHARE
TWEET

Untitled

a guest May 19th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.Nick.Nickcraft.entity;
  2.  
  3. import com.Nick.Nickcraft.util.handlers.SoundsHandler;
  4.  
  5. import net.minecraft.entity.ai.EntityAIHurtByTarget;
  6. import net.minecraft.entity.ai.EntityAILookIdle;
  7. import net.minecraft.entity.ai.EntityAIMoveThroughVillage;
  8. import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
  9. import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
  10. import net.minecraft.entity.ai.EntityAISwimming;
  11. import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
  12. import net.minecraft.entity.ai.EntityAIWatchClosest;
  13. import net.minecraft.entity.ai.EntityAIZombieAttack;
  14. import net.minecraft.entity.monster.EntityIronGolem;
  15. import net.minecraft.entity.monster.EntityMob;
  16. import net.minecraft.entity.monster.EntityPigZombie;
  17. import net.minecraft.entity.monster.EntityZombie;
  18. import net.minecraft.entity.passive.EntityVillager;
  19. import net.minecraft.entity.player.EntityPlayer;
  20. import net.minecraft.util.DamageSource;
  21. import net.minecraft.util.SoundEvent;
  22. import net.minecraft.world.World;
  23.  
  24. public class EntityReaper extends EntityMob {
  25.  
  26.     public EntityReaper(World worldIn)
  27.     {
  28.         super(worldIn);
  29.         this.setSize(0.6F, 1.95F);
  30.         }
  31.    
  32.     protected void initEntityAI()
  33.     {
  34.         this.tasks.addTask(0, new EntityAISwimming(this));
  35.         this.tasks.addTask(2, new EntityAIZombieAttack(this, 1.0D, false));
  36.         this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
  37.         this.tasks.addTask(7, new EntityAIWanderAvoidWater(this, 1.0D));
  38.         this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  39.         this.tasks.addTask(8, new EntityAILookIdle(this));
  40.         this.applyEntityAI();
  41.     }
  42.  
  43.     protected void applyEntityAI()
  44.     {
  45.         this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));
  46.         this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
  47.         this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityZombie.class, true));
  48.     }
  49.  
  50.     @Override
  51.     protected SoundEvent getAmbientSound() {
  52.  
  53.         return SoundsHandler.ENTITY_REAPER_AMBIENT;
  54.     }
  55.  
  56.     @Override
  57.     protected SoundEvent getHurtSound(DamageSource source) {
  58.  
  59.         return SoundsHandler.ENTITY_REAPER_HURT;
  60.     }
  61.  
  62.     @Override
  63.     protected SoundEvent getDeathSound() {
  64.  
  65.         return SoundsHandler.ENTITY_REAPER_DEATH;
  66.     }
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top