mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix #379 handle unknown block colors in noise settings preview
This commit is contained in:
@@ -60,7 +60,7 @@ export const NoiseSettingsPreview = ({ data, shown, version }: PreviewProps) =>
|
||||
iterateWorld2D(imageData.current, transform, (x, y) => {
|
||||
return DEEPSLATE.getBlockState(x, y)?.getName().toString()
|
||||
}, (block) => {
|
||||
return BlockColors[block ?? 'minecraft:air']
|
||||
return BlockColors[block ?? 'minecraft:air'] ?? [0, 0, 0]
|
||||
})
|
||||
} else if (layer === 'final_density') {
|
||||
const colormapFn = getColormap(colormap)
|
||||
|
||||
Reference in New Issue
Block a user