Data component format/custom model data
Minecraft Wiki article. Categories: Pages_using_calculator, Top-level_data_pages
📌 Mirrored from Minecraft Wiki
This article is reproduced from Data component format/custom model data on the Minecraft Wiki. Mirrored from revision 2949866. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
- [NBT Compound / JSON Object] minecraft:custom_model_data: A list of values used by items model definitions for model selection and coloring.
- [NBT List / JSON Array] floats: A list of [Float] floats for the
range_dispatchmodel type. Missing values return thefallbackmodel. - [Byte Array] flags: A list of [Boolean] booleans for the
conditionmodel type. Missing value returns theis_falsemodel. - [NBT List / JSON Array] strings: A list of [String] strings for the
selectmodel type. Missing value returns thefallbackmodel. - [NBT List / JSON Array][Int Array] colors: A list of RGB values for the
modelmodel type'stints. Missing values return thedefaultvalue provided by the item model definition. Each entry can either be a list of floats or an integer. Any provided lists automatically convert to an integer, so the component is saved as an int array.- [Int]: An RGB color code converted to a decimal number. It can be calculated from the Red, Green and Blue components using this formula:
Red<<16 + Green<<8 + BlueAn interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled. - [NBT List / JSON Array]: A list containing 3 floats corresponding to red, green, and blue values as a fraction (ranged 0 to 1, inclusive). Automatically converted to the integer format when saved.
- [Int]: An RGB color code converted to a decimal number. It can be calculated from the Red, Green and Blue components using this formula:
- [NBT List / JSON Array] floats: A list of [Float] floats for the
- [NBT Compound / JSON Object] minecraft:custom_model_data: A list of values used by items model definitions for model selection and coloring.
Sources
- Data component format/custom model data — Minecraft Wiki, CC BY-NC-SA 3.0, revision 2949866.