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

Removeall Anvil recipes function and/or remove specific type of anvil recipes #24

Open
ElectroBot opened this issue Aug 26, 2019 · 17 comments

Comments

@ElectroBot
Copy link

It would be useful (for some especially myself) if I could call one function to remove all anvil recipes and only allow the ones that I add.

Secondarily being able to remove the following seperately (but not other anvil recipes) would also be quite useful:

  • enchanting items with books
  • repair with raw item (leather, ingot, etc.)
  • repair by combining 2 items (either damaged or new)
  • combine 2 enchanted items into 1 merging the enchants

Thanks

@Dimentive
Copy link

+1

@Mohron
Copy link
Member

Mohron commented Jan 1, 2020

So I should be able to add an Anvil.removeAll() with no problem. The other ones won't be very straight forward so I'm not sure I can add them reliably, especially with other mods adding stuff to the anvil.

@Dimentive
Copy link

Awesome! Anvil.removeAll() will be very useful!

@Mohron
Copy link
Member

Mohron commented Jan 4, 2020

Added in 51b99cf. See latest pre-release.

@Dimentive
Copy link

Sweet! 💙

@Dimentive
Copy link

@Mohron How do you use Anvil.removeAll(), exactly? Is it as simple as putting the item name in the parentheses?

So, to remove all anvil recipes of, say, the iron shovel, would you use Anvil.removeAll(<minecraft:iron_shovel>)?

Also, do I have to import anything?

(Maybe the wiki should be updated.)

@Mohron
Copy link
Member

Mohron commented Jan 7, 2020

It works like any other craft tweaker mod. You either need to use an import or use full class name. There's an import example on the wiki already.

This feature removes all non-custom recipes. It takes no inputs. If you want to remove all the recipes with specific input(s) or outputs, you should be using the existing remove functionality.

The wiki will get updated when these changes are released.

@Dimentive
Copy link

Is there no way to remove all anvil recipes for a specific item? Do I have to remove each one manually? And is there no way to remove repair recipes (judging from the wiki, it seems you’re only able to remove enchant recipes)? Perhaps this is something that you could implement?

@Mohron
Copy link
Member

Mohron commented Jan 9, 2020

There is and has been ever since Anvil.remove was added... You can remove recipes by input or output and it will remove all matching recipes.

https://docs.blamejared.com/1.12/en/#Mods/RockyCore/Anvil/

@Dimentive
Copy link

Oh.

Do I just do it like this?
mods.rockycore.Anvil.remove([<minecraft:iron_shovel>])

@Mohron
Copy link
Member

Mohron commented Jan 9, 2020

That should remove all anvil recipes with an iron shovel as one of the inputs.

@Dimentive
Copy link

Got it. Thank you!

@Dimentive
Copy link

Dimentive commented Jan 9, 2020

@Mohron Do you know why this is erroring?
mods.rockycore.Anvil.remove([<aiotbotania:manasteelaiot>]);

Error: https://pastebin.com/raw/kEDLGea4

Using RockyTweaks 0.5.0 for 1.12.2 (Forge 14.23.5.2847).

@Mohron
Copy link
Member

Mohron commented Jan 9, 2020

Probably because it's not mods.rockycore.Anvil if you're using the version that was renamed to Rocky Tweaks. It's mods.rockytweaks.Anvil

@Dimentive
Copy link

Oh, whoopsie. Thanks! Wiki says RockyCore.

@Dimentive
Copy link

mods.rockytweaks.Anvil.remove([<aiotbotania:manasteelaiot>]);

This worked for enchantment recipes, but I’m still able to repair it in an anvil.

(By the way, sorry if I’m spamming this issue as this all might be off-topic. I don’t know if you’d rather want me to open a new issue or contact you on Discord.)

@Mohron
Copy link
Member

Mohron commented Jan 10, 2020

It's likely something to do with how that mod adds the repair capability. I will have to test with it installed to see why it wasn't able to remove all recipes.

Discord is preferred for support as it is generally a better place to have a conversation. Tickets are better for tracking bugs and feature requests so they don't get duplicated or forgotten.

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

No branches or pull requests

3 participants