KubeJS

KubeJS

69M Downloads

Unable to remove recipes from BetterNether; possibly all BCLib mods

SplendidAlakey opened this issue · 14 comments

commented

Minecraft Version

1.19.2

KubeJS Version

1902.6.0-build.128

Rhino Version

1902.2.2-build.264

Architectury Version

6.3.56

Forge/Fabric Version

0.67.1

Describe your issue

  1. Create a couple of simple scripts to remove a BetterNether recipe and hide it in REI
// priority: 0

REIEvents.hide('item', event => {
	'betternether:basalt_bricks'
})
// priority: 0

ServerEvents.recipes(event => {
	event.remove({output: 'betternether:basalt_bricks'})
})
  1. Launch the game and observe that neither the recipe nor the REI entry were removed

Potentially affects all BCLib mods.

Crash report/logs

https://gist.github.com/SplendidAlakey/1bf4211bd424100dbb4bba4a34b70dbc

commented

Code recipes my beloved… I think you’ll need to use the after recipe load event here, since I remember BCLib using mixins to add their recipes through code

commented

That worked, thanks!

And yeah, my REI event here was borked as well, but even the correct one doesn't work, when in a pack. I will find out which mod combination causes this and report back >_<

commented

KubeJS doesn’t do input/output guesswork in 1.19 anymore, so you’ll need to remove the recipe by ID (if it exists, if not, I‘ll try and find another solution)

commented

No, nevermind, the recipe doesn't show at all, anywhere, but it still produces the bricks... Am I being stupid again?

// priority: 0

ServerEvents.afterRecipes(event => {
	event.remove({output: 'betternether:basalt_bricks'})
})
commented

Actually nvm that last comment if that recipe isn’t specific to some BetterNether crafting mechanic; how do you make the bricks normally?

commented

Is there a command to find out the recipe ID like /kubejs hand? If not, how do I find out the recipe ID?

And basalt bricks don't exist in vanilla.

commented

That wasn’t my question, I just wanna know what you’d do to craft them? If it’s a shaped recipe for instance KubeJS can work with it just fine, if it’s a mechanic added by BetterNether tho it can’t

commented

Also for the recipe id, you can check REI (the little + will show the recipe id if advanced tooltips are enabled iirc)

commented

Ah, sorry! You just put 4 polished basalt blocks together, like other bricks type recipes. It is a shaped recipe.

2022-11-28_13 26 11

commented

Removing by ID didn't work either. The id is betternether:polished_basalt_basalt_bricks. The script (just .recipes also doesn't work):

// priority: 0

ServerEvents.afterRecipes(event => {
	event.remove({id: 'betternether:polished_basalt_basalt_bricks'})
})
commented

Hmm, in that case I‘ll have to take a closer look at this once I‘m home…

commented

Alright, thanks. Will be trying to find out the conflict, that prevents hiding certain REI entries meanwhile...

commented

Does the after load event fire? Could be #327

commented

Sorry for a super late response, but no, the after recipe event doesn't fire at all