截图
介绍
中文介绍正在准备中,下面暂时显示原文。
KubeJEI
provides advanced JEI support for KubeJS, allowing devs to do basically anything a JEIPlugin can do.
Features:
- Everything in a
JEIPluginredirected to KubeJS via events - Custom JEI category
- Events for “denying” categories and recipes. By filtering them early, instead of hiding them after everything is loaded, almost all related computations can be eliminated.
- Helpers for creating compound
IDrawables, entity rendering, and custom tick timer /kube_jei reloadcommand shortcut for reloading KubeJS & JEI
Examples (2.0.0 for 1.21.1 neoforge)
Deny a category, together with all recipes for it:
KubeJEIEvents.denyCategory(event => {
event.deny("minecraft:campfire_cooking")
})
KubeJEIEvents.denyRecipe(event => {
event.denyAllInCategory("minecraft:campfire_cooking")
})
Make a custom category for custom recipes:
/** @type {{input: Internal.$ItemStack_, catalyst: Internal.$FluidStack_, output: Internal.$ItemStack_}[]} */
const recipes = [
{
input: "ae2:1k_crafting_storage",
catalyst: "minecraft:milk",
output: "ae2:16k_crafting_storage"
}
]
KubeJEIEvents.registerCategories(event => {
const helpers = event.registration.jeiHelpers
event.custom("my:example_category", builder => {
builder.icon = helpers.guiHelper.createDrawableItemStack("minecraft:gold_ingot")
builder.background = helpers.guiHelper.createBlankDrawable(20 * 4, 18)
builder.title = Component.literal("Random Conversion")
// actually you can simply use (...) => {...}, instead of { setRecipe(...) {...} }
// but unfortunately you wont get type hints when using lambda, as of ProbeJS 8.0.3. Hopefully it will be fixed eventually
builder.recipeSetHandler = {
setRecipe(builder, recipe, focuses) {
/** @type {typeof recipes[0]} */
const data = recipe.data
const catalyst = Fluid.of(data.catalyst)
builder.addInputSlot(0, 0).addItemStack(data.input)
builder.addInputSlot(20, 0).addFluidStack(catalyst.fluid, catalyst.getAmount(), catalyst.componentsPatch)
builder.addOutputSlot(20 * 3, 0).addItemStack(data.output)
}
}
builder.drawHandler = {
draw(recipe, graphics, mouseX, mouseY) {
helpers.guiHelper.recipeFlameFilled.draw(graphics, 40, 1)
}
}
})
})
KubeJEIEvents.registerRecipes(event => {
event.custom("my:example_category").addAll(recipes)
})
1.16 only
Note that all 1.4.0+ version requires Rhizo instead of Rhino to run, it’s because Rhino for mc 1.16 has been EOL for a long time, missing features for our jsdoc generation
events:
kube_jei.on_runtime_availablekube_jei.register_advancedkube_jei.register_categorieskube_jei.register_fluid_subtypeskube_jei.register_gui_handlerskube_jei.register_ingredientskube_jei.register_item_subtypeskube_jei.register_recipe_catalystskube_jei.register_recipeskube_jei.register_recipe_transfer_handlerskube_jei.register_vanilla_category_extensionskube_jei.deny.recipeskube_jei.deny.categories
常见问题
KubeJEI 支持哪些 Minecraft 版本?
KubeJEI 支持 Minecraft Java 版 1.16.5–26.1.2,共 3 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
KubeJEI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
ZZZank 的其他作品
查看全部 →FastEvent
by ZZZank
加速 Forge/NeoForge 中的事件系统
561.3万
1 年前
Modrinth · CurseForge
EventJS
by ZZZank
适用于 KubeJS 的分侧可重载原生事件
177.3万
1 年前
Modrinth · CurseForge
EfficientHashing
by ZZZank
为Vec3i和BlockPos提供更好的哈希算法
115.7万
28 天前
Modrinth · CurseForge
JEI Area Fixer
by ZZZank
修复 JEI 界面与模组界面重叠的问题
87.3万
5 个月前
CurseForge
评论
登录后评论和评分