Requirement display info
Customize the display info of any requirement
Customize the display info of any requirement
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 add by default a structure block icon with a tooltip indicating the list of required blocks to build the structure.
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.
Each requirements can have only 1 display info.
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. Each component in the list will be a new line in the tooltip.
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.
Simply provide the id of the item to show as icon.
Example : Show a diamond as icon
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 :
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
Add a diamond icon with a tooltip :