Hey there, ever made a mod that has custom blocks? Have you ever noticed how the amount of custom blocks you can make is limited because the ID cannot exceed 256? Well now you can make as many blocks as you want! How you ask? Simple, by giving a block of the same ID a different data value... What's a data value you ask? Well let's look at the planks, we know that there are more then one type of planks right? But they all share the same ID which is 5, the Oak Planks data is 0, Spruce is 1 and so on, but how do we make a custom blocks have different data values? It is really quite simple!
First we are going to make a block using the define block function, we will give it an ID a name and we will decide what textures we want it to have, add a source block, a render type and decide if it is opaque:
Now each side is still stone but this is where things are going to start getting long... I mean like really long... We are going to give the block 250 a new data value so we can reuse the ID to do this, add in another 6 textures to the array and these will be the textures for the block 250 that has a data value of 1 instead of 0 (which is stone one we just made) so now we have this:
Now you have your custom block with two data values! But what if you want each one to have a different shape? Well using the set block shape function, at the end (after the endY co-ordinate) add the blocks data like this:
That is pretty much all there is to it! Hopefully this will help out some of you (if it does maybe consider hitting that Thanks button? ) and if none of this made sense just leave a message and I'll get back to you asap
There are a few items that do use data values e.g.(dye, coal/charcoal, buckets).
You're right, I didn't think of that, I will still look into this but is it ok if I PM you the codes and you test it because I just soft bricked my phone this morning and I can't test scripts till I get it fixed