Fix noise settings preview, use the terrain shaper

This commit is contained in:
Misode
2021-10-30 04:44:25 +02:00
parent 561f9a3956
commit b4d43c55bd
5 changed files with 36 additions and 34 deletions

View File

@@ -170,7 +170,11 @@ export async function fetchPreset(version: VersionId, registry: string, id: stri
if (registry === 'worldgen/noise_settings' && version === '1.18') {
let text = await res.text()
text = text.replaceAll('"max_threshold": Infinity', '"max_threshold": 100')
return JSON.parse(text)
const data = JSON.parse(text)
if (id !== 'overworld' && id !== 'large_biomes') {
data.noise.terrain_shaper = { offset: 0, factor: 0, jaggedness: 0 }
}
return data
}
return await res.json()
} catch (e) {