Skip to content

Commit

Permalink
Add frozen fungi and scarlet sanctuary biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rearth committed Sep 20, 2023
1 parent 395f9f0 commit e9db611
Show file tree
Hide file tree
Showing 26 changed files with 1,210 additions and 7 deletions.
2 changes: 1 addition & 1 deletion biome-distribution/presets/single.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
biomes:
type: SINGLE
biome: TUNDRA_TRACKS # The singular biome that will be used.
biome: SCARLET_SANCTUARY # The singular biome that will be used.
12 changes: 12 additions & 0 deletions biome-distribution/stages/add_rivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ stages:
SELF: 1
PLATEAO_RIVER_INNER: 1
sampler: *riverSampler
- type: REPLACE
from: USE_SCARLET_RIVER
to:
SELF: 1
SCARLET_SANCTUARY_RIVER: 1
sampler: *riverSampler
- type: REPLACE
from: USE_COLD_FUNGI_RIVER
to:
SELF: 1
FROZEN_FUNGI_RIVER: 1
sampler: *riverSampler
- type: REPLACE
from: USE_RIVER
to:
Expand Down
2 changes: 2 additions & 0 deletions biome-distribution/stages/fill_temperature_zones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ stages:
MOUNTAIN_MIRRORS: 2
ALPINE_ASCENDANCY: 1
TUNDRA_TRACKS: 2
FROZEN_FUNGI: 1
- type: REPLACE
from: medium
sampler:
Expand All @@ -34,6 +35,7 @@ stages:
SAKURA_STREAMS: 1
BAMBOO_BASIN: 2
BADLANDS_BALCONIES: 2
SCARLET_SANCTUARY: 2
_plateao: 1
# LAND_MEDIUM_A: 1
# LAND_MEDIUM_B: 1
Expand Down
64 changes: 64 additions & 0 deletions biomes/rearth/base/eq_tilted_plateau.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
id: EQ_TILTED_PLATEAU
type: BIOME
abstract: true

vars: &variables
base: 71
height: 10
cellDist: ${customization.yml:biomeSpread.cellDistance}

terrain:
sampler:
dimensions: 3
type: EXPRESSION
variables: *variables
expression: |
cliffify(-y + base + height * surfaceOffset(x,z)
+ (biomeTilt(x - 2, z - 2) + 0.5) * 55, -1)
+ (wallAddition(x,y,z) + 1) * 2
functions:
cliffify:
arguments: [x, border]
expression: |
if (x > border,
if (x > 6, max(0.06428571 + 1.2975*(x / 3 + 5) - 0.1223214*(x / 3 + 5)^2, 0.1), max(0.06428571 + 1.2975*x - 0.1223214*x^2, 0.1)),
x)
samplers:
wallAddition:
dimensions: 3
type: OPEN_SIMPLEX_2S
frequency: 0.09
biomeTilt:
dimensions: 2
type: DOMAIN_WARP
warp:
type: OPEN_SIMPLEX_2
frequency: 0.05
amplitude: 7
sampler:
dimensions: 2
type: CELLULAR
return: OffsetNoiseLookup
jitter: ${customization.yml:biomeSpread.cellJitter}
frequency: 1 / ${customization.yml:biomeSpread.cellDistance}
lookup:
dimensions: 2
type: EXPRESSION
variables: *variables
expression: |
x / cellDist + z / cellDist * 0.7
biomeDist:
dimensions: 2
type: CELLULAR
return: Distance
jitter: ${customization.yml:biomeSpread.cellJitter}
frequency: 1 / ${customization.yml:biomeSpread.cellDistance}
surfaceOffset:
dimensions: 2
type: FBM
sampler:
type: OPEN_SIMPLEX_2S
frequency: 0.006
octaves: 3
lacunarity: 2
gain: 0.5
69 changes: 69 additions & 0 deletions biomes/rearth/rivers/frozen_fungi_river.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
id: FROZEN_FUNGI_RIVER
type: BIOME
extends:
- MOUNTAIN_RIVER_FROZEN
- EQ_GLOBAL_RIVER
- FROZEN_FUNGI

original-noise: &originalNoise $biomes/rearth/base/eq_tilted_plateau.yml:terrain.sampler # Original noise to be turned into river

vars: &variables
ceilingHeight: 80 # Base Y level of the ceiling
ceilingVariation: 4 # How many blocks upwards ceiling height can vary
originalStrength: 1 # How much the original noise contributes to ceiling shape
ceilingSpikeVar: 18 # How many blocks down ceiling spikes will go

