PrismarineJS / PrismarineJS/node-minecraft-assets
Easier way to access pre-1.13 colored items
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 22
- Forks
- 21
- Avg merge
- 50m
- Merged PRs (30d)
- 2
Description
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'].textureisnullrequire('minecraft-assets')('1.12.2').textureContent['concrete'].textureisnull
Related to mineflayer-web-inventory#28
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how version 1.12.2 exposes colored block textures through the public minecraft-assets API, including the textureContent examples in the issue. Compare the existing wool access pattern with glass and concrete, then define a consistent access path and verify that the affected pre-1.13 items no longer return null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100