build for mc preview
This commit is contained in:
parent
ffb70319e7
commit
f55e0d226a
4 changed files with 19235 additions and 31750 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import fs from "fs"
|
||||
|
||||
const version = process.argv.includes("--preview") ? "preview" : "stable"
|
||||
|
||||
interface Item {
|
||||
id: number
|
||||
id_aux: number
|
||||
|
|
@ -15,7 +17,9 @@ interface ItemAPI {
|
|||
async function main() {
|
||||
const itemlist: string[] = ["export enum ItemAuxID {"]
|
||||
|
||||
const { items }: ItemAPI = await fetch("https://www.asakiyuki.com/api/minecraft/items/id").then(v => v.json())
|
||||
const { items }: ItemAPI = await fetch("https://www.asakiyuki.com/api/minecraft/items/id?version=" + version).then(
|
||||
v => v.json(),
|
||||
)
|
||||
for (const { name: fullname, id, id_aux } of items) {
|
||||
const [namespace, name] = fullname.split(":")
|
||||
const enumName = name.toUpperCase()
|
||||
|
|
|
|||
Reference in a new issue