Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Feature: Absolute Y Checks and/or IndicatedOre()

WACriminalG2 opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.

It could be useful for some types of worldgen if we were able to reference precise Y ranges, while still utilizing variable spawn heights like HighestSolidBlock. An example would be checking for an ore vein at Y=15, or checking the air for a floating island at Y=230.

Describe the solution you'd like

A few possible utilities were mentioned in a brief discussion on the Discord:

  1. IndicatedOre() -- A resource which is similar to Ore(), but includes a parameter IndicatorBlock, a block ID to be generated above the next surface block above the spawned ore cluster.

  2. AbsoluteBlockCheck() -- A block check to be used in BO3s that functions identically to the regular BlockCheck(), except that it utilizes an absolute Y coordinate instead of a relative one. The X and Z coordinates remain relative. This would allow for more complex generation similar to option 1, such as spawning an entire building, monument, or village above a buried oil reservoir.

  3. AbsoluteBlock() -- Similar logic, but coming at it from the other direction. Developers could set the BO3's center to match the target ore vein's Y height, but then use AbsoluteBlock() to do something like spawning a floating island at a specific Y level. I guess the presence of this option could also imply AbsoluteRandomBlock(), but that's putting the cart before the horse.

Describe alternatives you've considered

Using other mods to create ore indicators in OTG worlds, though this potentially introduces issues of compatibility and control granularity.

Description aka Additional context

None

commented

BlockCheckAbsolute and BlockCheckAbsoluteNot have been implemented for 0.1.
It only took me 5 minutes so why not.

Edit: Reverted until we can think the feature through a bit more.