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

@@ -106,7 +106,7 @@ function calculateState(data: any, octaves: NoiseOctaves, shaper: TerrainShaper)
return JSON.stringify([data, octaves, shaper.toJson()])
}
function getOctaves(obj: any): NoiseOctaves {
export function getOctaves(obj: any): NoiseOctaves {
if (typeof obj !== 'string') {
const settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(obj))
obj = settings.noise.densityFactor === 0 && settings.noise.densityOffset === -0.030078125
@@ -145,7 +145,7 @@ function getOctaves(obj: any): NoiseOctaves {
}
}
function getShaper(obj: any): TerrainShaper {
export function getShaper(obj: any): TerrainShaper {
if (typeof obj === 'string') {
switch (obj.replace(/^minecraft:/, '')) {
case 'overworld':