package org.pfaa.geologica;

import java.util.List;

import org.pfaa.chemica.item.IndustrialMaterialItem;
import org.pfaa.chemica.processing.Form.Forms;
import org.pfaa.core.catalog.CatalogUtils;
import org.pfaa.core.catalog.ItemCatalog;
import org.pfaa.geologica.processing.Crude;
import org.pfaa.geologica.processing.IndustrialMineral.IndustrialMinerals;
import org.pfaa.geologica.processing.Ore;
import org.pfaa.geologica.processing.OreMineral.Ores;

import com.google.common.base.Predicate;

import net.minecraft.block.material.Material;

public class GeologicaItems implements ItemCatalog {
	private static Predicate<GeoMaterial> EarthyMaterial = new Predicate<GeoMaterial>() {
		public boolean apply(GeoMaterial obj) {
			return obj.getBlockMaterial() == Material.clay || obj.getBlockMaterial() == Material.ground;
		}
	};
	private static Predicate<GeoMaterial> CrudeRock = new Predicate<GeoMaterial>() {
		public boolean apply(GeoMaterial obj) {
			return obj.getComposition() instanceof Crude && obj.getBlockMaterial() == Material.rock;
		}
	};
	
	public static final IndustrialMaterialItem<GeoMaterial> CRUDE_LUMP = 
			new IndustrialMaterialItem<GeoMaterial>(Forms.LUMP, GeoMaterial.class, CrudeRock);
	public static final IndustrialMaterialItem<GeoMaterial> EARTHY_CLUMP = 
			new IndustrialMaterialItem<GeoMaterial>(Forms.CLUMP, GeoMaterial.class, EarthyMaterial);
}

@@ -1047,16 +1047,235 @@
 %09%7D%0A%09%7D;%0A%09
+private static Predicate%3CGeoMaterial%3E OreRock = new Predicate%3CGeoMaterial%3E() %7B%0A%09%09public boolean apply(GeoMaterial obj) %7B%0A%09%09%09return obj.getComposition() instanceof Ore && obj.getBlockMaterial() == Material.rock;%0A%09%09%7D%0A%09%7D;%0A
 %0A%09public
@@ -1589,10 +1589,832 @@
 erial);%0A
+%09public static final IndustrialMaterialItem%3CGeoMaterial%3E ORE_CRUSHED = %0A%09%09%09new IndustrialMaterialItem%3CGeoMaterial%3E(Forms.CRUSHED, GeoMaterial.class, OreRock);%0A%09public static final IndustrialMaterialItem%3CGeoMaterial%3E ORE_DUST = %0A%09%09%09new IndustrialMaterialItem%3CGeoMaterial%3E(Forms.DUST, GeoMaterial.class, OreRock);%0A%09%0A%09public static final IndustrialMaterialItem%3COres%3E ORE_MINERAL_DUST = %0A%09%09%09new IndustrialMaterialItem%3COres%3E(Forms.DUST, Ores.class);%0A%09public static final IndustrialMaterialItem%3CIndustrialMinerals%3E INDUSTRIAL_MINERAL_DUST = %0A%09%09%09new IndustrialMaterialItem%3CIndustrialMinerals%3E(Forms.DUST, IndustrialMinerals.class);%0A%09%0A%09@SuppressWarnings(%22rawtypes%22)%0A%09public static List%3CIndustrialMaterialItem%3E getIndustrialMaterialItems() %7B%0A%09%09return CatalogUtils.getEntries(GeologicaItems.class, IndustrialMaterialItem.class);%0A%09%7D%0A
 %7D%0A

add items for dust and crushed forms of ores