I have created a model on a wreath for my mod called BDM.
The problem is, I have no idea how to have the leaf part have the folliage with it, just like normal leaves do. As it is now, it just goes black and white - the normal leaf texture with no folliage.
Please could someone help me with the code to add the folliage to my model so it changes in different biomes too? Thanks x
You need to override the method that returns the color for the block, Block.colorMultiplier, which returns 16777215 (white) by default; you can look at the BlockLeaves class to see how they do it, including the biome color (these are the names that MCP uses for 1.6.4 but there should be equivalents, if not the same names, in 1.12.2; the method that gets the color for leaves will be getting the biome for a 3x3 area around the block, which provides color blending between biomes, otherwise you can just read it at the block's position).
One thing to note is that this color will need to be applied to the leaf textures only; grass blocks use a separate overlay texture for the sides as otherwise it would also tint the dirt part of the texture, so you'll need to use some sort of custom rendering code (I have no idea how you'd do this for the 1.8+ rendering system, which is completely different from 1.6.4; again, looking at vanilla code is the best way to see how it is done).
Also, there is another method, Block.getRenderColor (again, using the 1.6.4 name) which returns the color used when rendering the block as an item (if you have an item which is the block itself and not a separate item, such as with doors); again, just for the parts that need to be colored.
In addition, while I don't mod newer versions I found this page that mentions that you need to add "tintindex": 1" to the model json for each face that uses a custom color, which must be hardcoded in using the "colorMultiplier" method I mentioned above, presumably this also applies to items using "getRenderColor":