I've searched for this on the tracker and I didn't find anything, but maybe there is something like this in the forums, I don't know really.
MCreator actually needs a way to color plants and blocks (or some sides of blocks) by the grass color, just like the top of grass blocks and the full "oak leaves" block, tall_grass, ferns, and so on.
I've also trying to search how to do this in the code editor but I didn't find anything minimally related.
So, that's my suggestion. Also, a way to do this right now will be awesome.
Thank you :D
We have been asked to do this before but did not manage yet. I will keep this ticket open as there are no tickets like this yet as you said.
There is mod that contain such items as biome crystal and few biome blocks whose work like as described above. This mod is called R**d*m T*i**s and its on MIT licence. Maybe reading a source code will help you to understand, how it's work.
Nice. Do you know a way we can do this right now with the code editor?
Itchier actually is a way to do this without going into some of the nitty gritty code. In 1.12.2 at least it is done through the model. If you have access to the leaf and grass blocks you will be able to see what is done to change color based on the foliage or grass color variations.
I currently searched mainly on the grass plant block.
The code that changes the color for vanilla blocks seems to be in BlockColors.java. It applies a color multiplier on the model based on block state, block pos, world and a "tint index" value, which is located in the block model.
I don't want to create another ticket so I hope Klemen looks back to this post, the code for this can be found here:
PLEASE ADD THIS
I would like to give credit to SomeoneElse for providing the link in his mod's topic forum.
The ticket is open and we plan this. Thanks for the code example, although it is for 1.7.2 so I hope it is still relevant :)
The code still works for 1.12.2, I tested it
I made an example workspace with a possible implementation of the colorizer code and commented code. There's probably some better way to do this, but hopefully it helps anyway.
Example workspace download:
Thank you for your info! :)
I've made the same stuff for a block, that should be colored in water colors (currently I'm using it for the plant growing in water).It is based on your colorizer implementation.It works well=)
Here are the peaces of code I changed:
in the block class
and registered colors, creating "custom element" - so it will not be deleted automatically, as from the ClientProxy, in it's initialization stage like this:
The custom block model has tintindexes set to 1 on the sides of the "water" part .
Maybe that will be useful for someone looking for water colors=)
Thank you for providing your example code :)
Would this code work for 1.14?
Will this feature be implimented for 2020.2?
Stop bumping supermj767, this is TOS violation. You have an upvote button for this reason.
I'm sorry i didn't know this wasn't allowed.
In this case check https://mcreator.net/wiki/general-publishing-guidelines
Migrated to https://github.com/MCreator/MCreator/issues/140
SO now is the function in MCreater called Block Tint. Can i change this Tint Color by Procedure?
Wish Great Day