Guest User

Meteor Zombie

a guest
Jan 15th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.80 KB | None | 0 0
  1. public class EntityMeteorZombie extends EntityZombie {
  2.  
  3.     public EntityMeteorZombie(World world, double x, double y, double z) {
  4.         super(world);
  5.         // Entity Position Configuration
  6.         this.posX = x;
  7.         this.posY = y;
  8.         this.posZ = z;
  9.         // Entity Characteristics Configuration
  10.         this.isImmuneToFire = true;
  11.         this.setCurrentItemOrArmor(1, new ItemStack(Items.iron_helmet));
  12.         this.setCurrentItemOrArmor(3, new ItemStack(Items.iron_leggings));
  13.         // Entity Task Configuration
  14.         this.getNavigator().setBreakDoors(true);
  15.         this.tasks.addTask(0, new EntityAISwimming(this));
  16.         this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
  17.         this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true));
  18.         this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityCreature.class, 1.0D, true));
  19.         this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
  20.         this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
  21.         this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
  22.         this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  23.         this.tasks.addTask(8, new EntityAILookIdle(this));
  24.         // Entity Target Configuration
  25.         this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
  26.         this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
  27.         this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false));
  28.         this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityCreature.class, 0, false));
  29.         // TODO Auto-generated constructor stub
  30.     }
  31.  
  32.     protected void applyEntityAttributes()
  33.     {
  34.         super.applyEntityAttributes();
  35.         this.getEntityAttribute(field_110186_bp).setBaseValue(0.0D);
  36.         this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.75D);
  37.         this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6.0D);
  38.     }
  39.    
  40.     public boolean doesEntityNotTriggerPressurePlate()
  41.     {
  42.         // Using StealthCorePlus, these guys are not permitted to be discovered!!!
  43.         return true;
  44.     }
  45.    
  46.     protected void dropFewItems(boolean p_70628_1_, int additional)
  47.     {
  48.         int j = this.rand.nextInt(2 + additional);
  49.         int count;
  50.  
  51.         for (count = 0; count < j; count++)
  52.         {
  53.             this.dropItem(Items.rotten_flesh, 1);
  54.         }
  55.  
  56.         j = this.rand.nextInt(2 + additional);
  57.  
  58.         for (count = 0; count < j; count++)
  59.         {
  60.             this.dropItem(Items.gold_nugget, 1);
  61.         }
  62.     }
  63.    
  64.     /*public void onKillEntity(EntityLivingBase p_70074_1_) {
  65.         // Should make some havoc from here
  66.     }*/
  67. }
Advertisement
Add Comment
Please, Sign In to add comment