Invalid leaf directive! `since`

Identifies a custom recipe category shown in JEI when querying a specific ingredient.

A JEI category is identified by four major components: an id, a name, an icon, and a series of catalysts.

The ID is a unique name that is used by JEI to identify the category, in the form of a MCResourceLocation. With JeiTweaker, you have control only on the path portion of the location, whereas the ID is fixed to the one that represents the JeiTweaker mod.

The name is a MCTextComponent which identifies the category. It can be considered the human-friendly version of the category ID. More than one category can have the same name, although this is discouraged as a matter of clarity towards the player.

The icon is a JeiDrawable that is used as a graphic counterpart to the name, following the same rules. The icon is rendered on the top section of the JEI user interface. An example icon could be the crafting table for the minecraft:crafting category, or the furnace for the minecraft:furnace category.

Last but not least, the catalysts are a series of JeiIngredients that indicate where the recipe can be crafted. They appear on the left side of the JEI user interface, in a recessed rectangle. An example set of catalysts for the minecraft:crafting category could be all crafting tables, modded or otherwise. The set of catalysts might or might not contain the icon.

Moreover, each JeiTweaker category additionally specifies a background, which is used to provide a default background for recipes.For mod developers looking to create additional categories: each category is automatically discovered and registered by JeiTweaker as long as it extends JeiCategory and is annotated with both com.blamejared.crafttweaker.api.annotations.ZenRegister and org.openzen.zencode.java.ZenCodeType.Name. To be correctly registered, the class must not be abstract (preferably, it should be final) and it must have a constructor with the following signature: public ClassName(ResourceLocation, MCTextComponent, JeiDrawable, RawJeiIngredient...). Any other class is not going to be registered. Due to these requirements, mod developers are strongly encouraged not to implement this interface directly, but rather extend SimpleJeiCategory instead.

This class was added by a mod with mod-id jeitweaker. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.

Importare la Classe

Link to importare-la-classe

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.

ZenScript
Copy
import mods.jei.category.JeiCategory;

Name: create

Creates a new category of the specified type, with the given parameters, configuring it to defaults.

Returns: The newly created category.
Return Type: JeiCategory

ZenScript
Copy
JeiCategory.create<T : JeiCategory>(id as string, name as MCTextComponent, icon as JeiDrawable, catalysts as JeiIngredient[]) as JeiCategory
ParametroTipoDescrizione
Parametro
id
Tipo
string
Descrizione
The ID of the category to create.
Parametro
nome
Tipo
MCTextComponent
Descrizione
A MCTextComponent representing the name of the category.
Parametro
icon
Tipo
JeiDrawable
Descrizione
A JeiDrawable that acts as the icon for the category.
Parametro
catalysts
Tipo
JeiIngredient[]
Descrizione
An array of JeiIngredient acting as catalysts for the category. It must not be empty.
Parametro
T
Tipo
JeiCategory
Descrizione
The type of the category to create. It must extend JeiCategory.

Name: create

Creates a new category of the specified type, with the given parameters, and with the given function as a
configurator.

Returns: The newly created category.
Return Type: JeiCategory

ZenScript
Copy
JeiCategory.create<T : JeiCategory>(id as string, name as MCTextComponent, icon as JeiDrawable, catalysts as JeiIngredient[], configurator as Consumer<T>) as JeiCategory
ParametroTipoDescrizione
Parametro
id
Tipo
string
Descrizione
The ID of the category to create.
Parametro
nome
Tipo
MCTextComponent
Descrizione
A MCTextComponent representing the name of the category.
Parametro
icon
Tipo
JeiDrawable
Descrizione
A JeiDrawable that acts as the icon for the category.
Parametro
catalysts
Tipo
JeiIngredient[]
Descrizione
An array of JeiIngredient acting as catalysts for the category. It must not be empty.
Parametro
configurator
Tipo
Consumer<T>
Descrizione
A Consumer<T> allowing configuration of the category as it gets built.
Parametro
T
Tipo
JeiCategory
Descrizione
The type of the category to create. It must extend JeiCategory.
NomeTipoHa GetterHa SetterDescrizione
Nome
background
Tipo
JeiDrawable
Ha Getter
Ha Setter
no
Descrizione
Gets the JeiDrawable that serves as the background for recipes of this category.
Nome
catalysts
Tipo
JeiIngredient[]
Ha Getter
Ha Setter
no
Descrizione
Gets the lists of catalysts currently registered to this category.
Nome
icon
Tipo
JeiDrawable
Ha Getter
Ha Setter
no
Descrizione
Gets the JeiDrawable that acts as the icon for this category.
Nome
id
Tipo
MCResourceLocation
Ha Getter
Ha Setter
no
Descrizione
Gets the ID of the category.
Nome
nome
Tipo
MCTextComponent
Ha Getter
Ha Setter
no
Descrizione
Gets the name of the category.