Item presets
Minecraft Custom Model Data Item Command
custom_model_data is useful only when it matches a resource-pack model. This upgraded article focuses on the full workflow: choose the item, assign the model value, label the item for players, and keep custom_data available for command logic.
Preset result
A resource-pack-ready item command with a clear model id and stable data marker.
Output
Custom model data Give output
/give @p minecraft:diamond_sword[custom_name={text:"Runed Blade",color:"aqua",italic:false},lore=[{text:"Resource-pack model 1001",color:"gray",italic:false}],custom_model_data={floats:[1001]},enchantment_glint_override=true,custom_data={model_item:"runed_blade"}] 1The longest command line is 266 characters, 10 over the 256-character chat input limit. Pasting it into chat can truncate the line and make Minecraft report a syntax error even when the generated command is valid.
- Use a Command Block: run
/give @s command_block, place it, then paste this command into the block command field. - Use a
.mcfunctionfor a reusable datapack: save the line without the leading slash atsaves/<world>/datapacks/<pack>/data/<ns>/function/<name>.mcfunctionwith a minimalpack.mcmeta, run/reload, then run/function <ns>:<name>. Do not paste.mcfunctioncontent into chat.
Preset screenshot
Build the preset
- Open Give and choose the item that the resource pack remaps.
- Set custom_model_data to the value expected by the resource pack.
- Add custom_name and lore that describe the modeled item, not the base vanilla item.
- Copy the command and test with the resource pack enabled before publishing.
Model id and item identity
The same model value means nothing without the matching resource pack. Keep the model id visible in lore while testing, then remove it or replace it with player-facing text once the pack is stable.
custom_data should store the item identity separately. That lets commands detect the item without relying on the model number or display name.
Version notes
The shape of custom_model_data output depends on the selected Java version family. Use NBTForge to rebuild the item when supporting both pre-component and current component worlds.
Redirected generated pages for individual item/model combinations now point here so the site has one stronger canonical resource for this intent.
For nearby item workflows, compare the player head preset and custom name lore item preset.
- Match the model value to the resource pack.
- Keep display text readable for players.
- Use custom_data for command logic.
Fit the preset into a real project
Treat Minecraft Custom Model Data Item Command as a tested starting point, not just a copied string. After the output works once, save it with a clear Project name, note the target Minecraft version, and keep the preset near related setup commands such as scoreboard, bossbar, loot, or reset lines.
Before publishing the preset to a map, server, or command pack, run it from the copied artifact rather than only from the live workbench. That catches missing dependencies, stale selectors, wrong edition choices, and commands that only worked because local test state already existed.
- Keep the selected Edition and Version with the shared command.
- Test selectors against a harmless command before using damage, kill, clear, or teleport.
- Move long commands into Project or a function-style workflow instead of pasting them into chat.
- Recheck warnings after changing entities, item components, passengers, or datapack resources.
FAQ
Does custom_model_data create a model by itself?
No. It selects a model provided by a resource pack. The command and the resource pack must agree on the value.
Should I detect items by custom_model_data?
Prefer custom_data for logic. custom_model_data is primarily a rendering hook, while custom_data is clearer for commands.
When should this preset become part of a command pack?
Use it as a command pack entry when the output depends on setup lines, reset commands, loot resources, scoreboard state, or repeated testing. Single safe commands can still be copied directly from Output.
Open this workflow
Start from the related Give workbench, then adjust the preset fields for your world.