Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

[Feature] DISTANCE sampler

astrsh opened this issue ยท 1 comments

commented

Pre-Request Checklist

  • I have checked that I am on the latest version of Terra.
  • I have searched github for similar features requests, including closed
    ones, and found none.
  • I believe this is within the scope of Terra.
  • This feature request is for all of Terra, and isn't something that
    should be implemented by a pack or addon.

Feature Description

New sampler type that returns the distance from the specified coordinates.

What Problem Does This Solve?

User Ark#0069 on discord was requesting a way to generate a singular volcano within biome distribution - this is possible via
expression samplers by writing the math by hand - however this approach was less accessible, especially for those not as versed in Terra configuration.

A distance sampler would allow for easily placing things like a singular volcano, or singular island, etc while not requiring much math
to be written.

A Solution You'd Like

type: DISTANCE
center:
  x: 300 # Translates x coordinates
  #y: 32 #  Translates y coordinates, only for 3D
  z: 750 # Translates z coordinates

return: DistanceNormalized
  # How the distance should be distributed
  #
  # DistanceNormalized (Default) = Linearly redistribute distance radius.inner & radius.outer to -1 and 1 respectively
  #                                                     Technically could be done with LINEAR type, but this is a training-wheel sampler
  # Distance = raw distance from center

radius: # Only relevant for return=DistanceNormalized
  inner: 30 # Optional, defaults to 0
  outer: 500 # Not optional
commented

Implemented in 02198e1, slated for 6.4.0