package info.sleeplessacorn.morechisels;

/*
 *  Copyright 2017 Sleepless Acorn
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

import net.minecraftforge.common.config.Config;

@Config(modid = MoreChisels.MOD_ID)
public class ConfigMoreChisels {

    @Config.Name("Ore Dictionary Blacklist")
    @Config.Comment({"Entries in the ore dictionary that More Chisels shouldn't generate chisels from.",
            "Please note that additions and removals will alter the items that are registered.",
            "You may lose items if you add to the blacklist and load an existing world!"})
    @Config.LangKey("config.morechisels.blacklist")
    public static String[] oreBlacklist = createDefaultBlacklist();

    public static String[] createDefaultBlacklist() {
        String[] entries = new String[9];
        entries[0] = "ingotIron";
        entries[1] = "gemDiamond";
        entries[2] = "ingotBrick";
        entries[3] = "ingotBrickNether";
        entries[4] = "ingotHotTungstensteel";
        entries[5] = "ingotIridium";
        entries[6] = "ingotAdvancedAlloy";
        entries[7] = "ingotMixedMetal";
        entries[8] = "ingotIridiumAlloy";
        return entries;
    }

    public static boolean isBlacklisted(String oredict) {
        for (String entry : oreBlacklist)
            if (entry.equals(oredict))
                return true;
        return false;
    }

}

@@ -1203,151 +1203,33 @@
 t = 
-createDefaultBlacklist();%0A%0A    public static String%5B%5D createDefaultBlacklist() %7B%0A        String%5B%5D entries = new String%5B9%5D;%0A        entries%5B0%5D =
+new String%5B%5D%7B%0A           
  %22in
@@ -1236,26 +1236,27 @@
 gotIron%22
-;%0A
+,%0A 
         
 entries%5B
@@ -1251,20 +1251,10 @@
     
-entries%5B1%5D =
+  
  %22ge
@@ -1262,17 +1262,17 @@
 Diamond%22
-;
+,
 %0A       
@@ -1276,20 +1276,11 @@
     
-entries%5B2%5D =
+   
  %22in
@@ -1288,17 +1288,17 @@
 otBrick%22
-;
+,
 %0A       
@@ -1302,20 +1302,11 @@
     
-entries%5B3%5D =
+   
  %22in
@@ -1320,17 +1320,17 @@
 kNether%22
-;
+,
 %0A       
@@ -1334,20 +1334,11 @@
     
-entries%5B4%5D =
+   
  %22in
@@ -1357,17 +1357,17 @@
 ensteel%22
-;
+,
 %0A       
@@ -1371,20 +1371,11 @@
     
-entries%5B5%5D =
+   
  %22in
@@ -1385,17 +1385,17 @@
 Iridium%22
-;
+,
 %0A       
@@ -1399,20 +1399,11 @@
     
-entries%5B6%5D =
+   
  %22in
@@ -1415,25 +1415,25 @@
 vancedAlloy%22
-;
+,
 %0A        ent
@@ -1433,20 +1433,11 @@
     
-entries%5B7%5D =
+   
  %22in
@@ -1449,18 +1449,23 @@
 xedMetal
-%22;
+Alloy%22,
 %0A       
@@ -1469,20 +1469,11 @@
     
-entries%5B8%5D =
+   
  %22in
@@ -1492,39 +1492,15 @@
 loy%22
-;
 %0A    
-    return entries;%0A    
 %7D
+;
 %0A%0A  

Switch oreBlacklist from method call to String[]{} format