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

JEI

Manages all interactions between JeiTweaker plugins and JEI itself.

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.JEI;

Static Methods

Adds the given category to the list of categories shown by JEI.

Return Type: void

script.zs
JEI.addCategory(category as JeiCategory) as void
ParameterTypeDescription
Parameter
category
Type
JeiCategory
Description
The category that should be added to JEI.

Adds a description for the given JeiIngredient.

The description is defined as the text that is shown in the info box that appears as one of the recipe
categories for the queried ingredient.

Return Type: void

script.zs
JEI.addDescription(ingredient as JeiIngredient, description as Component[]) as void
ParameterTypeDescription
Parameter
ingredient
Type
JeiIngredient
Description
The ingredient to which the description should be added.
Parameter
description
Type
Component[]
Description
A series of Components identifying the description.

Adds the given JeiIngredient as a custom ingredient to be shown in JEI.

Return Type: void

script.zs
JEI.addIngredient(ingredient as JeiIngredient) as void
ParameterTypeDescription
Parameter
ingredient
Type
JeiIngredient
Description
The ingredient that should be shown in JEI.

Hides the category identified by the given category ID from displaying within JEI.

A full list of categories is available through the /ct dump jeiCategories command.

Return Type: void

script.zs
JEI.hideCategory(category as string) as void
ParameterTypeDescription
Parameter
category
Type
string
Description
The ID of the category to hide.

Hides the given JeiIngredient, so that it does not show up in JEI.

Return Type: void

script.zs
JEI.hideIngredient(ingredient as JeiIngredient) as void
ParameterTypeDescription
Parameter
ingredient
Type
JeiIngredient
Description
The ingredient that should be hidden from JEI.

Hides all JeiIngredients of a given mod, making sure that they do not show up in JEI.

Optionally, some ingredients can be excluded based on their registry name from the hiding by making use of the
Predicate.

Note, the exclusion filter works on the full registry name, unlike recipe filters which work on the path without the modid.

Return Type: void

script.zs
JEI.hideMod(modId as string, exclude as Predicate<string>) as void
ParameterTypeDescriptionOptionalDefaultValue
Parameter
modId
Type
string
Description
The mod ID of the ingredients that should be hidden.
Optional
false
DefaultValue
Parameter
exclude
Type
Predicate<string>
Description
An optional exclusion filter.
Optional
true
DefaultValue
(name as string) => {return false;}

Hides the recipe with the given name from appearing within the JEI category with the given ID.

Return Type: void

script.zs
JEI.hideRecipe(categoryId as string, recipeName as string) as void
ParameterTypeDescription
Parameter
categoryId
Type
string
Description
The ID of the category where the recipe to hide is located.
Parameter
recipeName
Type
string
Description
The name of the recipe that should be hidden from JEI.

Hides all JeiIngredients whose name matches the given regular expression.

Return Type: void

script.zs
JEI.hideRegex(regex as string) as void
ParameterTypeDescription
Parameter
regex
Type
string
Description
The regular expression that identifies ingredient names that should be hidden from JEI.