ubc-minetest-classroom / minetest_classroom

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

Overhanging decorations on terrain generation #139

Closed pauldpickell closed 2 years ago

pauldpickell commented 2 years ago

Describe the bug Generate some terrain with decorations that occur at edge of realm and they can go beyond the limits of the realm.

To Reproduce Steps to reproduce the behavior:

  1. Create new realm with /realm new
  2. Teleport to new realm with /realm tp 2
  3. Generate some terrain with /realm gen 2 v2 v2 10 123
  4. Bam! Tree canopy outside of the realm boundaries.

Expected behavior Decorations and other nodes should always be contained within the realm boundaries to avoid unexpected behaviour, glitching, etc. If we decide that decorations are allowed to overhang, then we still need a method to clean them up when /realm gen is run again on the same realm. It will be very convenient to be able to re-run the terrain/forest generator on the same realm until a desired state is obtained.

Screenshots image

Desktop (please complete the following information):

lukasgolson commented 2 years ago

I'll look into removing all blocks on the outside of the realm when building walls.

pauldpickell commented 2 years ago

Can we also add a method to display the seed for the last terrain generation like what currently exists for /realm seed or just output it to chat when the terrain is generated without an input seed?

lukasgolson commented 2 years ago

Can we also add a method to display the seed for the last terrain generation like what currently exists for /realm seed or just output it to chat when the terrain is generated without an input seed?

This is a quick addition, I'll add it in with the fix for the overhang.