Skip to content

Commit

Permalink
fix a bunch of broken textures
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed May 31, 2021
1 parent e512170 commit b74107f
Show file tree
Hide file tree
Showing 30 changed files with 1,333 additions and 437 deletions.
15 changes: 13 additions & 2 deletions generator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,17 @@ async function getItemFromCIT(baseDir: string, propertiesDir: string, vanillaDir
}
}

if (Object.keys(textures).length === 0) {
// some properties are weird and just don't put a model or texture, so we just assume it's fine if we replace .properties with .png
console.log('no textures for', propertiesDir)
let textureDir = propertiesDir.replace(/(\.properties)$/, '.png')
try {
textureDir = await makeAnimationFromMcmeta(textureDir)
} catch {}

textures.texture = textureDir
}

return {
matcher,
textures
Expand Down Expand Up @@ -340,7 +351,7 @@ async function combineLayers(directories: string[]): Promise<Buffer> {

/*
How it finds matchers:
- Check /mcpatcher/cit and get all the files that end in .properties, this is easy
- Check /mcpatcher/cit and get all the files that end in .properties
- Check /models/item and extract the entire models from there
- Get the textures from here, these might be replaced
- Extract the item name from the model file name
Expand Down Expand Up @@ -503,7 +514,7 @@ async function main() {
await addPack('ectoplasm') // completionists update
await addPack('furfsky') // 1.7.1
await addPack('furfsky_reborn') // 1.2.6
await addPack('packshq') // idk
await addPack('packshq') // v13
await addPack('rnbw') // 0.6.0
await addPack('vanilla')
}
Expand Down
4 changes: 3 additions & 1 deletion matchers/furfsky.json
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,9 @@
},
"type": "item"
},
"textures": {}
"textures": {
"texture": "packs\\furfsky\\mcpatcher\\cit\\armor\\ender\\ender_helmet.png"
}
},
{
"matcher": {
Expand Down
Loading

0 comments on commit b74107f

Please sign in to comment.