Naming Conventions >__>

This commit is contained in:
Ellpeck 2015-10-10 20:17:34 +02:00
parent 0d8a684874
commit 6ed25b330c

View file

@ -27,11 +27,11 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
public class InitForeignPaxels{ public class InitForeignPaxels{
public static final String[] mtNames = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"}; public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"};
private static final String THERMAL_FOUNDATION = "ThermalFoundation"; private static final String THERMAL_FOUNDATION = "ThermalFoundation";
private static final String MEKANISM_TOOLS = "MekanismTools"; private static final String MEKANISM_TOOLS = "MekanismTools";
private static final String[] tfNames = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"}; private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"};
private static final String[] mtRepairNames = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"}; private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"};
public static Item[] tfPaxels = new Item[9]; public static Item[] tfPaxels = new Item[9];
private static Item[] mtPaxels = new Item[6]; private static Item[] mtPaxels = new Item[6];
@ -43,15 +43,15 @@ public class InitForeignPaxels{
for(int i = 0; i < mtPaxels.length; i++){ for(int i = 0; i < mtPaxels.length; i++){
if(!(!ConfigBoolValues.DUPLICATE_PAXELS.isEnabled() && (i == 0 || (i == 3 && ConfigBoolValues.TF_PAXELS.isEnabled() && Loader.isModLoaded(THERMAL_FOUNDATION))))){ if(!(!ConfigBoolValues.DUPLICATE_PAXELS.isEnabled() && (i == 0 || (i == 3 && ConfigBoolValues.TF_PAXELS.isEnabled() && Loader.isModLoaded(THERMAL_FOUNDATION))))){
Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+mtNames[i]+"Axe"); Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe");
Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+mtNames[i]+"Pickaxe"); Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe");
Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+mtNames[i]+"Hoe"); Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe");
Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+mtNames[i]+"Sword"); Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Sword");
Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+mtNames[i]+"Shovel"); Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel");
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
mtPaxels[i] = new ItemAllToolAA(material, mtRepairNames[i], "paxelMT"+mtNames[i], EnumRarity.rare); mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare);
ItemUtil.register(mtPaxels[i]); ItemUtil.register(mtPaxels[i]);
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
@ -73,15 +73,15 @@ public class InitForeignPaxels{
ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs..."); ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs...");
for(int i = 0; i < tfPaxels.length; i++){ for(int i = 0; i < tfPaxels.length; i++){
Item axe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.axe"+tfNames[i]); Item axe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.axe"+TF_NAMES[i]);
Item pickaxe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.pickaxe"+tfNames[i]); Item pickaxe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.pickaxe"+TF_NAMES[i]);
Item hoe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.hoe"+tfNames[i]); Item hoe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.hoe"+TF_NAMES[i]);
Item sword = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.sword"+tfNames[i]); Item sword = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.sword"+TF_NAMES[i]);
Item shovel = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.shovel"+tfNames[i]); Item shovel = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.shovel"+TF_NAMES[i]);
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
tfPaxels[i] = new ItemAllToolAA(material, "ingot"+tfNames[i], "paxelTF"+tfNames[i], EnumRarity.rare); tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare);
ItemUtil.register(tfPaxels[i]); ItemUtil.register(tfPaxels[i]);
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){