This commit is contained in:
Calclavia 2014-01-05 14:20:08 +08:00
commit cfd5359a2f
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,28 @@
package resonantinduction.api;
import java.util.LinkedHashSet;
import java.util.Set;
public class OreDetectionBlackList
{
private static final Set<String> oreBlackList = new LinkedHashSet<String>();
private static final Set<String> ingotBlackList = new LinkedHashSet<String>();
public static void addOre(String s)
{
oreBlackList.add(s);
}
public static void addIngot(String s)
{
ingotBlackList.add(s);
}
public static boolean isOreBlackListed(String s)
{
return oreBlackList.contains(s);
}
public static boolean isIngotBlackListed(String s)
{
return ingotBlackList.contains(s);
}
}

View file

@ -24,6 +24,7 @@ import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
import resonantinduction.ResonantInduction;
import resonantinduction.api.OreDetectionBlackList;
import resonantinduction.core.base.ItemBase;
import calclavia.lib.Calclavia;
import calclavia.lib.prefab.TranslationHelper;
@ -65,6 +66,10 @@ public class ItemDust extends ItemBase
if (evt.Name.startsWith("ingot"))
{
String ingotName = evt.Name.replace("ingot", "");
if (OreDetectionBlackList.isIngotBlackListed("ingot" + ingotName) || OreDetectionBlackList.isOreBlackListed("ore" + ingotName))
return;
ingotNames.add(ingotName.toLowerCase());
}
}