Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/app/components/customized/BiomesSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'preact/hooks'
import { useVersion } from '../../contexts/Version.jsx'
import { deepClone } from '../../Utils.js'
import { useAsync } from '../../hooks/useAsync.js'
import { fetchRegistries } from '../../services/DataFetcher.js'
Expand All @@ -13,7 +14,11 @@ interface Props {
changeModel: (model: Partial<CustomizedModel>) => void,
}
export function BiomesSettings({ model, initialModel, changeModel }: Props) {
const { value: registries } = useAsync(() => fetchRegistries('1.20'))
const { version } = useVersion()
const { value: registries } = useAsync(async () => {
const registries = await fetchRegistries(version)
return registries
}, [version])

const biomes = useMemo(() => {
const hiddenBiomes = new Set(['end_barrens', 'end_highlands', 'end_midlands', 'small_end_islands', 'the_end', 'basalt_deltas', 'crimson_forest', 'nether_wastes', 'soul_sand_valley', 'warped_forest', 'the_void'])
Expand Down Expand Up @@ -105,6 +110,7 @@ const DefaultReplacements: Record<string, string> = {
old_growth_birch_forest: 'birch_forest',
old_growth_pine_taiga: 'taiga',
old_growth_spruce_taiga: 'taiga',
pale_garden: 'forest',
plains: 'the_void',
river: 'plains',
savanna: 'plains',
Expand Down
1 change: 1 addition & 0 deletions src/app/components/previews/BiomeSourcePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,5 @@ export const VanillaColors: Record<string, Triple> = {
'minecraft:dripstone_caves': [140, 124, 0],
'minecraft:deep_dark': [10, 14, 19],
'minecraft:mangrove_swamp': [36,196,142],
'minecraft:pale_garden': [172, 196, 224],
}