From 561be8c20caa999fb387354f8e77ccb9b42799be Mon Sep 17 00:00:00 2001 From: Pyritie Date: Tue, 5 Aug 2025 11:44:41 +0100 Subject: [PATCH] fixes missing moon chunk data, must've been a kjs-tfc change #1528 --- kubejs/data/ad_astra/dimension/moon.json | 282 ++++++++++++--------- kubejs/server_scripts/tfg/events.chunks.js | 26 ++ 2 files changed, 184 insertions(+), 124 deletions(-) diff --git a/kubejs/data/ad_astra/dimension/moon.json b/kubejs/data/ad_astra/dimension/moon.json index 9d45ed528..45842c3a2 100644 --- a/kubejs/data/ad_astra/dimension/moon.json +++ b/kubejs/data/ad_astra/dimension/moon.json @@ -1,132 +1,166 @@ { "type": "tfg:moon", "generator": { - "type": "minecraft:noise", - "settings": "tfg:moon_noise", - "biome_source": { - "type": "minecraft:multi_noise", - "biomes": [ - { - "biome": "tfg:moon/lunar_lights_dense", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ 0.4, 1 ], - "erosion": 0, - "weirdness": [ 0.4, 1 ], - "depth": 0, - "offset": 0 - } + "type": "kubejs_tfc:wrapped", + "event_key": "moon", + "settings": { + "flat_bedrock": false, + "spawn_distance": 0, + "spawn_center_x": 0, + "spawn_center_z": 0, + "temperature_scale": 2000, + "rainfall_scale": 2000, + "continentalness": -0.5, + "rock_layer_settings": { + "rocks": { + "gabbro": "tfc:gabbro" }, - { - "biome": "tfg:moon/lunar_lights_sparse", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ 0.2, 0.4 ], - "erosion": 0, - "weirdness": [ 0.2, 0.4 ], - "depth": 0, - "offset": 0 + "layers": [], + "bottom": [ + "gabbro" + ], + "ocean_floor": [ + "bottom" + ], + "volcanic": [ + "bottom" + ], + "land": [ + "bottom" + ], + "uplift": [ + "bottom" + ] + } + }, + "generator": { + "type": "minecraft:noise", + "settings": "tfg:moon_noise", + "biome_source": { + "type": "minecraft:multi_noise", + "biomes": [ + { + "biome": "tfg:moon/lunar_lights_dense", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ 0.4, 1 ], + "erosion": 0, + "weirdness": [ 0.4, 1 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_lights_sparse", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ 0.2, 0.4 ], + "erosion": 0, + "weirdness": [ 0.2, 0.4 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_asurine_dense", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ 0.4, 1 ], + "erosion": 0, + "weirdness": [ -1, -0.4 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_asurine_sparse", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ 0.2, 0.4 ], + "erosion": 0, + "weirdness": [ -0.4, -0.2 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_plains", + "parameters": { + "temperature": 0, + "humidity": -0.1, + "continentalness": [ -0.2, 0.2 ], + "erosion": 0, + "weirdness": [ -0.2, 0.2 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_sands", + "parameters": { + "temperature": 0, + "humidity": 0.2, + "continentalness": [ -0.2, 0.2 ], + "erosion": 0, + "weirdness": [ -0.2, 0.2 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_corals_sparse", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ -0.4, -0.2 ], + "erosion": 0, + "weirdness": [ -0.4, -0.2 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_corals_dense", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ -1, -0.4 ], + "erosion": 0, + "weirdness": [ -1, -0.4 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_chorus_sparse", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ -0.4, -0.2 ], + "erosion": 0, + "weirdness": [ 0.2, 0.4 ], + "depth": 0, + "offset": 0 + } + }, + { + "biome": "tfg:moon/lunar_chorus_dense", + "parameters": { + "temperature": 0, + "humidity": 0, + "continentalness": [ -1, -0.4 ], + "erosion": 0, + "weirdness": [ 0.4, 1 ], + "depth": 0, + "offset": 0 + } } - }, - { - "biome": "tfg:moon/lunar_asurine_dense", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ 0.4, 1 ], - "erosion": 0, - "weirdness": [ -1, -0.4 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_asurine_sparse", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ 0.2, 0.4 ], - "erosion": 0, - "weirdness": [ -0.4, -0.2 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_plains", - "parameters": { - "temperature": 0, - "humidity": -0.1, - "continentalness": [ -0.2, 0.2 ], - "erosion": 0, - "weirdness": [ -0.2, 0.2 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_sands", - "parameters": { - "temperature": 0, - "humidity": 0.2, - "continentalness": [ -0.2, 0.2 ], - "erosion": 0, - "weirdness": [ -0.2, 0.2 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_corals_sparse", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ -0.4, -0.2 ], - "erosion": 0, - "weirdness": [ -0.4, -0.2 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_corals_dense", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ -1, -0.4 ], - "erosion": 0, - "weirdness": [ -1, -0.4 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_chorus_sparse", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ -0.4, -0.2 ], - "erosion": 0, - "weirdness": [ 0.2, 0.4 ], - "depth": 0, - "offset": 0 - } - }, - { - "biome": "tfg:moon/lunar_chorus_dense", - "parameters": { - "temperature": 0, - "humidity": 0, - "continentalness": [ -1, -0.4 ], - "erosion": 0, - "weirdness": [ 0.4, 1 ], - "depth": 0, - "offset": 0 - } - } - ] + ] + } } } } \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/events.chunks.js b/kubejs/server_scripts/tfg/events.chunks.js index a05bfab75..971c9bf0f 100644 --- a/kubejs/server_scripts/tfg/events.chunks.js +++ b/kubejs/server_scripts/tfg/events.chunks.js @@ -5,6 +5,32 @@ const $HeightMap = Java.loadClass("net.minecraft.world.level.levelgen.Heightmap" const ROCK_LAYER_HEIGHT = 40; +// Bare minimum +TFCEvents.createChunkDataProvider('moon', event => { + var aquifer = []; + let i = 0; + while (i < 16) { + aquifer.push(32); + i++; + } + var heights = []; + for (let x = 0 ; x < 16 ; x++) { + for (let z = 0 ; z < 16 ; z++) { + heights[x + 16 * z] = 80; + } + } + + event.partial((data, chunk) => { + data.generatePartial(0, 0, 0, 0, 0) + }) + event.full((data, chunk) => { + data.generateFull(heights, aquifer) + }) + event.rocks((x, y, z, surfaceY, cache, rockLayers) => { + return rockLayers.sampleAtLayer(0, 0) + }) +}) + TFCEvents.createChunkDataProvider('mars', event => { const rain = TFC.misc.lerpFloatLayer(0, 0, 0, 0);