Example #1
0
 /** Called when a lightning bolt hits the entity. */
 public void onStruckByLightning(EntityLightningBolt par1EntityLightningBolt) {
   if (!this.worldObj.isRemote) {
     EntityPigZombie var2 = new EntityPigZombie(this.worldObj);
     var2.setLocationAndAngles(
         this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
     this.worldObj.spawnEntityInWorld(var2);
     this.setDead();
   }
 }
  public boolean func_396_a(DamageSource damagesource, int i) {
    Entity entity = damagesource.func_35532_a();
    if (entity instanceof EntityPlayer) {
      List list = field_615_ag.func_659_b(this, field_601_au.func_1177_b(32D, 32D, 32D));
      for (int j = 0; j < list.size(); j++) {
        Entity entity1 = (Entity) list.get(j);
        if (entity1 instanceof EntityPigZombie) {
          EntityPigZombie entitypigzombie = (EntityPigZombie) entity1;
          entitypigzombie.func_4049_h(entity);
        }
      }

      func_4049_h(entity);
    }
    return super.func_396_a(damagesource, i);
  }