Skip to content

Commit

Permalink
fix: schematics
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceat committed Dec 16, 2024
1 parent 45c473a commit 53f9edd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/utils/terrain/world_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ import { BLOCKS, SCHEMATICS_BLOCKS } from './blocks.js'
export const hex_to_int = hex => parseInt(hex.replace('#', ''), 16)

// Extract unique colors from block definitions
const unique_block_colors = [...new Set(Object.values(BLOCKS))]
const unique_block_colors = [
...new Set(
Object.values({
...BLOCKS,
...SCHEMATICS_BLOCKS,
}),
),
]

// Generate new block type entries for each unique color
const additional_block_types = unique_block_colors.reduce(
Expand Down

0 comments on commit 53f9edd

Please sign in to comment.