Table of Contents

minecraft:dye

The minecraft:dye item modifier dyes an item stack with a random dye based on each entry's chance. Whether it applies one dye color or not does not affect any of the remaining chances. It dyes the item stack the same way it dyes leather armor in the armor dye recipe. If the item does not have the minecraft:dyeable item component or if no dye colors were picked, no changes are made.

Fields

Name Description Type Default Value
chances The chances to apply a random dye color. A list of floats ranging from 0.0 to 1.0 inclusive.

Example

{
  "function": "minecraft:dye",
  "chances": [
    1.0,
    0.3,
    0.2
  ]
}