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
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 don't want to create another ticket so I hope Klemen looks back to this post, the code for this can be found here:
http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-modding-quick-tips.html
PLEASE ADD THIS
I would like to give credit to SomeoneElse for providing the link in his mod's topic forum.
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:
https://drive.google.com/open?id=1VxoSuBExCjv7c4tdWxHMW4NpueU5c6zr
https://mcreator.net/tracker/issue/56064
It would be nice to use a grey color as texture for a block which then gets colored by the biomes color (like gras/ leaves)
Hope this helps:
https://www.minecraftforge.net/forum/topic/63956-112-make-custom-grass-…
https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/co…
Hello,
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
@Override
public MapColor getMapColor(IBlockState state, IBlockAccess blockAccess, BlockPos pos) {
return MapColor.WATER;
}
@SideOnly(Side.CLIENT)
public static class TintedBlockColors implements IBlockColor {
public static final IBlockColor INSTANCE = new TintedBlockColors();
@Override
public int colorMultiplier(IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex) {
return worldIn != null && pos != null ? BiomeColorHelper.getWaterColorAtPos(worldIn, pos) : -1;
}
public static void registerBlockColors() {
// DEBUG
System.out.println("Registering block color handler (water)");
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(INSTANCE, block);
}
}
and registered colors, creating "custom element" - so it will not be deleted automatically, as from the ClientProxy, in it's initialization stage like this:
@Override
public void init(FMLInitializationEvent event) {
MCreatorUNplantLotusBottom.TintedBlockColors.registerBlockColors();
}
}
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=)
Stop bumping supermj767, this is TOS violation. You have an upvote button for this reason.
In this case check https://mcreator.net/wiki/general-publishing-guidelines
Migrated to https://github.com/MCreator/MCreator/issues/140
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.