From 39f4ecc50409eafee7565340cadb25bfb1bcc5d6 Mon Sep 17 00:00:00 2001 From: Misode Date: Sun, 1 Feb 2026 00:16:10 +0100 Subject: [PATCH] Fix #824 noise settings preview in 1.18 --- src/app/components/previews/Deepslate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/previews/Deepslate.ts b/src/app/components/previews/Deepslate.ts index 9d0d17a8..a3258876 100644 --- a/src/app/components/previews/Deepslate.ts +++ b/src/app/components/previews/Deepslate.ts @@ -282,7 +282,7 @@ export class Deepslate { this.settingsCache = settings.noise const randomState = new this.d.RandomState(settings, seed) return randomState.router.finalDensity - } else { + } else if (this.isVersion('1.18.2')) { const random = this.d.XoroshiroRandom.create(seed).forkPositional() const settings = this.d.NoiseSettings.fromJson({ min_y: minY, @@ -297,6 +297,8 @@ export class Deepslate { this.settingsCache = settings const originalFn = this.d.DensityFunction.fromJson(state) return originalFn.mapAll(new (this.d.NoiseRouter as any).Visitor(random, settings)) + } else { + return undefined } }