Magic‎ > ‎Spells (Paizo)‎ > ‎M‎ > ‎

Mage's Magnificent Mansion

School conjuration (creation); Level sorcerer/wizard 7

CASTING

Casting Time 1 standard action
Components V, S, F (a miniature ivory door, a piece of polished marble, and a silver spoon, each worth 5 gp)

EFFECT

Range close (25 ft. + 5 ft./2 levels)
Effect extra-dimensional mansion, up to three 10-ft. cubes/level (S)
Duration 2 hours/level (D)
Saving Throw none; Spell Resistance no

By the way...
The entrance to the extradimensional space created by this spell does not move with a ship.

Source Skull & Shackles Player's Guide