KubeJEI: Advanced JEI Support for KubeJS Scripting
Modpack developers who work with KubeJS know the frustration of hitting a wall when it comes to customizing Just Enough Items. Vanilla JEI plugins require Java knowledge and a full mod build, which slows down iteration and makes quick tweaks painful. KubeJEI changes that equation entirely by redirecting everything a JEIPlugin can do into the KubeJS event system, so you can script custom categories, filter recipes, and render complex ingredients without ever leaving your scripts folder.
What KubeJEI Actually Does
At its core, KubeJEI exposes the full JEI plugin API through KubeJS events. Instead of writing a separate mod, you register categories, recipes, ingredients, and GUI handlers directly in JavaScript. The add-on supports Minecraft 1.16 through 1.21.1, with NeoForge as the primary loader for modern versions and Forge for older packs. Note that all 1.4.0+ builds require Rhizo instead of Rhino, since Rhino for Minecraft 1.16 has been end-of-life for a long time and lacks the features needed for proper JSDoc generation.
Denying Categories and Recipes Early
One of the standout features is the ability to deny categories and recipes before JEI finishes loading. By filtering them early rather than hiding them after everything is registered, almost all related computations get eliminated. This means less memory overhead and faster load times on large packs.
- KubeJEIEvents.denyCategory removes an entire category and its recipes at once
- KubeJEIEvents.denyRecipe with denyAllInCategory clears every recipe inside a given category
- Early filtering avoids the performance cost of post-load hiding
Building Custom JEI Categories
Creating a custom category is where KubeJEI really shines. You define a recipe array, register the category through KubeJEIEvents.registerCategories, and use the provided helpers to set icons, backgrounds, and slot layouts. The guiHelper object gives you methods like createDrawableItemStack and createBlankDrawable, while compound IDrawable helpers let you combine multiple drawables into one visual element.
Entity rendering support is built in as well, so you can display mobs or other entities as recipe ingredients. Custom tick timers keep animations running smoothly inside your category screens. The recipeSetHandler and drawHandler objects handle slot population and custom graphics, letting you draw flames, arrows, or any texture you need.
KubeJEIEvents.registerCategories(event => {
const helpers = event.registration.jeiHelpers
event.custom("my:example_category", builder => {
builder.icon = helpers.guiHelper.createDrawableItemStack("minecraft:gold_ingot")
builder.title = Component.literal("Random Conversion")
})
})
How to Install KubeJEI
Installation follows the standard add-on pattern. If you want to download KubeJEI, grab the jar matching your Minecraft version and loader from the project page, then drop it into your mods folder alongside JEI, KubeJS, and Architectury. Launch the game once to generate config files, then start writing scripts in the server_scripts or client_scripts directory depending on where your logic belongs.
For players who prefer a smoother setup, the foxygame.net launcher handles KubeJEI installation in a single click and keeps it updated automatically whenever a new build drops. The launcher also checks version compatibility against your installed loader, so you never end up with a mismatched jar that crashes on startup.
The /kube_jei reload command is a shortcut that reloads both KubeJS and JEI together, which saves a tremendous amount of time during development. Instead of restarting the client after every script change, you run one command and see your updates immediately.
Available Events
- kube_jei.register_categories and kube_jei.register_recipes for core content
- kube_jei.register_ingredients and kube_jei.register_item_subtypes for custom ingredient types
- kube_jei.register_gui_handlers and kube_jei.register_recipe_transfer_handlers for interaction logic
- kube_jei.deny.categories and kube_jei.deny.recipes for early filtering
- kube_jei.register_advanced for low-level plugin access
Final Thoughts
KubeJEI removes the barrier between KubeJS scripting and deep JEI customization. Whether you are building a total conversion pack with entirely new recipe categories or simply want to trim unwanted entries from the recipe list, this add-on gives you the tools without requiring a compiled mod. For anyone serious about KubeJEI for Minecraft modpack development, it belongs in the toolkit.