How are Block-Ids determined in 1.10+?

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
W

WowMuchName

Guest
I'm trying to patch a shader to apply "waves" to other liquids than vanilla water. By digging around in the code I found that the shader is supplied with the numeric block-id and decides according to that whether the block is water or not. So I guess defining other Ids as well will apply the water-shader to those types of blocks too.

Im not really deep into modding for minecraft, but heard that after 1.7+ the way Ids are handled changed.

1. Can I get the Id of a modded block outside the game? Is it a hashCode over the name or something?
2. If I find out the Id of a modded block and put its value in the shader, will the same block have the same id in another mod-pack?
 
N

NerpyDerpston

Guest
I'm trying to patch a shader to apply "waves" to other liquids than vanilla water. By digging around in the code I found that the shader is supplied with the numeric block-id and decides according to that whether the block is water or not. So I guess defining other Ids as well will apply the water-shader to those types of blocks too.

Im not really deep into modding for minecraft, but heard that after 1.7+ the way Ids are handled changed.

1. Can I get the Id of a modded block outside the game? Is it a hashCode over the name or something?
2. If I find out the Id of a modded block and put its value in the shader, will the same block have the same id in another mod-pack?
for question one part one, im not sure. for part two i THINK it's mod:item, but it may not be for your purposes
for question two, IF the thing i said above is true, then it would be the same in another modpack.
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
The mapping of the string id to the numeric id should be in the meta data of the world save,

most likely not, I believe that the mapping is filled based on the order the mods are loaded in the first time.