Additional Enchanted Miner

Additional Enchanted Miner

22M Downloads

[Feature Request] [Forge 1.20.1] KubeJS integration

vizthex123 opened this issue ยท 5 comments

commented

It'd be great to have KubeJS integration for the Workbench Plus.

commented

alrighty, guess i'll do that then.

commented

Never. Use vanilla system to delete all recipes in Workbench Plus, then add recipes with other mods.

commented

Never. Use vanilla system to delete all recipes in Workbench Plus, then add recipes with other mods.

but what does that mean? How do you even remove modded recipes using vanilla?

commented

You can use datapack to override my recipes defined in https://github.com/Kotori316/QuarryPlus/tree/1.20.1/src/generated/resources/data/quarryplus/recipes . I think adding forge condition (forge:false is always considered falsely) or override to meaningless recipe is fine.
I can see many examples in Official Wiki or wherever you like.

Also there is a way to remove recipes in KubeJS, https://wiki.latvian.dev/books/kubejs/page/recipes . Just specify the recipe ID, you can remove the recipe.

commented

kubejs doesn't need anything specific to integrate with any particular mod

it's probably better to change recipes through datapacks but kubejs scripts can be updated on the fly with a reload so you may want to do this

for example the following in a server script adds will update or add a new recipe to the workbench for me

ServerEvents.recipes(event => {

event.remove({ id: 'quarryplus:solid_fuel_quarry' })
event.custom({
type: 'quarryplus:workbench_recipe',
ingredients: [
{ item: 'minecraft:furnace', count: 4 },
{ item: 'minecraft:diamond_pickaxe', count: 2 },
{ tag: 'forge:gears/steel', count: 2 },
{ tag: 'forge:ingots/aluminum', count: 4 },
{ tag: 'forge:ingots/gold', count: 4 }
],
energy: 20000.0,
result: { item: 'quarryplus:solid_fuel_quarry', count: 1 }
})

})