Repository navigation
1.20.1 Getting Started
hp-1e edited this page Nov 3, 2026
·
1 revision
English | 中文
- Install JEI 15.x, KubeJS 2001, Rhino and Architectury (Forge 47+).
- Put the JEI KubeJS jar in
mods/. - Install it on the client. On a server it is optional: install it there only if your scripts use
recipe.json()in multiplayer (see Recipes). Once a server has it, every player needs it too.
Put scripts in kubejs/client_scripts/. Both events (registerCategories and registerRecipes) are client events and do nothing in server_scripts or startup_scripts.
// kubejs/client_scripts/altar.js
JEIKubeJSEvents.registerCategories(event => {
event.create('mypack:altar', cat => cat
.title(Text.of('Altar'))
.icon('minecraft:enchanting_table')
.size(120, 40)
.inputSlot('in', 10, 12)
.outputSlot('out', 95, 12)
.arrow(50, 12, 100)
.catalyst('minecraft:enchanting_table'))
})
JEIKubeJSEvents.registerRecipes(event => {
event.add('mypack:altar', r => r
.slot('in', 'minecraft:diamond')
.stack('out', '2x minecraft:nether_star'))
})Enter a world, hover a diamond and press R, or hover an enchanting table and press U. The "Altar" page opens.
How it fits together:
-
registerCategoriesdefines what a page looks like. Each category has an id (mypack:altar), a size and named slots. -
registerRecipesfills pages with content. Each recipe names its category and puts items into slots by name. - Coordinates are in pixels from the top-left corner of the category.
- Press F3+T to reload client scripts.
- Run
/reload(or rejoin the world) so JEI rebuilds its pages.
In single player, /kubejs reload client_scripts alone does not rebuild JEI. Use the two steps above.
- Categories for every category option
- Recipes to turn an existing recipe type (for example one added by a datapack) into a JEI page