Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[Ruins] fix leveling issues (fixes #192) #202
Although Insane-96's issue #192 was closed as a presumed problem with templates, it actually points to some real problems related to leveling. Various functions throughout the mod disagreed as to whether the proposed Y-coordinate of a spawning site represented the base of the structure or the surface on which it was going to spawn (i.e., one block lower); as a result, structures occasionally spawned one block higher than they should. The leveling algorithm was not necessarily able to recover the surface fill block it needed after the Y-coordinate was massaged by checkArea(). The alternate nether Y-finding algorithm was outright broken. Blocks saved for the /undo function didn't account for leveling changes below the structure.
With these changes, I don't see structures "spawn in midair" any more (aside from the ones that are supposed to, of course). Leveling looks better all around, and /undo works. I didn't have to change any of the template files to fix the problems I saw.