fixes missing moon chunk data, must've been a kjs-tfc change #1528

This commit is contained in:
Pyritie 2025-08-05 11:44:41 +01:00
parent dc9e57c3bf
commit 561be8c20c
2 changed files with 184 additions and 124 deletions

View file

@ -1,5 +1,38 @@
{
"type": "tfg:moon",
"generator": {
"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"
},
"layers": [],
"bottom": [
"gabbro"
],
"ocean_floor": [
"bottom"
],
"volcanic": [
"bottom"
],
"land": [
"bottom"
],
"uplift": [
"bottom"
]
}
},
"generator": {
"type": "minecraft:noise",
"settings": "tfg:moon_noise",
@ -129,4 +162,5 @@
]
}
}
}
}

View file

@ -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);