mezz / JustEnoughItems

Item and Recipe viewing mod for Minecraft
https://www.curseforge.com/minecraft/mc-mods/jei
MIT License
790 stars 304 forks source link

[Bug]: getIngredientBlacklist() mentioned in the wiki is missing: it is impossible for JEI plugins to hide items/ingredients now #3807

Closed Lothrazar closed 1 month ago

Lothrazar commented 1 month ago

Steps to Reproduce the Bug

On this page In minecraft 1.20.1 there is no " register( IModRegistry registry) " method, and there is no getIngredientBlacklist() in the helpers

Expected Behavior

I expect the wiki to be fixed, and i expect there to be a way to hide items in the plugin.

Example: my mod has tons of colourful farmland and i want to hide all the farmland blocks from JEI list

Actual Behavior

its impossible to hide items in the plugin, AND there is no IIngredientBlacklist

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

If theres a new way to hide items i cant find anyone who knows how to do it, and the steps on the wiki Do Not Work in minecraft 1.20.1 https://github.com/mezz/JustEnoughItems/wiki/Hiding-Ingredients

latest.log

No response

Lothrazar commented 1 month ago

Update: ok i figured out the wiki was trying to trick me, but even the new section is wrong/incorrect https://github.com/mezz/JustEnoughItems/wiki/Adding-and-Hiding-Items-%5B1.13-and-Up%5D

It does not work if you follow the wiki as written.

First you need to get your vanilla item type. Which it doesnt tell you. also you have to wrap the items in an itemstack. it actually works like this so please update the wiki

  @Override
  public void registerRecipes(IRecipeRegistration registration) {
    registration.getIngredientManager().removeIngredientsAtRuntime(VanillaTypes.ITEM_STACK,
        Arrays.asList(
                    new ItemStack(  YOUR_ITEM_GOES_HERE )

        ));
  }