[Suggestion] Add a way to hide items from categories
CroshB opened this issue ยท 1 comments
I don't know if it is possible to implement this but, sometimes when hiding an item in a modpack we remove it's recipe and remove it from the JEI list to pretend it doesn't exist. However, some items still show up in other categories because it still exists in the game. For instance, even if I remove the recipe for a diamond sword and hide it from the JEI list, it still appears in the recipes of the anvil category. The goal of the command would be to pretend the item doesn't exist and hide it from the game. The command could look something like this:
mods.jei.JEI.hideItemFromCategory(<item:minecraft:diamond_sword>, "minecraft:anvil");
There could also be a command to hide the item from all categories:
mods.jei.JEI.hideItemFromAllCategories(<item:minecraft:diamond_sword>);
I can think of a few problems in implementing this though:
- There could be some issues when determining if the recipe should be hidden or not based on if it is in the input, output or in any of the slots in the recipe.
- In the case of recipes with other inputs/outputs besides the hidden item, what should be done? Hide the recipe, show the recipe without the item or don't hide those recipes.
Based on the given use case for this feature, the recipe would be hidden in any case. However, this feature could have other uses and there could be ways of achieving the other behaviors with other methods or parameters.
However, some items still show up in other categories because it still exists in the game.
It is possible to hide crafting table and furnace recipes using JEI.hideRecipe(recipeID). I guess this does not work for anvil because it is not a recipe and has no recipe id. So like you said, there should be another function for this.
In the case of recipes with other inputs/outputs besides the hidden item, what should be done? Hide the recipe, show the recipe without the item or don't hide those recipes.
That is up to the modpack creator. The creator can either dont change the recipe at all, completely remove it, or change the recipe to not include the hidden item.