Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Add a way to hide items from categories #9

Open
CroshB opened this issue Jan 29, 2021 · 1 comment
Open

[Suggestion] Add a way to hide items from categories #9

CroshB opened this issue Jan 29, 2021 · 1 comment

Comments

@CroshB
Copy link

CroshB commented Jan 29, 2021

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.

@Maxi3773
Copy link

Maxi3773 commented Jun 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants