Botany Pots

Botany Pots

33M Downloads

[Question][1.16.5][CraftTweaker] Removing Crops

drakray opened this issue ยท 4 comments

commented

A simple question: is there a way to remove a crops with Crafttweaker integration?
I know we can clear the soils and the drops, but removing something entirely?
Would be very useful for packmaker and balancing in some situation(I have NNoW in my pack, and want to remove all ore berries from BotanyPots, but not materials like dirt/stone/sand)

Thank you for your good work, your mods are awesome! :D

commented

Yes, it's done in the same way you would remove a crafting recipe or a furnace recipe. All recipe systems in CraftTweaker have the same base methods for removal of entries.

Edit: You can read more here

commented

So for reference, script should look like this?:

import mods.botanypots.ZenCrop;
crops.removeByName("botanypots:crops/aluminum_berry");
commented

Here is a full example.

import mods.botanypots.ZenCrop;
val crops = <recipetype:botanypots:crop>;

crops.removeByName("botanypots:crops/wheat");

Crops is not a global variable so you need to grab it from the recipe type registry and assign it to a value yourself. Additionally the ID you specified does not seem valid, or at least it's not in the base mod.

commented

Yeah I forgot the val crops line higher lol
This recipe is added by "Never Needed or Wanted"

Thank you for the full example, I think you should maybe add it to the list of example?, it's rather useful :)