-
Bug
-
Resolution: Fixed
-
24w37a
-
None
-
Community Consensus
-
Commands, Textures and models
-
Normal
-
Platform
The bug
If an item that Minecraft applies color to is assigned a different model via components, the colours associated with the item ID will be applied to the target model, even if the target model has its own specified colours (or, in the case of generated-type item models, no colours specified at all).
How to reproduce
/give @s pig_spawn_egg[item_model="minecraft:birch_leaves"]
Expected results
Since birch leaves usually appear green, this item would appear green as well.
Actual results
Pink birch leaves.
How to fix
Colours should be associated with the item model in question, rather than the item ID. The hardcoded colours for things like spawn eggs, as well as the item forms of grass blocks, short/tall grass, ferns, large ferns, oak/birch/spruce/jungle/acacia/dark oak/mangrove leaves, vines and lily pads, should have this colour specified in the associated item model file (via a newly implemented parameter) rather than hardcoded. This way, the colour would not carry over from the base item ID (and would be far more customizable via resource packs).
For items such as potions, leather armor and firework stars, the color could be pointed to some built-in special cases rather than fixed color values.