sbrl / Minetest-WorldEditAdditions

Extra tools and commands to extend WorldEdit for Minetest
https://worldeditadditions.mooncarrot.space/
Mozilla Public License 2.0
16 stars 3 forks source link

//dripdown #82

Open VorTechnix opened 1 year ago

VorTechnix commented 1 year ago

Builds down low pointing parts of selection (generates stalactites and floating island "tails").

sbrl commented 1 year ago

Ah, great idea!

So for each block with an air space below it, it will be randomly repeated downwardss by a random value between a minimum and maximum value (perhaps we could model this in the actual command as a value and a jitter - e.g. //dripdown <node_name> <value> [<jitter>]

....where <value> is the amount to drag it down by, and <jitter> is a number to generate and add/subtract to it. In JS:

const actual_value = value + Math.floor((Math.random() * jitter * 2) - jitter);

To make it useful for generating floating islands, I guess you'd do something like this:

  1. Generate upside-down cone
  2. Run //dropdown?

....or would we need some logic for determining a secondary value that varies, e.g. adding random noise like this?

const actual_value = value + Math.floor((Math.random() * jitter * 2) - jitter) + noise(x, y) * value_2;