> For the complete documentation index, see [llms.txt](https://harmex.gitbook.io/cobblebadges/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://harmex.gitbook.io/cobblebadges/datapack-creation/custom-badges.md).

# Custom Badges

{% hint style="info" %}
Refer to [Tutorial: Creating a data pack](https://minecraft.wiki/w/Tutorial:Creating_a_data_pack) to create the base datapack
{% endhint %}

{% hint style="info" %}
Folder Structure\
\- data/<mark style="color:$info;">\[datapack namespace]</mark>/cobblebadges/badges/<mark style="color:$info;">\[badge name]</mark>.json\
\
Badge Identifier\
\- <mark style="color:$info;">\[datapack namespace]</mark>:<mark style="color:$info;">\[badge name]</mark>

Example <mark style="color:$info;">(Bug Badge)</mark>\
\- data/<mark style="color:$info;">cobblebadges</mark>/cobblebadges/badges/<mark style="color:$info;">bug</mark>.json\
\
Badge Identifier\
\- <mark style="color:$info;">cobblebadges</mark>:<mark style="color:$info;">bug</mark>
{% endhint %}

{% hint style="info" %}
Texture Location\
\- assets/<mark style="color:$info;">\[datapack namespace]</mark>/textures/badge/<mark style="color:$info;">\[datapack namespace]</mark>/<mark style="color:$info;">\[badge name]</mark>/<mark style="color:$info;">\[rarity]</mark>.png

Example <mark style="color:$info;">(Bug Badge)</mark>\
\- assets/<mark style="color:$info;">cobblebadges</mark>/textures/badge/<mark style="color:$info;">cobblebadges</mark>/<mark style="color:$info;">bug</mark>/locked.png\
\- assets/<mark style="color:$info;">cobblebadges</mark>/textures/badge/<mark style="color:$info;">cobblebadges</mark>/<mark style="color:$info;">bug</mark>/<mark style="color:$info;">cobblebadges\_poke</mark>.png\
\- assets/<mark style="color:$info;">cobblebadges</mark>/textures/badge/<mark style="color:$info;">cobblebadges</mark>/<mark style="color:$info;">bug</mark>/<mark style="color:$info;">cobblebadges\_great</mark>.png\
\- assets/<mark style="color:$info;">cobblebadges</mark>/textures/badge/<mark style="color:$info;">cobblebadges</mark>/<mark style="color:$info;">bug</mark>/<mark style="color:$info;">cobblebadges\_ultra</mark>.png\
\- assets/<mark style="color:$info;">cobblebadges</mark>/textures/badge/<mark style="color:$info;">cobblebadges</mark>/<mark style="color:$info;">bug</mark>/<mark style="color:$info;">cobblebadges\_master</mark>.png
{% endhint %}

## Data Structure

<pre class="language-jsonc"><code class="lang-jsonc">{
  "name": "[text component]", // See <a data-footnote-ref href="#user-content-fn-1">Text Component Format</a>
  "category": "[category id]", // See <a data-footnote-ref href="#user-content-fn-2">Identifier</a> (the translation key for the category will be 'badge_category.[namespace].[path]')
  "is_hidden": [true | false], // Optional, default: false - It's name, texture and requirements will be hidden in the badge case
  "is_secret": [true | false], // Optional, default: false - The badge won't be present in the badge case until it's unlocked
  "tiers": [
    //WIP
  ]
}
</code></pre>

### Example

A badge named with the translation `key badge.cobblebadges.bug` colored with this color code: #D3D319

It will be present in the category `badge_category.cobblebadges.elemental_type`

```json
{
  "name": {
    "translate": "badge.cobblebadges.bug",
    "color": "#D3D319"
  },
  "category": "cobblebadges:elemental_type",
  "tiers": [
    //WIP
  ]
}
```

[^1]: <https://minecraft.wiki/w/Text_component_format>

[^2]: <https://minecraft.wiki/w/Identifier>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://harmex.gitbook.io/cobblebadges/datapack-creation/custom-badges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
