# ItemBuilder

The ItemBuilder class is expansive, allowing you to customize your ItemStack in many ways in a builder environment.

There are over 30 methods in the ItemBuilder for you to use to customize your ItemStack!

<details>

<summary>Example</summary>

In this example, we make a Diamond Sword with a custom name, lore, and enchantments.

```java
ItemStack sword = new ItemBuilder(Material.DIAMOND_SWORD)
    .setName("<red>Amazing Sword") // Names are in MiniMessage format
    //.setName(Component.text("Amazing Sword")) // or alternatively in Component format
                
    .setLore("<gray>It's amazing!") // Lore is in MiniMessage format
    //.setLore(Component.text("It's amazing!")) // or alternatively in Component format

    .addEnchantment(Enchantment.DAMAGE_ALL, 5)
    .addEnchantment(Enchantment.DURABILITY, 3)
    .build();
```

</details>


---

# Agent Instructions: 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:

```
GET https://wiki.ericlmao.com/projects/alumina/itembuilder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