floorHeight: 42 # Base Y level of the floor
floorVariation: 0 # How many blocks* upwards floor height can vary
floorSpikeBias: 1 # How biased spikes are to going up or down, greater = more upwards
floorStrength: 0.5 # Strength of negation above the floor, used for carving adjacent biomes
floorSpikeVar: 18 # How many blocks* upwards spikes will come up from the floor
# * Gets factored by floorStrength

terrain:
sampler:
type: EXPRESSION
dimensions: 3
expression: |
if(y > ceilingHeight + ceilingVariation, parentEq(x, y, z), // If y above carved area, use parent eq
if(y < floorHeight, bottomEq(x, y, z), // If y below carved area, use bottom eq
max(parentEq(x, y, z) - topEq(x, y, z), bottomEq(x, y, z)) // Otherwise combine top and bottom together
) // This ensures no unnecessary calculations
) // and saves some performance
variables: *variables
samplers:
parentEq: *originalNoise
topEq: # Top half of river - includes original terrain
type: EXPRESSION
dimensions: 3
expression: if(ceilingEq(x, y, z) > 0, (ceilingEq(x, y, z)^2)*(1/originalStrength), 0)
variables: *variables
samplers:
ceilingEq: # Controls the shape of the ceiling
type: EXPRESSION
dimensions: 3
expression: -y + ceilingHeight + (noise(x, z)+1)/2 * ceilingVariation
variables: *variables
samplers:
noise:
dimensions: 2
type: OPEN_SIMPLEX_2
spikes: &spikes
dimensions: 2
type: LINEAR
min: -1
max: 0.2
sampler:
type: CELLULAR
frequency: 0.08
bottomEq: # Bottom half of river - makes up the river bed
type: EXPRESSION
dimensions: 3
expression: -y + floorHeight - if(y > floorHeight,floorStrength*(-(-y + floorHeight))^2,0) + (noise(x, z)+1)/2 * floorVariation
variables: *variables
samplers:
noise:
dimensions: 2
type: OPEN_SIMPLEX_2
frequency: 0.03
spikes: *spikes # Use same noise from ceiling spikes
69 changes: 69 additions & 0 deletions biomes/rearth/rivers/scarlet_sactuary_river.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
id: SCARLET_SANCTUARY_RIVER
type: BIOME
extends:
- RIVER
- EQ_GLOBAL_RIVER
- SCARLET_SANCTUARY

original-noise: &originalNoise $biomes/rearth/base/eq_tilted_plateau.yml:terrain.sampler # Original noise to be turned into river

vars: &variables
ceilingHeight: 80 # Base Y level of the ceiling
ceilingVariation: 4 # How many blocks upwards ceiling height can vary
originalStrength: 1 # How much the original noise contributes to ceiling shape
ceilingSpikeVar: 18 # How many blocks down ceiling spikes will go

floorHeight: 42 # Base Y level of the floor
floorVariation: 0 # How many blocks* upwards floor height can vary
floorSpikeBias: 1 # How biased spikes are to going up or down, greater = more upwards
floorStrength: 0.5 # Strength of negation above the floor, used for carving adjacent biomes
floorSpikeVar: 18 # How many blocks* upwards spikes will come up from the floor
# * Gets factored by floorStrength

terrain:
sampler:
type: EXPRESSION
dimensions: 3
expression: |
if(y > ceilingHeight + ceilingVariation, parentEq(x, y, z), // If y above carved area, use parent eq
if(y < floorHeight, bottomEq(x, y, z), // If y below carved area, use bottom eq
max(parentEq(x, y, z) - topEq(x, y, z), bottomEq(x, y, z)) // Otherwise combine top and bottom together
) // This ensures no unnecessary calculations
) // and saves some performance
variables: *variables
samplers:
parentEq: *originalNoise
topEq: # Top half of river - includes original terrain
type: EXPRESSION
dimensions: 3
expression: if(ceilingEq(x, y, z) > 0, (ceilingEq(x, y, z)^2)*(1/originalStrength), 0)
variables: *variables
samplers:
ceilingEq: # Controls the shape of the ceiling
type: EXPRESSION
dimensions: 3
expression: -y + ceilingHeight + (noise(x, z)+1)/2 * ceilingVariation
variables: *variables
samplers:
noise:
dimensions: 2
type: OPEN_SIMPLEX_2
spikes: &spikes
dimensions: 2
type: LINEAR
min: -1
max: 0.2
sampler:
type: CELLULAR
frequency: 0.08
bottomEq: # Bottom half of river - makes up the river bed
type: EXPRESSION
dimensions: 3
expression: -y + floorHeight - if(y > floorHeight,floorStrength*(-(-y + floorHeight))^2,0) + (noise(x, z)+1)/2 * floorVariation
variables: *variables
samplers:
noise:
dimensions: 2
type: OPEN_SIMPLEX_2
frequency: 0.03
spikes: *spikes # Use same noise from ceiling spikes
49 changes: 49 additions & 0 deletions biomes/rearth/variants/frozen_fungi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
id: FROZEN_FUNGI
type: BIOME
vanilla: minecraft:mushroom_fields
extends: [ EQ_TILTED_PLATEAU, CARVING_LAND, BASE ]
color: $biomes/colors.yml:MUSHROOM_HILLS

