package squeek.veganoption.integration.magicalcrops;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import squeek.veganoption.content.registry.CompostRegistry;
import squeek.veganoption.content.registry.CompostRegistry.FoodSpecifier;
import squeek.veganoption.integration.IntegratorBase;

public class MagicalCrops extends IntegratorBase
{
	@Override
	public void init()
	{
		super.init();

		CompostRegistry.blacklist(new FoodSpecifier()
		{
			private final Set<String> itemNameBlacklist = new HashSet<String>(
					Arrays.asList(
									fullItemName("magicalcrops_PotionPetals"),
									fullItemName("magicalcrops_FoodJuice"),
									fullItemName("magicalcrops_FoodStew")
							)
					);

			@Override
			public boolean matches(ItemStack itemStack)
			{
				// meat and diamonds are bad for composting
				String itemName = Item.itemRegistry.getNameForObject(itemStack.getItem());
				return itemNameBlacklist.contains(itemName);
			}
		});
	}
}

@@ -189,16 +189,114 @@
 mStack;%0A
+import net.minecraftforge.oredict.OreDictionary;%0Aimport squeek.veganoption.content.ContentHelper;%0A
 import s
@@ -527,16 +527,220 @@
 rBase%0A%7B%0A
+%09@Override%0A%09public void oredict()%0A%09%7B%0A%09%09if (getItem(%22magicalcrops_SeedsGrape%22) != null)%0A%09%09%09OreDictionary.registerOre(ContentHelper.grapeSeedOreDict, new ItemStack(getItem(%22magicalcrops_SeedsGrape%22)));%0A%09%7D%0A%0A
 %09@Overri

Add magical crops grape seeds to grape seed oredict