So, I was looking in other supports and example scripts and haven't found anything like what I'm trying to do. So, any sugestions? I have some code right here, but this doesn't work on what I was thinking (sorry if I misspelled something, english isn't my first language, or if I posted)
To summarize: I want to have some hidden items (and recipes) in JEI, and if the player make them by accident the recipe appears in JEI
JEIEvents.hideItems(e =>{
hideAll.forEach(ctx => {
e.hide(ctx)
});
})
JEIEvents.removeRecipes(e =>{
hideAll.forEach(ctx => {
e.hide(ctx)
});
})
ItemEvents.crafted(e => {
craftedItem = e.getItem().getId()
if (hideAll.includes(craftedItem)){
e.filter(i => i !== craftedItem)
}
})
const hideAll = [
hideDiamond,
hideNetherite
]
const hideDiamond = [
'minecraft:diamond_sword',
'minecraft:diamond_axe',
'minecraft:diamond_pickaxe',
'minecraft:diamond_shovel',
'minecraft:diamond_hoe'
]
const hideNetherite = [
'minecraft:netherite_sword',
'minecraft:netherite_axe',
'minecraft:netherite_pickaxe',
'minecraft:netherite_shovel',
'minecraft:netherite_hoe'
]