fix for oreDict messup

This commit is contained in:
2016-05-13 18:08:01 +02:00
parent 44445e7ba9
commit c6fa276263
4 changed files with 37 additions and 45 deletions

View File

@@ -50,6 +50,7 @@ public class Blocks {
if (block instanceof BasicBlockOre) {
String oreDictName;
String[] nameParts = block.getUnlocalizedName().replace("tile.", "").split("_");
System.out.println();
if (nameParts.length > 2) {
oreDictName = Arrays.toString(Arrays.copyOfRange(nameParts, 0, nameParts.length - 1));
@@ -58,6 +59,7 @@ public class Blocks {
}
OreDictionary.registerOre("ore" + StringUtils.capitalize(oreDictName), block);
System.out.println(String.format("Registered OreDict: %s", "ore" + StringUtils.capitalize(oreDictName)));
}
} catch (IllegalAccessException e) {
e.printStackTrace();