tags:
- USE_COLD_FUNGI_RIVER

colors:
foliage: 0xa6e2ed
grass: 0x2AB2C7
water: 0xA298E4
water-fog: 0x50533

palette:
- SHROOM_SNOW_MIX: 319
- MUDDY_BEACH: 63
- << meta.yml:palette-bottom

features:
preprocessors:
- POWDER_SNOW_DEPOSITS
slabs:
- SNOW_LAYERS
trees:
- COLD_FUNGI
flora:
- SMALL_MUSHROOMS
landforms:
- MOSSY_BOULDERS
# - GIANT_BOULDERS
# flora:
# - GRASS
# - TALL_GRASS
# - CROSSING_STONE_VINES
# - LARGE_LEAF_VINES_UNCOLORED
# - TREE_VINES
# - POPPY_PATCH
# - FERNS
# - DANDELION_PATCH
# - SMALL_DRIPLEAF
# - BIG_DRIPLEAF
# - SMALL_MUSHROOMS
# trees:
# - DEAD_SWAMP_TREES
# - DEAD_TREES_SPARSE
# - LUSH_FOREST_TREES
# - LARGE_MUSHROOMS
41 changes: 41 additions & 0 deletions biomes/rearth/variants/scarlet_sanctuary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
id: SCARLET_SANCTUARY
type: BIOME
vanilla: minecraft:forest
extends: [ EQ_TILTED_PLATEAU, CARVING_LAND, BASE ]
color: $biomes/colors.yml:BAMBOO_JUNGLE

tags:
- USE_SCARLET_RIVER

colors:
foliage: 0xEC5448
grass: 0x599c2c
water: 0x5DB7EF
water-fog: 0x14a2c5

palette:
- GRASS_DENSE_MOSSY: 319
- MUDDY_BEACH: 63
- << meta.yml:palette-bottom


features:
landforms:
- GIANT_BOULDERS
flora:
- GRASS
- TALL_GRASS
- CROSSING_STONE_VINES
- LARGE_LEAF_VINES_UNCOLORED
- TREE_VINES
- POPPY_PATCH
- FERNS
- DANDELION_PATCH
- SMALL_DRIPLEAF
- BIG_DRIPLEAF
- SMALL_MUSHROOMS
trees:
- DEAD_SWAMP_TREES
- DEAD_TREES_SPARSE
- LUSH_FOREST_TREES
- LARGE_MUSHROOMS
43 changes: 43 additions & 0 deletions features/rearth/giant_boulders.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
id: GIANT_BOULDERS
type: FEATURE

distributor:
type: AND
distributors:
- type: PADDED_GRID
width: 15
padding: 5
salt: 1923
- type: SAMPLER
sampler:
type: PROBABILITY
sampler:
type: OPEN_SIMPLEX_2
salt: 3119
frequency: 0.06
threshold: 0.15

locator:
type: AND
locators:
- type: SURFACE
range: &range
min: ${meta.yml:ocean-level} + 5
max: $meta.yml:top-y
- type: PATTERN
range: *range
pattern:
type: MATCH_SET
blocks: $features/vegetation/meta.yml:plantable-blocks
offset: -1
- type: ADJACENT_PATTERN
range: *range
match-all: true
pattern:
type: MATCH_AIR
offset: 0

structures:
distribution:
type: CONSTANT
structures: big_boulder
Loading

0 comments on commit e9db611

Please sign in to comment.