CraftTweaker

CraftTweaker

151M Downloads

[1.16] brewing.removeRecipeByInput() hides other brewing recipes

HenryMaxler opened this issue ยท 6 comments

commented

Issue description

Hello, I noticed when updating the brewing stand recipes were not showing in JEI. I found out when I used the

brewing.removeRecipeByInput(item:minecraft:potion.withTag({Potion: "alexsmobs:poison_resistance" as string}));

It would remove the recipes for gunpowder, redstone etc. correctly, but all other Minecraft brewing recipes were hidden for vanilla Minecraft.

Steps to reproduce

N/A

Script used

https://gist.github.com/HenryMaxler/13ce23a161c32139e56b5624696cd731

The crafttweaker.log file

https://gist.github.com/HenryMaxler/dcf2b939330fcea9ceb6b8d8afd05923

Minecraft version

1.16

Modloader

Forge

Modloader version

36.2.28

CraftTweaker version

1.16.5-7.1.2.500

Other relevant information

JEI version 1.16.5-1.1.0.49

The latest.log file

N/A

commented

You should be using
https://docs.blamejared.com/1.16/en/vanilla/api/brewing/Brewing#removeRecipeByInputPotion
Instead.

brewing.removeRecipeByInputPotion(<potion:alexsmobs:poison_resistance>);

The method you are using now looks at the item, not the actual potion type.

commented

I tried with that one right now, and it did not give an error, but it did not remove the recipe either. /ct hand will only give the item name and not the potion name.

commented

So looking at it, that mod is doing some weird stuff with how they do potions, they seem to be rolling their own isInput method and I'm not exactly sure what the issue is, are you able to remove the potion using this method?
https://docs.blamejared.com/1.16/en/vanilla/api/brewing/Brewing#removeRecipe

commented

Yes, I tried that one and it worked. The problem way worked as well initially so I used a loop. But something changed in the past year making the whole brewing category missing (because there were no Alex Mobs potions).

commented

Oh, nevermind. I tried the year-old version and it still had brewing disabled. So it must not have ever worked in the previous version. I'll just remove the lines for now then. Is there any quick way to remove all the potion recipes from 1 mod then?

commented

Unfortunately not.

Brewing recipes don't have any sort of name attached to them.

Since this issue is only related to alex's mobs potions where there isn't exactly much I can do, I'm going to be closing it.

If you run into any issues with non alex's mobs potions, then please re-open to make a new issue