PrismarineJS/node-minecraft-assets

Slash in filename?

njt1982 opened this issue · 3 comments

return 'data:image/png;base64,' + fs.readFileSync(path.join(__dirname, '/../minecraft-assets/data/', mcVersion, '/', texture, '.png'), 'base64')

I'm getting this error:
Error: ENOENT: no such file or directory, open '/Users/nthompson/Sites/minecraft-browser/node_modules/minecraft-assets/minecraft-assets/data/1.16.1/block/acacia_planks/.png'

Should it be texture + '.png' ?

Hmm that and it should be looking in blocks, not block...

So my "fix" has been to use mcAssets.textureContent[k].textureinstead of mcAssets.getImageContent(k) (where k is something like acacia_planks)