# Requirement display info

A requirement display info is a small icon that show up in jei recipe jei to provide the player various information about the recipe.

The display info can use any item, texture or sprite and have a list of tooltips that will be displayed when the player hover it with its mouse cursor.

Example : The [Structure requirement](/custom-machinery-1.19/recipes/requirements/structure.md) add by default a structure block icon with a tooltip indicating the list of required blocks to build the structure.

![](/files/KI6MtBdebzwv5cS2GWyW)

You can override the default display info of any requirements, or create a new one for requirements that doesn't have a default one.

A custom display info won't override the click behavior of a default display info, like the structure requirement that let you click on the icon to show the structure.

{% hint style="warning" %}
Each requirements can have only 1 display info.
{% endhint %}

### Tooltip

A display info can have a list of tooltips specified. If the requirement have a default tooltip it will be overriden.

The tooltip is essentially a list of [Text components](/custom-machinery-1.19/misc/text-component.md). Each component in the list will be a new line in the tooltip.

```json
"info": {
    "tooltips": [
        "Some tooltips",
        {"text": "Some tooltip in red", "color": "red"}
    ]
}
```

### Icon

There are 3 ways to define a display info icon : item, texture and sprite (animated texture).

If you don't specify an icon this default green + icon will be used.

![](/files/oRWz4e78bOgxjgxElnhD)

#### Item

Simply provide the id of the item to show as icon.

Example : Show a diamond as icon

```json
"info": {
    "item": "minecraft:diamond"
}
```

#### Texture

Simply provide the path to the texture file, the texture MUST be in a loaded resourcepack (Openloader or KubeJS work well for that) and the .png extension is necessary.

You can also specify the width/height of the texture (default 10px) and the u/v of the texture (default 0).

Example :&#x20;

```json
"info": {
    "icon": "custommachinery:textures/gui/creation/create_icon.png"
}
```

#### Sprite

A sprite is essentialy a texture that is stitched into a Minecraft texture atlas, allowing the use of animated textures.

Simply specify the id of the atlas and the id of the texture.

Example : Use the purple nether portal block

```json
"info": {
    "atlas": "minecraft:textures/atlas/blocks.png",
    "sprite": "minecraft:block/nether_portal"
}
```

### Example

Add a diamond icon with a tooltip :&#x20;

```json
{
    //other requirement properties
    "info": {
        "item": "minecraft:diamond",
        "tooltips": ["This recipe make diamonds"]
    }
}
```

![](/files/S2OL4yjiO3mBjoobp9ao)


---

# 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://frinn.gitbook.io/custom-machinery-1.19/misc/requirement-display-info.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.
