I guess it makes no sense to call `setCornerTerrain` with `terrainID` being -1, so you could invert the `if` condition and only call `setCornerTerrain` if it's true.