mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 08:06:51 +00:00
Fix #223 don't parse noise settings for dimension preview
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { DataModel, Path } from '@mcschema/core'
|
||||
import { Path } from '@mcschema/core'
|
||||
import type { NoiseParameters } from 'deepslate'
|
||||
import { NoiseGeneratorSettings } from 'deepslate'
|
||||
import { useEffect, useMemo, useRef, useState } from 'preact/hooks'
|
||||
import type { PreviewProps } from '.'
|
||||
import { Btn, BtnMenu } from '..'
|
||||
@@ -115,8 +114,7 @@ function calculateState(data: any, octaves: Record<string, NoiseParameters>) {
|
||||
|
||||
export function getOctaves(obj: any): Record<string, NoiseParameters> {
|
||||
if (typeof obj !== 'string') {
|
||||
const settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(obj))
|
||||
obj = settings.legacyRandomSource ? 'minecraft:nether' : 'minecraft:overworld'
|
||||
obj = obj.legacy_random_source ? 'minecraft:nether' : 'minecraft:overworld'
|
||||
}
|
||||
switch (obj.replace(/^minecraft:/, '')) {
|
||||
case 'overworld':
|
||||
|
||||
Reference in New Issue
Block a user