Easier way to access pre-1.13 colored items
imharvol opened this issue · 0 comments
imharvol commented
In versions 1.12.2 and below, some colored items (wool, concrete, glass, ...) had a single type and the color was coded into the item's metadata
const metadataToColor = {
0: 'white',
1: 'orange',
2: 'magenta',
3: 'light_blue',
4: 'yellow',
5: 'lime',
6: 'pink',
7: 'gray',
8: 'silver',
9: 'cyan',
10: 'purple',
11: 'blue',
12: 'brown',
13: 'green',
14: 'red',
15: 'black'
}
Right now I'm having to access pre-1.13 colored items (wool, concrete, glass, ...) using something like this:
const textureBase64 = fs.readFileSync(path.join(
mcAssets.directory, 'blocks', 'wool_colored_blue.png')
).toString('base64')
I think there should be an easier way
Also, this is more of a minecraft-assets issue but:
require('minecraft-assets')('1.12.2').textureContent['glass_pane'].texture
isnull
require('minecraft-assets')('1.12.2').textureContent['concrete'].texture
isnull
Related to mineflayer-web-inventory#28