Skip to content

1.20.1 Getting Started

hp-1e edited this page Nov 3, 2026 · 1 revision

English | 中文

Getting Started (1.20.1 Forge)

Install

  1. Install JEI 15.x, KubeJS 2001, Rhino and Architectury (Forge 47+).
  2. Put the JEI KubeJS jar in mods/.
  3. 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.

Where scripts go

Put scripts in kubejs/client_scripts/. Both events (registerCategories and registerRecipes) are client events and do nothing in server_scripts or startup_scripts.

Your first category

// 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:

  • registerCategories defines what a page looks like. Each category has an id (mypack:altar), a size and named slots.
  • registerRecipes fills 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.

Reloading after an edit

  1. Press F3+T to reload client scripts.
  2. 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.

Next

  • Categories for every category option
  • Recipes to turn an existing recipe type (for example one added by a datapack) into a JEI page

Clone this wiki locally