Merge branch 'master' of https://bitbucket.org/calclavia/resonant-induction
This commit is contained in:
commit
cfd5359a2f
2 changed files with 33 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue