The code above should work. But if your game is a grid of 2d blocks you should be storing references to them in a 2d array.
var blockArray : GameObject[,];
If the array coords correspond to 1 unit blocks in world space, you can do this :
var extIntX : int = Mathf.FloorToInt (Extractor.transform.position.x);
var extIntZ : int = Mathf.FloorToInt (Extractor.transform.position.z);
var canExtract : boolean = false;
if (blockArray [extIntX-1, extIntZ].tag = "Resource") { canExtract = true;}
if (blockArray [extIntX+1, extIntZ].tag = "Resource") { canExtract = true;}
if (blockArray [extIntX, extIntZ-1].tag = "Resource") { canExtract = true;}
if (blockArray [extIntX, extIntZ+1].tag = "Resource") { canExtract = true;}
if (canExtract) {
Debug.Log ("Extract");
}
Not fully working as is, you have to set it up in functions and initialize stuff, as well as check to avoid ArrayIndexOutOfRangeExceptions when you’re at the edges- but that should give you the general idea.