From f5ad5f091c1bcd1bedbe3a7b92b3c19731a258ad Mon Sep 17 00:00:00 2001 From: Pyritie Date: Wed, 15 Oct 2025 20:16:10 +0100 Subject: [PATCH] feature/europa-noise (#2038) * committing here because I made something cool and I don't want to lose it * adjusted height * better * good enough * good enough for now --- .../ad_astra/planet_renderers/glacio.json | 56 + kubejs/data/ad_astra/dimension/glacio.json | 83 + kubejs/data/ad_astra/planets/glacio.json | 13 + .../data/ad_astra/planets/glacio_orbit.json | 9 + kubejs/data/tfg/dimension_type/glacio.json | 25 + kubejs/data/tfg/dimension_type/mars.json | 2 +- kubejs/data/tfg/dimension_type/mercury.json | 10 +- kubejs/data/tfg/dimension_type/venus.json | 2 +- .../biome/glacio/placeholder_biome.json | 86 + .../glacio/base_3d_noise.json | 8 + .../glacio/caves/entrances.json | 83 + .../density_function/glacio/caves/noodle.json | 94 + .../glacio/caves/pillars.json | 50 + .../glacio/caves/spaghetti_2d.json | 61 + .../spaghetti_2d_thickness_modulator.json | 17 + .../caves/spaghetti_roughness_function.json | 33 + .../density_function/glacio/continents.json | 12 + .../density_function/glacio/depth.json | 82 + .../density_function/glacio/erosion.json | 12 + .../density_function/glacio/factor.json | 190 ++ .../density_function/glacio/jaggedness.json | 303 ++++ .../density_function/glacio/offset.json | 1523 +++++++++++++++++ .../density_function/glacio/ridges.json | 12 + .../glacio/ridges_folded.json | 19 + .../glacio/sloped_cheese.json | 28 + .../worldgen/noise_settings/glacio_noise.json | 194 +++ .../worldgen/noise_settings/mars_noise.json | 4 +- kubejs/server_scripts/ad_astra/tags.js | 7 +- kubejs/server_scripts/tfg/events.chunks.js | 67 +- .../startup_scripts/tfg/register_climates.js | 2 + 30 files changed, 3056 insertions(+), 31 deletions(-) create mode 100644 kubejs/assets/ad_astra/planet_renderers/glacio.json create mode 100644 kubejs/data/ad_astra/dimension/glacio.json create mode 100644 kubejs/data/ad_astra/planets/glacio.json create mode 100644 kubejs/data/ad_astra/planets/glacio_orbit.json create mode 100644 kubejs/data/tfg/dimension_type/glacio.json create mode 100644 kubejs/data/tfg/worldgen/biome/glacio/placeholder_biome.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/base_3d_noise.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/entrances.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/noodle.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/pillars.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d_thickness_modulator.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_roughness_function.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/continents.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/depth.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/erosion.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/factor.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/jaggedness.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/offset.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/ridges.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/ridges_folded.json create mode 100644 kubejs/data/tfg/worldgen/density_function/glacio/sloped_cheese.json create mode 100644 kubejs/data/tfg/worldgen/noise_settings/glacio_noise.json diff --git a/kubejs/assets/ad_astra/planet_renderers/glacio.json b/kubejs/assets/ad_astra/planet_renderers/glacio.json new file mode 100644 index 000000000..df2d68db3 --- /dev/null +++ b/kubejs/assets/ad_astra/planet_renderers/glacio.json @@ -0,0 +1,56 @@ +{ + "custom_clouds": true, + "custom_sky": true, + "custom_weather": false, + "dimension": "ad_astra:glacio", + "has_fog": true, + "has_thick_fog": false, + "render_in_rain": false, + "sky_renderables": [ + { + "back_light_color": -39, + "back_light_scale": 27.0, + "blend": true, + "global_rotation": [ + 0.0, + 0.0, + 0.0 + ], + "local_rotation": [ + 0.0, + 0.0, + 0.0 + ], + "movement_type": "TIME_OF_DAY", + "scale": 9.0, + "texture": "ad_astra:textures/environment/sun.png" + }, + { + "back_light_color": -6861640, + "back_light_scale": 150.0, + "blend": false, + "global_rotation": [ + 60.0, + 0.0, + 5.0 + ], + "local_rotation": [ + 0.0, + 0.0, + -5.0 + ], + "movement_type": "STATIC", + "scale": 50.0, + "texture": "ad_astra:textures/environment/vicinus.png" + } + ], + "star_colors": [ + { + "data": -1, + "weight": 1 + } + ], + "stars": 1500, + "sunrise_angle": 0, + "sunrise_color": 14180147 +} \ No newline at end of file diff --git a/kubejs/data/ad_astra/dimension/glacio.json b/kubejs/data/ad_astra/dimension/glacio.json new file mode 100644 index 000000000..b0102f6da --- /dev/null +++ b/kubejs/data/ad_astra/dimension/glacio.json @@ -0,0 +1,83 @@ +{ + "type": "ad_astra:glacio", + "generator": { + "type": "kubejs_tfc:wrapped", + "event_key": "glacio", + "settings": { + "flat_bedrock": false, + "spawn_distance": 0, + "spawn_center_x": 0, + "spawn_center_z": 0, + "temperature_scale": 2500, + "rainfall_scale": 2500, + "continentalness": -0.5, + "rock_layer_settings": { + "rocks": { + "glacio": { + "raw": "ad_astra:glacio_stone", + "hardened": "tfg:rock/hardened_glacio_stone", + "gravel": "tfg:rock/gravel_glacio", + "cobble": "ad_astra:glacio_cobblestone", + "sand": "tfc:sand/white", + "sandstone": "tfc:raw_sandstone/white", + "spike": "tfg:spike/glacio_stone_spike", + "mossy": "tfg:rock/mossy_cobble_glacio", + "loose": "tfg:loose/glacio_stone" + }, + "gabbro": "tfc:gabbro" + }, + "layers": [ + { + "id": "middle", + "layers": { + "glacio": "bottom", + "gabbro": "bottom" + } + }, + { + "id": "top", + "layers": { + "glacio": "middle" + } + } + ], + "bottom": [ + "gabbro" + ], + "ocean_floor": [ + "top" + ], + "volcanic": [ + "top" + ], + "land": [ + "top" + ], + "uplift": [ + "top" + ] + } + }, + "generator": { + "type": "minecraft:noise", + "settings": "tfg:glacio_noise", + "biome_source": { + "type": "minecraft:multi_noise", + "biomes": [ + { + "biome": "tfg:glacio/placeholder_biome", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": 0, + "erosion": 0, + "weirdness": 0, + "depth": 0, + "offset": 0 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/ad_astra/planets/glacio.json b/kubejs/data/ad_astra/planets/glacio.json new file mode 100644 index 000000000..25d87ff3e --- /dev/null +++ b/kubejs/data/ad_astra/planets/glacio.json @@ -0,0 +1,13 @@ +{ + "dimension": "ad_astra:glacio", + "gravity": 3.721, + "orbit": "ad_astra:glacio_orbit", + "oxygen": false, + "solar_power": 16, + "solar_system": "ad_astra:solar_system", + "tier": 4, + + "__TODO": "Figure out how to make surface water freeze but below-surface water stay liquid" + "temperature": 10, + "__temperature": -190 +} \ No newline at end of file diff --git a/kubejs/data/ad_astra/planets/glacio_orbit.json b/kubejs/data/ad_astra/planets/glacio_orbit.json new file mode 100644 index 000000000..3d6c1a088 --- /dev/null +++ b/kubejs/data/ad_astra/planets/glacio_orbit.json @@ -0,0 +1,9 @@ +{ + "dimension": "ad_astra:earth_orbit", + "gravity": 0.0, + "oxygen": false, + "solar_power": 16, + "solar_system": "ad_astra:solar_system", + "temperature": -270, + "tier": 4 +} \ No newline at end of file diff --git a/kubejs/data/tfg/dimension_type/glacio.json b/kubejs/data/tfg/dimension_type/glacio.json new file mode 100644 index 000000000..6896f98d1 --- /dev/null +++ b/kubejs/data/tfg/dimension_type/glacio.json @@ -0,0 +1,25 @@ +{ + "ambient_light": 0.0, + "bed_works": true, + "coordinate_scale": 1.0, + "effects": "ad_astra:glacio", + "has_ceiling": false, + "has_raids": false, + "has_skylight": true, + "height": 384, + "infiniburn": "#minecraft:infiniburn_overworld", + "logical_height": 384, + "min_y": -64, + "monster_spawn_block_light_limit": 0, + "monster_spawn_light_level": { + "type": "minecraft:uniform", + "value": { + "max_inclusive": 15, + "min_inclusive": 0 + } + }, + "natural": true, + "piglin_safe": false, + "respawn_anchor_works": false, + "ultrawarm": false +} \ No newline at end of file diff --git a/kubejs/data/tfg/dimension_type/mars.json b/kubejs/data/tfg/dimension_type/mars.json index a87932a6b..48a53602c 100644 --- a/kubejs/data/tfg/dimension_type/mars.json +++ b/kubejs/data/tfg/dimension_type/mars.json @@ -14,7 +14,7 @@ "monster_spawn_light_level": { "type": "minecraft:uniform", "value": { - "max_inclusive": 7, + "max_inclusive": 15, "min_inclusive": 0 } }, diff --git a/kubejs/data/tfg/dimension_type/mercury.json b/kubejs/data/tfg/dimension_type/mercury.json index c1baa5109..b929d6e0a 100644 --- a/kubejs/data/tfg/dimension_type/mercury.json +++ b/kubejs/data/tfg/dimension_type/mercury.json @@ -10,14 +10,8 @@ "infiniburn": "#minecraft:infiniburn_overworld", "logical_height": 384, "min_y": -64, - "monster_spawn_block_light_limit": 0, - "monster_spawn_light_level": { - "type": "minecraft:uniform", - "value": { - "max_inclusive": 7, - "min_inclusive": 0 - } - }, + "monster_spawn_block_light_limit": 15, + "monster_spawn_light_level": 7, "natural": true, "piglin_safe": true, "respawn_anchor_works": false, diff --git a/kubejs/data/tfg/dimension_type/venus.json b/kubejs/data/tfg/dimension_type/venus.json index 43e2dcff2..9795e2356 100644 --- a/kubejs/data/tfg/dimension_type/venus.json +++ b/kubejs/data/tfg/dimension_type/venus.json @@ -14,7 +14,7 @@ "monster_spawn_light_level": { "type": "minecraft:uniform", "value": { - "max_inclusive": 7, + "max_inclusive": 15, "min_inclusive": 0 } }, diff --git a/kubejs/data/tfg/worldgen/biome/glacio/placeholder_biome.json b/kubejs/data/tfg/worldgen/biome/glacio/placeholder_biome.json new file mode 100644 index 000000000..80105e235 --- /dev/null +++ b/kubejs/data/tfg/worldgen/biome/glacio/placeholder_biome.json @@ -0,0 +1,86 @@ +{ + "carvers": { + "air": [] + }, + "downfall": 0.0, + "effects": { + "fog_color": 12638463, + "mood_sound": { + "block_search_extent": 8, + "offset": 2.0, + "sound": "minecraft:ambient.cave", + "tick_delay": 6000 + }, + "sky_color": 12638463, + "water_color": 4159204, + "water_fog_color": 329011 + }, + "features": [ + [ + "tfc:erosion" + ], + [], + [ + + ], + [], + [], + [], + "#tfg:glacio_veins", + "#tfg:glacio_underground_decoration", + [ + + ], + [ + + ], + "#tfg:glacio_top_layer_modification" + ], + "has_precipitation": false, + "spawn_costs": { + "endermanoverhaul:ice_spikes_enderman": { + "energy_budget": 0.05, + "charge": 0.9 + }, + "endermanoverhaul:snowy_enderman": { + "energy_budget": 0.05, + "charge": 0.9 + }, + "endermanoverhaul:coral_enderman": { + "energy_budget": 0.05, + "charge": 0.9 + } + }, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + + ], + "misc": [], + "monster": [ + { + "type": "endermanoverhaul:ice_spikes_enderman", + "maxCount": 1, + "minCount": 1, + "weight": 10 + }, + { + "type": "endermanoverhaul:snowy_enderman", + "maxCount": 1, + "minCount": 1, + "weight": 10 + }, + { + "type": "endermanoverhaul:coral_enderman", + "maxCount": 1, + "minCount": 1, + "weight": 10 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": -0.5 +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/base_3d_noise.json b/kubejs/data/tfg/worldgen/density_function/glacio/base_3d_noise.json new file mode 100644 index 000000000..f565d43a7 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/base_3d_noise.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:old_blended_noise", + "smear_scale_multiplier": 8, + "xz_factor": 80, + "xz_scale": 0.25, + "y_factor": 60, + "y_scale": 0.375 +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/entrances.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/entrances.json new file mode 100644 index 000000000..a8feae0ed --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/entrances.json @@ -0,0 +1,83 @@ +{ + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:min", + "argument1": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:add", + "argument1": 0.37, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:cave_entrance", + "xz_scale": 0.75, + "y_scale": 0.5 + } + }, + "argument2": { + "type": "minecraft:y_clamped_gradient", + "from_value": 0.3, + "from_y": -10, + "to_value": 0.0, + "to_y": 90 + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": "tfg:glacio/caves/spaghetti_roughness_function", + "argument2": { + "type": "minecraft:clamp", + "input": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:max", + "argument1": { + "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_3d_rarity", + "xz_scale": 2.0, + "y_scale": 1.0 + } + }, + "noise": "minecraft:spaghetti_3d_1", + "rarity_value_mapper": "type_1" + }, + "argument2": { + "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_3d_rarity", + "xz_scale": 2.0, + "y_scale": 1.0 + } + }, + "noise": "minecraft:spaghetti_3d_2", + "rarity_value_mapper": "type_1" + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.0765, + "argument2": { + "type": "minecraft:mul", + "argument1": -0.011499999999999996, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_3d_thickness", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + } + }, + "max": 1.0, + "min": -1.0 + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/noodle.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/noodle.json new file mode 100644 index 000000000..08274c3ab --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/noodle.json @@ -0,0 +1,94 @@ +{ + "type": "minecraft:range_choice", + "input": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "max_exclusive": 321.0, + "min_inclusive": -28.0, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:noodle", + "xz_scale": 1.0, + "y_scale": 1.0 + }, + "when_out_of_range": -1.0 + } + }, + "max_exclusive": 0.0, + "min_inclusive": -1000000.0, + "when_in_range": 64.0, + "when_out_of_range": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "max_exclusive": 321.0, + "min_inclusive": -28.0, + "when_in_range": { + "type": "minecraft:add", + "argument1": -0.07500000000000001, + "argument2": { + "type": "minecraft:mul", + "argument1": -0.025, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:noodle_thickness", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + }, + "when_out_of_range": 0.0 + } + }, + "argument2": { + "type": "minecraft:mul", + "argument1": 1.5, + "argument2": { + "type": "minecraft:max", + "argument1": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "max_exclusive": 321.0, + "min_inclusive": -28.0, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:noodle_ridge_a", + "xz_scale": 2.6666666666666665, + "y_scale": 2.6666666666666665 + }, + "when_out_of_range": 0.0 + } + } + }, + "argument2": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "max_exclusive": 321.0, + "min_inclusive": -28.0, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:noodle_ridge_b", + "xz_scale": 2.6666666666666665, + "y_scale": 2.6666666666666665 + }, + "when_out_of_range": 0.0 + } + } + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/pillars.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/pillars.json new file mode 100644 index 000000000..25555fcdc --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/pillars.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:mul", + "argument1": 2.0, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:pillar", + "xz_scale": 25.0, + "y_scale": 0.3 + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": -1.0, + "argument2": { + "type": "minecraft:mul", + "argument1": -1.0, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:pillar_rareness", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + } + }, + "argument2": { + "type": "minecraft:cube", + "argument": { + "type": "minecraft:add", + "argument1": 0.55, + "argument2": { + "type": "minecraft:mul", + "argument1": 0.55, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:pillar_thickness", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d.json new file mode 100644 index 000000000..143f2da89 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d.json @@ -0,0 +1,61 @@ +{ + "type": "minecraft:clamp", + "input": { + "type": "minecraft:max", + "argument1": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_2d_modulator", + "xz_scale": 2.0, + "y_scale": 1.0 + }, + "noise": "minecraft:spaghetti_2d", + "rarity_value_mapper": "type_2" + }, + "argument2": { + "type": "minecraft:mul", + "argument1": 0.083, + "argument2": "tfg:glacio/caves/spaghetti_2d_thickness_modulator" + } + }, + "argument2": { + "type": "minecraft:cube", + "argument": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:add", + "argument1": 0.0, + "argument2": { + "type": "minecraft:mul", + "argument1": 8.0, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_2d_elevation", + "xz_scale": 1.0, + "y_scale": 0.0 + } + } + }, + "argument2": { + "type": "minecraft:y_clamped_gradient", + "from_value": 8.0, + "from_y": -32, + "to_value": -12.0, + "to_y": 320 + } + } + }, + "argument2": "tfg:glacio/caves/spaghetti_2d_thickness_modulator" + } + } + }, + "max": 1.0, + "min": -1.0 +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d_thickness_modulator.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d_thickness_modulator.json new file mode 100644 index 000000000..7d0ececbf --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_2d_thickness_modulator.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:add", + "argument1": -0.95, + "argument2": { + "type": "minecraft:mul", + "argument1": -0.35000000000000003, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_2d_thickness", + "xz_scale": 2.0, + "y_scale": 1.0 + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_roughness_function.json b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_roughness_function.json new file mode 100644 index 000000000..10ce77c7d --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/caves/spaghetti_roughness_function.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:add", + "argument1": -0.05, + "argument2": { + "type": "minecraft:mul", + "argument1": -0.05, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_roughness_modulator", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.4, + "argument2": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_roughness", + "xz_scale": 1.0, + "y_scale": 1.0 + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/continents.json b/kubejs/data/tfg/worldgen/density_function/glacio/continents.json new file mode 100644 index 000000000..321b6f031 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/continents.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:continentalness", + "shift_x": "minecraft:shift_x", + "shift_y": 0.0, + "shift_z": "minecraft:shift_z", + "xz_scale": 0.25, + "y_scale": 0.0 + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/depth.json b/kubejs/data/tfg/worldgen/density_function/glacio/depth.json new file mode 100644 index 000000000..9d368f8b2 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/depth.json @@ -0,0 +1,82 @@ +{ + "type": "minecraft:add", + "argument1": { + "__comment__": "VERY BOTTOM", + "type": "minecraft:add", + "argument1": { + "type": "minecraft:add", + "argument1": "tfg:glacio/offset", + "argument2": -0.5 + }, + "argument2": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_value": 0.5, + "from_y": -28, + "to_value": -1.3, + "to_y": 130 + + }, + "argument2": { + "type": "minecraft:y_clamped_gradient", + "from_value": 1, + "from_y": -28, + "to_value": 0, + "to_y": 0 + } + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:add", + "argument1": { + "__comment__": "PLANET SURFACE", + "type": "minecraft:add", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_value": 1, + "from_y": 300, + "to_value": -0.5, + "to_y": 340 + }, + "argument2": { + "type": "minecraft:y_clamped_gradient", + "from_value": 1.5, + "from_y": 300, + "to_value": -1, + "to_y": 325 + } + }, + "argument2": { + "__comment__": "UNDERSIDE OF CRUST", + "type": "minecraft:add", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_value": -1.3, + "from_y": 230, + "to_value": -0.5, + "to_y": 295 + + }, + "argument2": { + "type": "minecraft:y_clamped_gradient", + "from_value": 0, + "from_y": 290, + "to_value": 1.0, + "to_y": 300 + } + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:mul", + "argument1": -1, + "argument2": "tfg:glacio/offset" + }, + "argument2": -0.5 + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/erosion.json b/kubejs/data/tfg/worldgen/density_function/glacio/erosion.json new file mode 100644 index 000000000..fff06598e --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/erosion.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:erosion", + "shift_x": "minecraft:shift_x", + "shift_y": 0.0, + "shift_z": "minecraft:shift_z", + "xz_scale": 0.25, + "y_scale": 0.0 + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/factor.json b/kubejs/data/tfg/worldgen/density_function/glacio/factor.json new file mode 100644 index 000000000..8721bb2db --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/factor.json @@ -0,0 +1,190 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:cache_2d", + "argument": { + "type": "minecraft:add", + "argument1": 10.0, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:blend_alpha" + }, + "argument2": { + "type": "minecraft:add", + "argument1": -10.0, + "argument2": { + "type": "minecraft:spline", + "spline": { + "coordinate": "tfg:mars/continents", + "points": [ + { + "derivative": 0.0, + "location": -0.6, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.2, + "value": 1.3 + }, + { + "derivative": 0.0, + "location": 0.2, + "value": 3.25 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.5, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.05, + "value": 3.3 + }, + { + "derivative": 0.0, + "location": 0.05, + "value": 1.67 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.2, + "value": 1.3 + }, + { + "derivative": 0.0, + "location": 0.2, + "value": 2.25 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.25, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.2, + "value": 2.3 + }, + { + "derivative": 0.0, + "location": 0.2, + "value": 3.25 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.05, + "value": 2.67 + }, + { + "derivative": 0.0, + "location": 0.05, + "value": 1.3 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.03, + "value": { + "coordinate": "tfg:mars/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.2, + "value": 1.2 + }, + { + "derivative": 0.0, + "location": 0.2, + "value": 0.9 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.35, + "value": 1.25 + }, + { + "derivative": 0.0, + "location": 0.45, + "value": { + "coordinate": "tfg:mars/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -0.9, + "value": 2.25 + }, + { + "derivative": 0.0, + "location": -0.69, + "value": 1.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.55, + "value": { + "coordinate": "tfg:mars/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -0.9, + "value": 2.25 + }, + { + "derivative": 0.0, + "location": -0.69, + "value": 0.8 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.62, + "value": 2.25 + } + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/jaggedness.json b/kubejs/data/tfg/worldgen/density_function/glacio/jaggedness.json new file mode 100644 index 000000000..32feeeb27 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/jaggedness.json @@ -0,0 +1,303 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:cache_2d", + "argument": { + "type": "minecraft:add", + "argument1": 0.0, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:blend_alpha" + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.0, + "argument2": { + "type": "minecraft:spline", + "spline": { + "coordinate": "tfg:glacio/continents", + "points": [ + { + "derivative": 0.0, + "location": -0.11, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.03, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.63 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.3 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.78, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.315 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.15 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.5775, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.315 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.15 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.375, + "value": 0.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.65, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.63 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.3 + } + ] + } + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.63 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.3 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.78, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.63 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.3 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.5775, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": 0.19999999, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.44999996, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/ridges", + "points": [ + { + "derivative": 0.0, + "location": -0.01, + "value": 0.63 + }, + { + "derivative": 0.0, + "location": 0.01, + "value": 0.3 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.375, + "value": 0.0 + } + ] + } + } + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/offset.json b/kubejs/data/tfg/worldgen/density_function/glacio/offset.json new file mode 100644 index 000000000..a16756c76 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/offset.json @@ -0,0 +1,1523 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:cache_2d", + "argument": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:blend_offset" + }, + "argument2": { + "type": "minecraft:add", + "argument1": 1.0, + "argument2": { + "type": "minecraft:mul", + "argument1": -1.0, + "argument2": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:blend_alpha" + } + } + } + } + }, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:add", + "argument1": -0.5037500262260437, + "argument2": { + "type": "minecraft:spline", + "spline": { + "coordinate": "tfg:glacio/continents", + "points": [ + { + "derivative": 0.0, + "location": -1.1, + "value": 0.044 + }, + { + "derivative": 0.0, + "location": -1.02, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.51, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.44, + "value": -0.12 + }, + { + "derivative": 0.0, + "location": -0.18, + "value": -0.12 + }, + { + "derivative": 0.0, + "location": -0.16, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -0.85, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.38940096, + "location": -1.0, + "value": -0.08880186 + }, + { + "derivative": 0.38940096, + "location": 1.0, + "value": 0.69000006 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.37788022, + "location": -1.0, + "value": -0.115760356 + }, + { + "derivative": 0.37788022, + "location": 1.0, + "value": 0.6400001 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.75, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.65, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.5954547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 0.6054547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 1.0, + "value": 0.100000024 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.3 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.15 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.0 + }, + { + "derivative": 0.1, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.2, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.15 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": 0.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.02 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": -0.03 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": -0.03 + }, + { + "derivative": 0.06, + "location": 0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": 0.0 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.15, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -0.85, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.38940096, + "location": -1.0, + "value": -0.08880186 + }, + { + "derivative": 0.38940096, + "location": 1.0, + "value": 0.69000006 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.37788022, + "location": -1.0, + "value": -0.115760356 + }, + { + "derivative": 0.37788022, + "location": 1.0, + "value": 0.6400001 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.75, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.65, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.5954547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 0.6054547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 1.0, + "value": 0.100000024 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.3 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.15 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.0 + }, + { + "derivative": 0.1, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.2, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.15 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": 0.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.02 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": -0.03 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": -0.03 + }, + { + "derivative": 0.06, + "location": 0.4, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 1.0, + "value": 0.0 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -0.85, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.38940096, + "location": -1.0, + "value": -0.08880186 + }, + { + "derivative": 0.38940096, + "location": 1.0, + "value": 0.69000006 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.37788022, + "location": -1.0, + "value": -0.115760356 + }, + { + "derivative": 0.37788022, + "location": 1.0, + "value": 0.6400001 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.75, + "value": -0.2222 + }, + { + "derivative": 0.0, + "location": -0.65, + "value": 0.0 + }, + { + "derivative": 0.0, + "location": 0.5954547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 0.6054547, + "value": 2.9802322E-8 + }, + { + "derivative": 0.2534563, + "location": 1.0, + "value": 0.100000024 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.25 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.05 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.01, + "location": -0.4, + "value": 0.001 + }, + { + "derivative": 0.01, + "location": 0.0, + "value": 0.003 + }, + { + "derivative": 0.094000004, + "location": 0.4, + "value": 0.05 + }, + { + "derivative": 0.007000001, + "location": 1.0, + "value": 0.060000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.2, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.02 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": -0.03 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": -0.03 + }, + { + "derivative": 0.12, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.25, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -0.85, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.20235021 + }, + { + "derivative": 0.5138249, + "location": 0.0, + "value": 0.7161751 + }, + { + "derivative": 0.5138249, + "location": 1.0, + "value": 1.23 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.2 + }, + { + "derivative": 0.43317974, + "location": 0.0, + "value": 0.44682026 + }, + { + "derivative": 0.43317974, + "location": 1.0, + "value": 0.88 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.2 + }, + { + "derivative": 0.3917051, + "location": 0.0, + "value": 0.30829495 + }, + { + "derivative": 0.3917051, + "location": 1.0, + "value": 0.70000005 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.25 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.35 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.35 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.35 + }, + { + "derivative": 0.049000014, + "location": 1.0, + "value": 0.42000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.07, + "location": -0.4, + "value": 0.0069999998 + }, + { + "derivative": 0.07, + "location": 0.0, + "value": 0.021 + }, + { + "derivative": 0.658, + "location": 0.4, + "value": 0.35 + }, + { + "derivative": 0.049000014, + "location": 1.0, + "value": 0.42000002 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.2, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.45, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.17 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.55, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.17 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.58, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.1 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.02 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": -0.03 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": -0.03 + }, + { + "derivative": 0.12, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + } + ] + } + }, + { + "derivative": 0.0, + "location": 1.0, + "value": { + "coordinate": "tfg:glacio/erosion", + "points": [ + { + "derivative": 0.0, + "location": -0.85, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.34792626 + }, + { + "derivative": 0.5760369, + "location": 0.0, + "value": 0.9239631 + }, + { + "derivative": 0.5760369, + "location": 1.0, + "value": 1.5 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.2 + }, + { + "derivative": 0.4608295, + "location": 0.0, + "value": 0.5391705 + }, + { + "derivative": 0.4608295, + "location": 1.0, + "value": 1.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": 0.2 + }, + { + "derivative": 0.4608295, + "location": 0.0, + "value": 0.5391705 + }, + { + "derivative": 0.4608295, + "location": 1.0, + "value": 1.0 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.35, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.2 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.5 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.5 + }, + { + "derivative": 0.0, + "location": 0.4, + "value": 0.5 + }, + { + "derivative": 0.070000015, + "location": 1.0, + "value": 0.6 + } + ] + } + }, + { + "derivative": 0.0, + "location": -0.1, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.099999994, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.099999994, + "location": 0.0, + "value": 0.03 + }, + { + "derivative": 0.94, + "location": 0.4, + "value": 0.5 + }, + { + "derivative": 0.070000015, + "location": 1.0, + "value": 0.6 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.2, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.45, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.17 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.55, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.0, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.17 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.58, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.5, + "location": -1.0, + "value": -0.05 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + }, + { + "derivative": 0.0, + "location": 0.7, + "value": { + "coordinate": "tfg:glacio/ridges_folded", + "points": [ + { + "derivative": 0.015, + "location": -1.0, + "value": -0.02 + }, + { + "derivative": 0.0, + "location": -0.4, + "value": 0.01 + }, + { + "derivative": 0.0, + "location": 0.0, + "value": 0.01 + }, + { + "derivative": 0.04, + "location": 0.4, + "value": 0.03 + }, + { + "derivative": 0.049, + "location": 1.0, + "value": 0.1 + } + ] + } + } + ] + } + } + ] + } + } + }, + "argument2": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:blend_alpha" + } + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/ridges.json b/kubejs/data/tfg/worldgen/density_function/glacio/ridges.json new file mode 100644 index 000000000..690c53d69 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/ridges.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:flat_cache", + "argument": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:ridge", + "shift_x": "minecraft:shift_x", + "shift_y": 0.0, + "shift_z": "minecraft:shift_z", + "xz_scale": 0.25, + "y_scale": 0.0 + } +} diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/ridges_folded.json b/kubejs/data/tfg/worldgen/density_function/glacio/ridges_folded.json new file mode 100644 index 000000000..ad3943ccb --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/ridges_folded.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:mul", + "argument1": -3.0, + "argument2": { + "type": "minecraft:add", + "argument1": -0.3333333333333333, + "argument2": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:add", + "argument1": -0.6666666666666666, + "argument2": { + "type": "minecraft:abs", + "argument": "tfg:glacio/ridges" + } + } + } + } +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/density_function/glacio/sloped_cheese.json b/kubejs/data/tfg/worldgen/density_function/glacio/sloped_cheese.json new file mode 100644 index 000000000..8acb8cf17 --- /dev/null +++ b/kubejs/data/tfg/worldgen/density_function/glacio/sloped_cheese.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:add", + "argument1": { + "type": "minecraft:mul", + "argument1": 4.0, + "argument2": { + "type": "minecraft:quarter_negative", + "argument": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:add", + "argument1": "tfg:glacio/depth", + "argument2": { + "type": "minecraft:half_negative", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:jagged", + "xz_scale": 1500.0, + "y_scale": 0.0 + } + } + }, + "argument2": "tfg:glacio/factor" + } + } + }, + "argument2": "tfg:glacio/base_3d_noise" +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/noise_settings/glacio_noise.json b/kubejs/data/tfg/worldgen/noise_settings/glacio_noise.json new file mode 100644 index 000000000..8a205c65c --- /dev/null +++ b/kubejs/data/tfg/worldgen/noise_settings/glacio_noise.json @@ -0,0 +1,194 @@ +{ + "sea_level": 300, + "disable_mob_generation": false, + "aquifers_enabled": false, + "ore_veins_enabled": false, + "legacy_random_source": false, + "default_block": { + "Name": "ad_astra:glacio_stone" + }, + "default_fluid": { + "Name": "minecraft:water" + }, + "noise": { + "min_y": -32, + "height": 400, + "size_horizontal": 1, + "size_vertical": 2 + }, + "noise_router": { + "barrier": 0, + "fluid_level_floodedness": 1, + "fluid_level_spread": 0, + "lava": 0, + "temperature": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:temperature", + "xz_scale": 0.25, + "y_scale": 0, + "shift_x": "minecraft:shift_x", + "shift_y": 0, + "shift_z": "minecraft:shift_z" + }, + "vegetation": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:vegetation", + "xz_scale": 0.25, + "y_scale": 0, + "shift_x": "minecraft:shift_x", + "shift_y": 0, + "shift_z": "minecraft:shift_z" + }, + "continents": "tfg:glacio/continents", + "ridges": "tfg:glacio/ridges", + "erosion": "tfg:glacio/erosion", + "depth": 0, + "initial_density_without_jaggedness": { + "type": "minecraft:mul", + "argument1": 4, + "argument2": { + "type": "minecraft:quarter_negative", + "argument": { + "type": "minecraft:mul", + "argument1": "tfg:glacio/depth", + "argument2": "tfg:glacio/factor" + } + } + }, + "final_density": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:squeeze", + "argument": { + "type": "minecraft:mul", + "argument1": 0.64, + "argument2": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:blend_density", + "argument": { + "type": "minecraft:add", + "argument1": 0.1171875, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": -30, + "to_y": -20, + "from_value": 0, + "to_value": 1 + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.1171875, + "argument2": { + "type": "minecraft:add", + "argument1": -0.078125, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": 340, + "to_y": 356, + "from_value": 1, + "to_value": 0 + }, + "argument2": { + "type": "minecraft:add", + "argument1": 0.078125, + "argument2": "tfg:glacio/sloped_cheese" + } + } + } + } + } + } + } + } + } + }, + "argument2": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:squeeze", + "argument": { + "type": "minecraft:mul", + "argument1": 0.64, + "argument2": { + "type": "minecraft:add", + "argument1": 2.5, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_value": -2, + "from_y": -40, + "to_value": 1, + "to_y": -20 + }, + "argument2": { + "type": "minecraft:add", + "argument1": -2, + "argument2": { + "type": "minecraft:add", + "argument1": 0.96, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_value": 1, + "from_y": 270, + "to_value": -2, + "to_y": 330 + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.9375, + "argument2": "tfg:glacio/base_3d_noise" + } + } + } + } + } + } + } + } + } + }, + "vein_gap": 0, + "vein_ridged": 0, + "vein_toggle": 0 + }, + "surface_rule": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:vertical_gradient", + "random_name": "minecraft:bedrock_floor", + "false_at_and_above": { + "above_bottom": 5 + }, + "true_at_and_below": { + "above_bottom": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:bedrock" + } + } + }, + + { + "type": "minecraft:block", + "result_state": { + "Name": "ad_astra:permafrost" + } + } + ] + }, + "spawn_target": [] +} \ No newline at end of file diff --git a/kubejs/data/tfg/worldgen/noise_settings/mars_noise.json b/kubejs/data/tfg/worldgen/noise_settings/mars_noise.json index 6e2ec7ae7..660d2a764 100644 --- a/kubejs/data/tfg/worldgen/noise_settings/mars_noise.json +++ b/kubejs/data/tfg/worldgen/noise_settings/mars_noise.json @@ -166,9 +166,9 @@ "argument1": { "type": "minecraft:y_clamped_gradient", "from_value": 0.0, - "from_y": -64, + "from_y": -32, "to_value": 1.0, - "to_y": -40 + "to_y": -20 }, "argument2": { "type": "minecraft:add", diff --git a/kubejs/server_scripts/ad_astra/tags.js b/kubejs/server_scripts/ad_astra/tags.js index 9a8e8fe52..5144394ef 100644 --- a/kubejs/server_scripts/ad_astra/tags.js +++ b/kubejs/server_scripts/ad_astra/tags.js @@ -535,11 +535,9 @@ const registerAdAstraPlacedFeatures = (event) => { event.add('tfg:moon_small_rock_features', 'tfg:moon/surface/pile_moon_sand') event.add('tfg:moon_small_rock_features', 'tfg:moon/surface/pile_white_sand') event.add('tfg:moon_small_rock_features', 'tfg:moon/surface/pile_black_sand') - //#endregion //#region Mars - // Underground decoration event.add('tfg:mars_underground_decoration', 'tfg:mars/underground/loose_rocks') event.add('tfg:mars_underground_decoration', 'tfc:cave_spike') @@ -660,4 +658,9 @@ const registerAdAstraPlacedFeatures = (event) => { event.add('tfg:venus_fractured_lands_terrain_features', 'tfg:venus/terrain/lake_orange_sand') event.add('tfg:venus_fractured_lands_terrain_features', 'tfg:venus/terrain/lake_yellow_sand') //#endregion + + //#region Glacio + event.add("tfg:glacio_top_layer_modification", "tfg:glow_lichen") + event.add("tfg:glacio_top_layer_modification", "tfc:surface_loose_rocks") + //#endregion } diff --git a/kubejs/server_scripts/tfg/events.chunks.js b/kubejs/server_scripts/tfg/events.chunks.js index c93e55ae6..b8cc0d71e 100644 --- a/kubejs/server_scripts/tfg/events.chunks.js +++ b/kubejs/server_scripts/tfg/events.chunks.js @@ -58,24 +58,12 @@ let forestWeirdnessNoise = TFC.misc.newOpenSimplex2D(3210378120) .map(i => 1.1 * Math.abs(i)) .clamped(0, 1) -TFC.misc.register2DNoiseForInspection('temp', tempLayer) -TFC.misc.register2DNoiseForInspection('rain', rainLayer) -TFC.misc.register2DNoiseForInspection('forestType', forestDensityNoise) -TFC.misc.register2DNoiseForInspection('forestWeirdness', forestWeirdnessNoise) +//TFC.misc.register2DNoiseForInspection('temp', tempLayer) +//TFC.misc.register2DNoiseForInspection('rain', rainLayer) +//TFC.misc.register2DNoiseForInspection('forestType', forestDensityNoise) +//TFC.misc.register2DNoiseForInspection('forestWeirdness', forestWeirdnessNoise) // Forest layer -//const forestTypeLayer = TFC.misc.uniformLayeredArea(45245235242); -//for (let i = 0; i < 3; i++) { -// forestTypeLayer.zoom(true, 19763144126).smooth(79784123632); -//} -//for (let i = 0; i < 6; i++) { -// forestTypeLayer.zoom(true, 451364589723); -//} -//forestTypeLayer -// .smooth(71214856214) -// .zoom(true, 854126548632) -// .smooth(145256147896) - let forestLayerNoise = TFC.misc.newOpenSimplex2D(3210378120) .octaves(2) .spread(0.005) @@ -121,7 +109,6 @@ TFCEvents.createChunkDataProvider('mars', event => { data.generatePartial( rain, temp, - //floatToForestType(((forestTypeLayer.getAt(x, z) / 0x80000000) / 2.0) + 0.5), floatToForestType(forestLayerNoise.noise(x, z)), forestWeirdnessNoise.noise(x, z), // forest weirdness forestDensityNoise.noise(x, z) // forest density @@ -143,6 +130,52 @@ TFCEvents.createChunkDataProvider('mars', event => { }); }) +TFCEvents.createChunkDataProvider('glacio', event => { + event.partial((data, chunk) => { + let x = chunk.pos.minBlockX; + let z = chunk.pos.minBlockZ; + + const avgTemp1 = calcAverage(z, global.GLACIO_PLANET_SIZE, 0, 100) + const avgTemp2 = calcAverage(z + 15, global.GLACIO_PLANET_SIZE, 0, 100) + const avgRain1 = calcAverage(x, global.GLACIO_PLANET_SIZE, 0, 100) + const avgRain2 = calcAverage(x + 15, global.GLACIO_PLANET_SIZE, 0, 100) + + let rain = TFC.misc.lerpFloatLayer( + avgRain1 + rainLayer.noise(x, z), + avgRain1 + rainLayer.noise(x, z + 15), + avgRain2 + rainLayer.noise(x + 15, z), + avgRain2 + rainLayer.noise(x + 15, z + 15) + ); + let temp = TFC.misc.lerpFloatLayer( + avgTemp1 + tempLayer.noise(x, z), + avgTemp1 + tempLayer.noise(x, z + 15), + avgTemp2 + tempLayer.noise(x + 15, z), + avgTemp2 + tempLayer.noise(x + 15, z + 15) + ); + + data.generatePartial( + rain, + temp, + floatToForestType(forestLayerNoise.noise(x, z)), + forestWeirdnessNoise.noise(x, z), // forest weirdness + forestDensityNoise.noise(x, z) // forest density + ); + }); + + event.full((data, chunk) => { + let heights = []; + for (let z = 0; z < 16; z++) { + for (let x = 0; x < 16; x++) { + heights[x + 16 * z] = chunk.getHeight($HeightMap.Types.OCEAN_FLOOR_WG, x, z); + } + } + data.generateFull(heights, EMPTY_AQUIFER); + }); + + event.rocks((x, y, z, surfaceY, cache, rockSettings) => { + return rockSettings.sampleAtLayer(rockLayer.getAt(x, z), (surfaceY - y) / ROCK_LAYER_HEIGHT); + }); +}) /** * @param {number} playerZ The current Z level of the player diff --git a/kubejs/startup_scripts/tfg/register_climates.js b/kubejs/startup_scripts/tfg/register_climates.js index d88c5a1a2..50b06c2f8 100644 --- a/kubejs/startup_scripts/tfg/register_climates.js +++ b/kubejs/startup_scripts/tfg/register_climates.js @@ -18,6 +18,8 @@ global.MARS_MAX_AVG_TEMP = -15; global.MARS_MIN_AVG_RAIN = -25; global.MARS_MAX_AVG_RAIN = 13; +global.GLACIO_PLANET_SIZE = 5000; + function clamp(val, min, max) { return Math.min(Math.max(val, min), max); }