mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Let every number that shapes a cave vary across the world
A cave value is a plain number, {min, max} that a smooth noise picks
from, or {min, max, style} where the pack's style picks. The noise's low
end gives min and its high end max. A plain number keeps the constant
path, and the carver checks for constants so they cost no more than
before. Each varying value has its own seed, named after its key, so
writing a range leaves every other field of the cave where it was.
The form covers fade, surfaceClearance and both ends of depth on the
cave; width, height, the coverage share and verticalWarp on tunnels;
size, height, coverage and roughness on caverns; spacing, thickness,
flare and vertical on pillars. Three constants become keys with
defaults that carve what they did: ceilingFade (8 blocks),
verticalWarp (0.5) and the coverage softness (0.3, an edge of 0.15).
Roughness (0.3) replaces the fixed wall detail. Tunnel coverage also
takes a plain number as the share.
Sizes do not stretch the noise, which sheared rooms into air pockets
and floating rock. A size or height that varies blends a field built at
min with one built at max, so each varying size doubles the fields read.
With size, height or roughness varying the coverage share is
approximate: a size range carves about 14% more than its ends average.
JsonForms codecs get Parts, which read a part of a form as the host
reads that type anywhere else. A cave value's style can then name a
pack's expression. A cave value is not a number to the host's bounds
check, so a validator reports values outside their key's range.
natureplanet's four cave files carve block for block what they carved
before, and the first pass's five pinned caves still match.
This commit is contained in:
1 parent
5695cf053e
commit
8e19a7ed63
26 files changed
+2028
-238
No files matched your search
+3
-1
@@ -919,7 +919,9 @@ Every settings class, value type and pack resource kind is read the same way, by
|
||||
- A class annotated `@JsonForms(Codec.class)` is the one exception: a value packs write in several shapes, such as a
|
||||
number, a `[min, max]` range or a curve object. The host reads its JSON as plain values (maps, lists, `Double`s,
|
||||
strings, booleans), hands them to the codec, and writes the value back through it. It never creates the class or
|
||||
reads its fields, and studio describes it as any JSON value.
|
||||
reads its fields, and studio describes it as any JSON value. A form may hold a part of another type, such as a
|
||||
`NoiseStyle`; the codec reads it with the `Parts` the host hands it, so the part reads as that type does anywhere
|
||||
else, a pack's expression included.
|
||||
- A member the JSON leaves out keeps the field's initialiser. A member written as `null` counts as left out.
|
||||
- The host never writes `null` into a field. An enum name the enum does not know is an error that lists the known
|
||||
names; it does not become `null` or the default.
|
||||
|
||||
Reference in new issue
Block a user