The maximum slope you can build on is:
for wooden fences or palisades.
for stone walls or tall walls.
The maximum slope you can dig on is 0.