ubc-minetest-classroom / minetest_classroom

Repo for Mintest Classroom game
GNU General Public License v3.0
10 stars 6 forks source link

Feature/schematic offset #135

Closed lukasgolson closed 2 years ago

lukasgolson commented 2 years ago

This PR adds a realm schematic config option to offset the placement of schematics. This has been used to fix the gap present in the MKRF maps.

Additionally, this PR fixes realms breaking when schematics are loaded into realms that are too small for the schematic; and exposes the realm clean method to command.

lukasgolson commented 2 years ago

Wall gaps in all of the MKRF schematics are fixed!

However, there are still some issues (primarily with the bottom y-layer of blocks) in some schematics:

  • MKRF_all: bottom layer is air blocks
  • MKRF_slope: bottom layer consists of unknown nodes - suspect the schematic may contain unregistered nodes beyond its borders that are being cropped out by the world borders, since realms made using this schematic use the black realm borders instead of the blue ones, and a blue border is present at the bottom of the realm area - we may want to mark the presence of these nodes as a different bug entirely, since it doesn't directly pertain to realm border placement
  • MKRF_aspect: Same issue as MKRF_slope, except nodes clip outside of the realm borders. Suspect this is due to #139, in which case #140 should fix it. Regardless, unknown node presence in the schematic may want to be looked into
  • MKRF_dtm: Same clipping issues as MKRF_aspect. However, the bottom layer of nodes is dirt (as expected)

Thanks for the review, I appreciate it. I think all these schematics can be cleaned by re-serializing the schematics using the realm system. I haven't had a chance to do it yet but I'll add it to the TODO list.

lukasgolson commented 2 years ago

As an update, I've fixed the space at the bottom of all the realms by offsetting it by -1.

I've also determined that the realm walls are in-fact replacing the outer most block of the realms as @Lowie375 has described. I've determined that this is intended behavior to fit the realm within map chunks and so that these slightly larger (by 1 block) schematics match the full composite schematic MKRF512_all.

If it's deemed that this is not how we'd like these particular schematics to behave, we just need to change each realms config file from: schematic_size_x = 512 andschematic_size_z = 512 to schematic_size_x = 513 and schematic_size_x = 513.