PrismarineJS / minecraft-data

Language independent module providing minecraft data for minecraft clients, servers and libraries.
https://prismarinejs.github.io/minecraft-data
654 stars 222 forks source link

Proposal: Remove materials.json and putting the important data in blocks.json #557

Open u9g opened 2 years ago

u9g commented 2 years ago

What happens now?

As of 1.17, the digtime function in prismarine-block uses the materials.json to get the effective data.

Why should it be changed?

As of 1.17, there are a lot more categories than the much more primitive ones that were there when the materials file was created, see: 1.16 materials.json 1.17 materials.json

What would change?

This would allow for getting rid of the harvestTools data on each block and the material type on each block, as this would be part of the new tool_speeds object on each block.

Open to input on anything that should be changed

rom1504 commented 2 years ago

https://github.com/PrismarineJS/minecraft-data/issues/412 similar

rom1504 commented 2 years ago

your idea works if it's 100% automatically generated it will create a ton of duplication so no way to manually edit it

I suggest you try it for one version and PR the file so we can see how it looks

u9g commented 2 years ago

your idea works if it's 100% automatically generated it will create a ton of duplication so no way to manually edit it

I suggest you try it for one version and PR the file so we can see how it looks

I've added the effectiveTools data to my 1.16 pr here: https://github.com/PrismarineJS/minecraft-data/blob/6c1f8fb884b404f8a1573cce1a6c9efb6bf4b2af/data/pc/1.16/blocks.json

The automation used for this, can be easily expanded out to support 1.8-latest, using fabric to dump the data (including adding to old data)