Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

JeiRecipeGraphics

Allows a JeiRecipe to request additional graphic capabilities to its parent JeiCategory.

Support for the various methods available depends on the category to which the recipe is being added to. Refer to the category documentation for more information. Namely, categories need not support nor acknowledge any of the requests specified by a recipe if they do not desire to do so.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import mods.jei.recipe.JeiRecipeGraphics;

Methods

Sets the tooltip identified by the given key to the given set of components.

Return Type: void

script.zs
JeiRecipeGraphics.addTooltip(key as string, lines as Component[]) as void
ParameterTypeDescription
Parameter
key
Type
string
Description
The key that identifies the tooltip.
Parameter
lines
Type
Component[]
Description
The components that make up the tooltip.

Asks the category to render a tooltip with the given components as lines when the cursor is in the active area indicated by the given coordinates and with the given width and height.

Return Type: void

script.zs
JeiRecipeGraphics.addTooltip(x as int, y as int, activeAreaWidth as int, activeAreaHeight as int, lines as Component[]) as void
ParameterTypeDescription
Parameter
x
Type
int
Description
The x coordinate of the top-left corner of the active area rectangle.
Parameter
y
Type
int
Description
The y coordinate of the top-left corner of the active area rectangle.
Parameter
activeAreaWidth
Type
int
Description
The width of the active area rectangle.
Parameter
activeAreaHeight
Type
int
Description
The height of the active area rectangle.
Parameter
lines
Type
Component[]
Description
The components that make up the tooltip.

Sets the value of the extra component identified by the given key to the component specified.

Return Type: void

script.zs
JeiRecipeGraphics.setExtraComponent(key as string, component as Component) as void
ParameterTypeDescription
Parameter
key
Type
string
Description
The key that identifies the extra component.
Parameter
component
Type
Component
Description
The component to set.

Shows a shapeless marker for the current recipe, if possible.

Return Type: void

script.zs
// JeiRecipeGraphics.showShapelessMarker() as void
myJeiRecipeGraphics.showShapelessMarker();