Option for plants and blocks to colorize by foliage color.

Published by aidanete on Mon, 10/07/2019 - 14:16
Upvotes: 9
Issue description

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

 

Issue comments

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.

Hi Klemen.

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.

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. 

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.