Skip to content
Fractial edited this page Jul 13, 2025 · 1 revision

📦 Welcome to the Codec Wiki!

🔨 How to Create a Custom Item

✅ Step 1: Generate the Item JSON

  1. Visit [Misode's Recipe Generator](https://misode.github.io/recipe/).
  2. Focus only on the result field while creating your item.
  3. Once generated, extract just the result section from the JSON. For example:
{
  "id": "minecraft:apple",
  "count": 1,
  "components": {
    "minecraft:rarity": "epic",
    "minecraft:item_name": "Cool Apple",
    "minecraft:item_model": "my_pack:cool_apple"
  }
}
  • id: The base Minecraft item your custom item is based on
  • count (optional): How many items are given—usually best to leave it as 1
  • components: Customizes your item with name, rarity, model, and more

📁 Step 2: Save and Place Your JSON File

Save your item JSON (e.g., cool_apple.json) inside the plugin folder using the following structure:

codec/<namespace>/items/<your_item>.json

Example:

codec/my_pack/items/cool_apple.json

🎨 Step 3 (Optional): Add a Resource Pack

To give your item a custom texture or model, add a resource pack to your server that includes the model referenced by your item:

"minecraft:item_model": "my_pack:cool_apple"

Make sure your resource pack uses the same namespace (my_pack in this case).


✨ Step 4: Spawn the Item In-Game

Use the /cast command to give yourself the item:

/cast <selector> <item> [<count>]

Example:

/cast @s my_pack:cool_apple 1
  • <count> is optional and defaults to 1 if not specified.