minecraft-data icon indicating copy to clipboard operation
minecraft-data copied to clipboard

why are the block IDs in this package different from the actual minecraft block IDs?

Open Jagorrim opened this issue 1 year ago • 2 comments

I've searched actual minecraft blocks IDs, and it differ from IDs in this package. For example: every site about it say that ID of still water is 8, but in this package it is 26. Why is this so? I'm beginner in js and, in particular, in mineflayer, and i don't understand. Sorry for the stupid question, if the question is really like that

Jagorrim avatar Mar 17 '24 07:03 Jagorrim

Minecraft since 1.13 doesn't use static numerical block IDs (see: the flattening). It uses strings to identify blocks. The id field in minecraft-data is for internal representation, the stateId is the block state ID that identifies the specific block state.

I recommend reading pages like https://minecraft.wiki/w/Block_states, https://minecraft.wiki/w/Java_Edition_data_values, https://minecraft.wiki/w/Java_Edition_1.13/Flattening

extremeheat avatar Mar 17 '24 08:03 extremeheat

Thanks!

Jagorrim avatar Mar 17 '24 08:03 Jagorrim