Modern namespaced IDs are recommended. This numerical form is only for old Java releases.
/give @p 312 1
Give command syntax by version
Java 1.13+
/give @p minecraft:diamond_leggings 1
Namespaced ID (current format)
Java 1.8–1.12.2
/give @p 312 1 0
Numerical ID + data value
Bedrock Edition
/give @p minecraft:diamond_leggings 1
Same namespaced ID (namespace optional)
Rows appear only when the underlying value is verified: the Java 1.8–1.12.2 row requires a reviewed historical numerical ID, and the Bedrock row appears only when this exact namespaced ID exists in the Bedrock registry.
How to Get Diamond Leggings
Crafting Recipe
Diamond
Diamond
Diamond
Diamond
Diamond
Diamond
Diamond
Crafting table recipe — makes 1 × Diamond Leggings.
Diamond Leggings in Minecraft: Crafting and Upgrading
Quick answer: Use minecraft:diamond_leggings in modern Java commands. Craft diamond leggings from 7 diamonds for 6 armor points and 2 armor toughness, then upgrade them to netherite at a smithing table to keep your enchantments.
The middle child of diamond armor
Diamond leggings cost 7 diamonds and give 6 armor points plus 2 toughness — second only to the chestplate in protection per piece. A full diamond set totals 20 armor points and 8 toughness, which is the classic pre-netherite endgame armor.
Craft them on a crafting table with the standard leggings pattern: diamonds in every slot except the middle of the bottom row. Enchant on the table or with books — Protection IV, Unbreaking III, and Mending are the default trio, and Swift Sneak III goes on leggings specifically.
Recipe: 7 diamonds, leggings pattern.
Stats: 6 armor points + 2 toughness.
Leggings-exclusive enchant: Swift Sneak (ancient city chests).
Upgrading to netherite without losing enchantments
Do not craft netherite leggings from scratch — upgrade. At a smithing table, combine diamond leggings with a netherite upgrade smithing template (duplicated from bastion loot) and one netherite ingot. The result keeps every enchantment and the item's name.
Netherite leggings add one more armor point, more toughness, and knockback resistance, and the item survives lava. The same upgrade path applies to every diamond armor piece and tool.
Diamond Leggings Command Examples
Give 1 to nearest player: /give @p minecraft:diamond_leggings 1
Give 1 to yourself: /give @s minecraft:diamond_leggings 1
Give to a specific player: /give PlayerName minecraft:diamond_leggings 1
Clear from inventory: /clear @p minecraft:diamond_leggings
Compatible Enchantments for Diamond Leggings
Diamond Leggings can receive these enchantments from an enchanting table or anvil. Some of them are mutually exclusive; each enchantment page lists its incompatible partners.
The item ID for Diamond Leggings is minecraft:diamond_leggings. Java Edition commands such as /give, /clear, and /setblock use this namespaced ID.
What is the numerical ID for Diamond Leggings?
Diamond Leggings has the historical numerical ID 312, used in Java Edition 1.12.2 and earlier. Current versions use minecraft:diamond_leggings instead.
How do I give myself Diamond Leggings in Minecraft?
Open the chat window and run /give @p minecraft:diamond_leggings 1 to give the nearest player one Diamond Leggings. Replace @p with a player name to target someone else.
How do you craft Diamond Leggings?
Diamond Leggings is crafted on a crafting table with 7 diamonds, which yields 1 Diamond Leggings.
How many diamonds do leggings cost?
Seven — more than boots or helmet (4–5), fewer than the chestplate (8).
Do you lose enchantments when upgrading to netherite?
No. The smithing table upgrade keeps all enchantments and the item's custom name. You need a netherite upgrade template from a bastion remnant plus one netherite ingot.
What enchantments go on leggings?
Protection IV, Unbreaking III, and Mending as the base — plus Swift Sneak III, which only goes on leggings and comes from ancient city chests.