#How to hide recipe in JEI without hiding the item?

25 messages · Page 1 of 1 (latest)

warped peak
#

I want there to be recipe which I would only show in patchouli book but I dont want to show it in JEI. For some reason if you change the recipe to a different type than it was originally the whole book is unreadable so I made dummy recipe to show that recipe has been changed but I dont know how to hide it in jei lol. I tried this:

JEIEvents.removeRecipes(event => {
    event.remove('minecraft:shaped', 'ars_nouveau:imbuement_chamber')
    event.remove('minecraft:shapeless', 'ars_nouveau:imbuement_chamber')
  })

but im not sure what the first parameter is supposed to be. The other one is im assuming recipe id? Anyway it didnt work

true treeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

pearl plank
#

the first parameter accepts a recipecategory, make sure the category id is the right one for your recipe

#

i think this is the category jei uses for basic crafting:
"minecraft:crafting"

warped peak
#
JEIEvents.removeRecipes(event => {
    event.remove('ars_nouveau:imbuement_chamber')

    event.remove('minecraft:crafting', 'ars_nouveau:imbuement_chamber')

    event.remove('minecraft:shapeless', 'ars_nouveau:imbuement_chamber')
  })

Didnt work sadly

pearl plank
#

you got it in the clientscripts?

warped peak
#

yep

pearl plank
#

remove the event.remove("minecraft:shapeless"), maybe that makes it crash

warped peak
#

would be suprising

#

but ill restart the game just to be sure

#

turns out it was the case

#

now how would I find out the other category ids?

#

is there an easy way

pearl plank
#

nice

#

hmmm let me try some stuff

#
let categories = global.jeiRuntime.recipeManager.createRecipeCategoryLookup().get().toList()
categories.forEach(category =>{
    console.log(category.getRecipeType().getUid());
    
})

okay this way you at least get all category ids

#
let categories = global.jeiRuntime.recipeManager.createRecipeCategoryLookup().get().toList()
categories.forEach(category =>{
    let allrecipes = global.jeiRuntime.getRecipeManager().createRecipeLookup(category.getRecipeType()).get().toArray();
    allrecipes.forEach(recipe =>{
            if (recipe && typeof recipe.getId === "function") {
            let recipeId = recipe.getId()
            if(recipeId == 'ars_nouveau:imbuement_chamber'){
                console.log("This Category: " + category.getRecipeType().getUid())
            }
        }
    })
})

there you go

warped peak
#

omg thank you so much

#

do I just put it in ServerEvents.recipes?

pearl plank
#

jei methods are all clientside, this prints you the categories you are looking for in the client.log

warped peak
#

so the script goes into client scripts?

pearl plank
#

yes

warped peak
#

thank you so much

#

but I also realized there is jei-category-sort-order.ini in the config which has all the categories so that would also be good enough xd