Where do The Goblin Army and the Pirates spawn?
When you first summon the Pirate or Goblin invasion, the message appears saying:
The Goblin Army/Pirates are approaching from the East/West!
The initial wave of enemies enter from the edge of the world, the direction is specified in the message. These enemies will then begin to move towards the middle of the world.
When the following message appears:
The Goblin Army/Pirates have arrived!
This means that enemies will begin spawning in the middle of the world.
Hence, only the initial wave of Goblins/Pirates spawn away from the centre of the map, the rest of them spawn in the centre of the world only.
Wiki pages for reference:
- Pirate Invasion
- Goblin Army