From 983782b1f892879ad1636d7eaee7f71fb60b8654 Mon Sep 17 00:00:00 2001 From: Misode Date: Tue, 20 Jun 2023 03:41:42 +0200 Subject: [PATCH] Fix min_y and height not being updated in noise settings --- src/app/components/customized/CustomizedGenerator.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/customized/CustomizedGenerator.ts b/src/app/components/customized/CustomizedGenerator.ts index bf7c5ef2..9f9eadfe 100644 --- a/src/app/components/customized/CustomizedGenerator.ts +++ b/src/app/components/customized/CustomizedGenerator.ts @@ -58,7 +58,7 @@ function generateDimensionType(ctx: Context) { } function generateNoiseSettings(ctx: Context) { - if (isUnchanged(ctx, 'seaLevel', 'oceans', 'caves', 'noiseCaves')) return + if (isUnchanged(ctx, 'minHeight', 'maxHeight', 'seaLevel', 'oceans', 'caves', 'noiseCaves')) return const defaultFluid = formatIdentifier(ctx.model.oceans) const vanilla = ctx.vanilla['worldgen/noise_settings'].get('overworld') const finalDensity = deepClone(vanilla.noise_router.final_density) @@ -73,6 +73,11 @@ function generateNoiseSettings(ctx: Context) { Name: defaultFluid, Properties: ctx.blockStates.get(defaultFluid)?.default, }, + noise: { + ...vanilla.noise, + min_y: ctx.model.minHeight, + height: ctx.model.maxHeight - ctx.model.minHeight, + }, noise_router: { ...vanilla.noise_router, final_density: finalDensity,