Visualizations for 1.18.2 and density functions

This commit is contained in:
Misode
2022-02-26 04:34:19 +01:00
parent 50e418a168
commit 7806aa6ad6
11 changed files with 259 additions and 81 deletions

View File

@@ -26,7 +26,7 @@ export const NoiseSettingsPreview = ({ data, shown, version }: PreviewProps) =>
},
async draw(img) {
const options = { biome, biomeDepth, biomeScale, offset: offset.current, width: img.width, seed, version }
noiseSettings(data, img, options)
await noiseSettings(data, img, options)
},
async onDrag(dx) {
offset.current += dx * size
@@ -36,7 +36,7 @@ export const NoiseSettingsPreview = ({ data, shown, version }: PreviewProps) =>
const worldX = Math.floor(x * size - offset.current)
const worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)
const block = getNoiseBlock(worldX, worldY)
setFocused(block ? `Y=${worldY} (${block.getName().replace(/^minecraft:/, '')})` : `Y=${worldY}`)
setFocused(block ? `Y=${worldY} (${block.getName().path})` : `Y=${worldY}`)
},
onLeave() {
setFocused(undefined)