Terasology is open source and our code is hosted at https://github.com/MovingBlocks/Terasology
For an initial guide to get set up to run from source on your computer see our Dev Setup page in our GitHub wiki.