Custom
Link to custom
Identifies a fully free-form JEI category, which allows custom background, drawable, and slot placement.
Importing the class
Link to 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.
ZenScript Copyimport mods.jei.category.Custom;
Extending SimpleJeiCategory
Link to extending-simplejeicategory
Custom extends SimpleJeiCategory. That means all methods available in SimpleJeiCategory are also available in Custom
Methods
Link to methods
Name: addDrawable
Places a new JeiDrawable at the given coordinates.
Return Type: void
ZenScript CopyCustom.addDrawable(x as int, y as int, drawable as JeiDrawable) as void
Parameter | Type | Description |
---|---|---|
Parameter x | Type int | Description The x coordinate where the drawable should be placed. |
Parameter y | Type int | Description The y coordinate where the drawable should be placed. |
Parameter drawable | Type JeiDrawable | Description The drawable to add. |
Name: addSlot
Places a new slot to this recipe with the given index at the specified coordinates.
Return Type: void
ZenScript CopyCustom.addSlot(index as int, x as int, y as int, isInput as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter index | Type int | Description The slot index. Must be unique. |
Parameter x | Type int | Description The x coordinate where the slot should be placed. |
Parameter y | Type int | Description The y coordinate where the slot should be placed. |
Parameter isInput | Type boolean | Description Whether the slot is an input (true ) or an output (false ) slot. |
Name: addText
Adds a new text area that appears at the given coordinates.
The added text area is global, meaning it appears in all recipes the same way.
Return Type: void
ZenScript CopyCustom.addText(x as int, y as int, text as Component) as void
Parameter | Type | Description |
---|---|---|
Parameter x | Type int | Description The x coordinate where the text should appear. |
Parameter y | Type int | Description The y coordinate where the text should appear. |
Parameter texto | Type Component | Description The text that should appear. |
Name: addTooltip
Adds a new tooltip that appears when the mouse is in a rectangle active area of width w
and height h
at the specified coordinates with the given text.
The tooltip is global, meaning it appears in all recipes with the same text.
Return Type: void
ZenScript CopyCustom.addTooltip(x as int, y as int, w as int, h as int, text as Component[]) as void
Parameter | Type | Description |
---|---|---|
Parameter x | Type int | Description The x coordinate of the top-left corner of the active area. |
Parameter y | Type int | Description The y coordinate of the top-left corner of the active area. |
Parameter w | Type int | Description The width of the rectangle that determines the active area. |
Parameter h | Type int | Description The height of the rectangle that determines the active area. |
Parameter texto | Type Component[] | Description A list of Components indicating the text that should be present in the tooltip. |
Properties
Link to properties
Nombre | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Nombre background | Type void | Has Getter false | Has Setter true | Description Sets the JeiDrawable which acts as the background of this category. |
Nombre canHaveShapelessMarker | Type void | Has Getter false | Has Setter true | Description Sets whether recipes in this category can be marked as shapeless. |