Copy accurate /give commands across every major Minecraft syntax era: Java 1.13-1.21.5+ item components, TaCZ 1.20.1 NBT vs 1.21.1 NeoForge custom_data, and Bedrock Edition add-on items.
Vanilla Java Edition /Give Syntax Across 1.13 To 1.21.5+
Vanilla Java Edition does not include native firearm mechanics, so command-based and datapack gun systems disguise a vanilla base item (most commonly minecraft:crossbow or minecraft:carrot_on_a_stick) with a custom 3D model from a resource pack. However, Java's /give syntax changed sharply four times between 1.20.4 and 1.21.5, which breaks copied commands if you mix versions.
Before 1.20.5, item data lived inside curly-brace NBT tags ({CustomModelData:1001}). Starting in 1.20.5, Mojang replaced NBT with square-bracket item components ([...]). In 1.21.2, minecraft:item_model arrived so you can point straight at a custom model without overriding a vanilla item. In 1.21.4, minecraft:custom_model_data changed from a single integer into a structured compound ({floats:[1001],strings:["ak47"]}). Finally, in 1.21.5+, text components like custom_name and lore switched from quoted JSON strings to unquoted SNBT compounds.
# Java 1.21.5+ (SNBT text components + structured custom_model_data)
/give @p minecraft:crossbow[minecraft:custom_model_data={floats:[1001]},minecraft:custom_name={text:"AK-47",color:"gold",italic:false},minecraft:unbreakable={},minecraft:max_stack_size=1]
# Java 1.20.5 - 1.21.1 (item components + integer custom_model_data)
/give @p minecraft:crossbow[minecraft:custom_model_data=1001,minecraft:custom_name='{"text":"AK-47","color":"gold","italic":false}',minecraft:unbreakable={},minecraft:max_stack_size=1]
# Java 1.13 - 1.20.4 (legacy NBT)
/give @p minecraft:crossbow{CustomModelData:1001,display:{Name:'{"text":"AK-47","color":"gold","italic":false}'},Unbreakable:1b}| Java Version | Model Selector Component | Custom Name Format | Resource Pack Wiring |
|---|---|---|---|
1.13 - 1.20.4 | {CustomModelData:1001} | display:{Name:'{"text":"AK-47","italic":false}'} | models/item/<id>.json (overrides) |
1.20.5 - 1.21.1 | [minecraft:custom_model_data=1001] | minecraft:custom_name='{"text":"AK-47","italic":false}' | models/item/<id>.json (overrides) |
1.21.2 - 1.21.3 | minecraft:item_model="mypack:ak47" or integer custom_model_data | Quoted JSON string | models/item/<id>.json |
1.21.4 | minecraft:custom_model_data={floats:[1001]} or item_model | Quoted JSON string | assets/<ns>/items/<id>.json (range_dispatch) |
1.21.5+ | minecraft:custom_model_data={floats:[1001]} or item_model | SNBT {text:"AK-47",color:"gold",italic:false} | assets/<ns>/items/<id>.json (range_dispatch) |
Matching Resource Pack Files For 1.21.4+ Vs Older Java
A /give command with custom_model_data only works when your resource pack maps that number to a gun model. On Java 1.21.4 and newer, Mojang retired overrides inside models/item/ in favor of Item Model Definitions stored under assets/<namespace>/items/<id>.json. You can either use a minecraft:range_dispatch switcher on minecraft:custom_model_data or reference a dedicated item model directly via minecraft:item_model="mypack:ak47".
// Java 1.21.4+ resource pack: assets/minecraft/items/crossbow.json
{
"model": {
"type": "minecraft:range_dispatch",
"property": "minecraft:custom_model_data",
"index": 0,
"fallback": { "type": "minecraft:model", "model": "minecraft:item/crossbow" },
"entries": [
{
"threshold": 1001,
"model": { "type": "minecraft:model", "model": "mypack:item/ak47" }
}
]
}
}TaCZ /Give Commands: 1.20.1 Forge Vs 1.21.1 NeoForge
Timeless and Classics Zero (TaCZ) stores every firearm under a shared base item ID - tacz:modern_kinetic_gun - and identifies the actual weapon using the GunId tag (namespace:key). Ammunition uses tacz:ammo with AmmoId, and attachments use tacz:attachment with AttachmentId.
Pay close attention to your Minecraft version: TaCZ on 1.18.2 - 1.20.1 (Forge) reads direct {...} NBT tags, whereas TaCZ on 1.21.1 (NeoForge) wraps the exact same keys inside [minecraft:custom_data={...}]. Optional gun keys include GunCurrentAmmoCount (loaded magazine count), GunFireMode ("AUTO", "SEMI", or "BURST"), and HasBulletInBarrel:1b (places a chambered round ready to fire).
# TaCZ 1.18.2 - 1.20.1 (Forge NBT)
/give @p tacz:modern_kinetic_gun{GunId:"tacz:ak47",GunCurrentAmmoCount:30,GunFireMode:"AUTO",HasBulletInBarrel:1b}
/give @p tacz:ammo{AmmoId:"tacz:762x39"} 60
/give @p tacz:attachment{AttachmentId:"tacz:scope_acog_ta31"}
# TaCZ 1.21.1 (NeoForge data components)
/give @p tacz:modern_kinetic_gun[minecraft:custom_data={GunId:"tacz:ak47",GunCurrentAmmoCount:30,GunFireMode:"AUTO",HasBulletInBarrel:1b}]
/give @p tacz:ammo[minecraft:custom_data={AmmoId:"tacz:762x39"}] 60
/give @p tacz:attachment[minecraft:custom_data={AttachmentId:"tacz:scope_acog_ta31"}]Bedrock Edition /Give Commands For Gun Add-Ons
Bedrock Edition has no CustomModelData or custom-name /give tag. You cannot turn a vanilla crossbow into a 3D rifle using a Bedrock command alone: you must first install and activate a gun Behavior Pack + Resource Pack on the world, and then grant the add-on's registered namespace:item identifier.
Bedrock's /give command accepts a count, a data value (0), and an optional JSON component object limited strictly to four keys: keep_on_death, item_lock (lock_in_inventory or lock_in_slot), can_place_on, and can_destroy. Locking guns to a slot with keep_on_death is ideal for Bedrock PvP arenas.
# Standard Bedrock add-on gun
/give @p myguns:ak47 1 0
# PvP kit gun that stays in its hotbar slot and survives death
/give @p myguns:ak47 1 0 {"keep_on_death":{},"item_lock":{"mode":"lock_in_slot"}}Build Commands Automatically With The Command Generator
Rather than debugging brackets and quotes by hand, open /tools/command/ to build error-free /give commands for Java 1.13 through 1.21.5+, TaCZ 1.20.1 and 1.21.1, or Bedrock Edition. You can search any gun in the catalog (or load your own gun pack zip) to auto-fill exact IDs, magazine counts, and fire modes, and automatically copy the matching Java resource pack JSON alongside the command.
- Confirm your Minecraft version and whether your target gun mod uses legacy NBT tags (
1.20.1) or modern data components (1.20.5+). - Look up the exact gun ID (for example
tacz:modern_kinetic_gunwith itsGunIdtag) on the weapon detail page or in/tools/command/. - Set optional fields such as loaded ammo count, fire mode, and pre-installed attachments inside the command builder.
- Copy the generated
/givecommand into chat, a command block, or a.mcfunctionkit file and test it on a creative world.
Common Mistakes & Fixes
- Using Legacy NBT Braces on Java 1.20.5+ or TaCZ 1.21.1: On Java 1.20.5+,
{...}item NBT is rejected as a syntax error. Switch to square-bracket item components, and for TaCZ 1.21.1 NeoForge wrapGunIdinside[minecraft:custom_data={...}]. - Passing an Integer to custom_model_data on Java 1.21.4+: Java 1.21.4 turned
minecraft:custom_model_datainto a structured compound. Replaceminecraft:custom_model_data=1001withminecraft:custom_model_data={floats:[1001]}(and update your resource pack toassets/<ns>/items/<id>.json). - Wrapping custom_name in Single Quotes on Java 1.21.5+: Java 1.21.5 parses
custom_nameandloreas SNBT rather than quoted JSON strings. Changeminecraft:custom_name='{"text":"AK-47"}'tominecraft:custom_name={text:"AK-47",italic:false}. - Trying to Pass NBT Tags or Custom Names in Bedrock /give: Bedrock
/giverejects Java-style NBT and custom display names. Install your gun add-on first, then give itsnamespace:itemID using only supported components (keep_on_death,item_lock,can_place_on,can_destroy).
Frequently Asked Questions
Where do I find the exact GunId for a gun inside a TaCZ pack?
Open the weapon's page on /guns/ or drop the pack .zip into /viewer/ - the exact namespace:key ID (such as tacz:ak47) is shown in the header and matches the filename inside data/<ns>/index/guns/.
How do I give a TaCZ gun that is already loaded and chambered?
Include both GunCurrentAmmoCount:<mag_size> and HasBulletInBarrel:1b inside the gun NBT (1.20.1) or minecraft:custom_data component (1.21.1).
Why does a vanilla /give gun command show a normal crossbow instead of my 3D gun?
The resource pack is either not enabled, targets the wrong Java format (overrides vs 1.21.4+ items/*.json), or uses a different CustomModelData threshold number than your /give command.
Can I use /give commands in command blocks for automatic PvP loadouts?
Yes. Replace @p with @a[tag=team_red] or @p on a kit button, and run one command block per item (primary gun, sidearm, ammo stacks, and attachments).