mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-28 09:18:45 +00:00
24w19a
This commit is contained in:
@@ -8,7 +8,10 @@ import { quat, vec2 } from 'gl-matrix'
|
||||
import yaml from 'js-yaml'
|
||||
import { route } from 'preact-router'
|
||||
import rfdc from 'rfdc'
|
||||
import type { ConfigGenerator } from './Config.js'
|
||||
import config from './Config.js'
|
||||
import type { VersionId } from './services/index.js'
|
||||
import { checkVersion } from './services/index.js'
|
||||
|
||||
export function isPromise(obj: any): obj is Promise<any> {
|
||||
return typeof (obj as any)?.then === 'function'
|
||||
@@ -581,3 +584,12 @@ export function parseGitPatch(patch: string) {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
const legacyTags = new Set(['tag/item', 'tag/block', 'tag/fluid', 'tag/entity_type', 'tag/game_event'])
|
||||
export function genPath(gen: ConfigGenerator, version: VersionId) {
|
||||
const path = gen.path ?? gen.id
|
||||
if (!checkVersion(version, '1.21') && legacyTags.has(gen.id)) {
|
||||
return path + 's'
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user