fixed crash when painting outside terrain - fixes #278; entity is properly positioned even on terrains not in (0, 0, 0) when painting