Skip to content

Commit 39f4ecc

Browse files
committed
Fix #824 noise settings preview in 1.18
1 parent f243be3 commit 39f4ecc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/components/previews/Deepslate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class Deepslate {
282282
this.settingsCache = settings.noise
283283
const randomState = new this.d.RandomState(settings, seed)
284284
return randomState.router.finalDensity
285-
} else {
285+
} else if (this.isVersion('1.18.2')) {
286286
const random = this.d.XoroshiroRandom.create(seed).forkPositional()
287287
const settings = this.d.NoiseSettings.fromJson({
288288
min_y: minY,
@@ -297,6 +297,8 @@ export class Deepslate {
297297
this.settingsCache = settings
298298
const originalFn = this.d.DensityFunction.fromJson(state)
299299
return originalFn.mapAll(new (this.d.NoiseRouter as any).Visitor(random, settings))
300+
} else {
301+
return undefined
300302
}
301303
}
302304

0 commit comments

Comments
 (0)