mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-29 01:22:44 +00:00
Add partners, Immersive Weathering block growth (#231)
* Add partners: Immersive Weathering block growth * Fix block state and modded block IDs * Add categories * Add custom rule tests * Add missing translation
This commit is contained in:
@@ -45,7 +45,11 @@ async function loadLocale(language: string) {
|
||||
const data = await import(`../../locales/${language}.json`)
|
||||
const schema = langConfig.schemas !== false
|
||||
&& await import(`../../../node_modules/@mcschema/locales/src/${language}.json`)
|
||||
Locales[language] = { ...data.default, ...schema.default }
|
||||
let partners = { default: {} }
|
||||
if (language === 'en') {
|
||||
partners = await import('../partners/locales/en.json')
|
||||
}
|
||||
Locales[language] = { ...data.default, ...schema.default, ...partners.default }
|
||||
}
|
||||
|
||||
export function useLocale() {
|
||||
|
||||
@@ -124,6 +124,9 @@ export function ProjectProvider({ children }: { children: ComponentChildren }) {
|
||||
|
||||
export function getFilePath(file: ProjectFile) {
|
||||
const [namespace, id] = file.id.includes(':') ? file.id.split(':') : ['minecraft', file.id]
|
||||
if (file.type === 'pack_mcmeta') {
|
||||
return 'pack.mcmeta'
|
||||
}
|
||||
const gen = config.generators.find(g => g.id === file.type)
|
||||
if (!gen) {
|
||||
throw new Error(`Cannot find generator of type ${file.type}`)
|
||||
|
||||
Reference in New Issue
Block a user