From 54732bdb7374e344ba38db092c012645e3f39ae0 Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Sun, 18 Oct 2015 11:24:29 -0400 Subject: [PATCH] Cleanup before release! --- .../criss_cross/Blocks/BlockCropomator.java | 3 +- .../Blocks/BlockElectroextractor.java | 3 +- .../criss_cross/Blocks/BlockWoodchipper.java | 3 +- .../oitsjustjose/criss_cross/CrissCross.java | 5 +++ .../criss_cross/Items/ItemDust.java | 5 +++ .../criss_cross/Recipes/CRecipes.java | 38 +++++++++++++++-- .../Recipes/CropomatorRecipes.java | 41 +++++-------------- .../Recipes/ElectroextractorRecipes.java | 20 +++++---- .../Recipes/WoodchipperRecipes.java | 16 ++++---- .../TileEntity/TileEntityCropomator.java | 3 +- .../TileEntityElectroextractor.java | 10 +++-- .../TileEntity/TileEntityWoodchipper.java | 8 ++-- .../criss_cross/Util/ConfigHandler.java | 39 ++++-------------- 13 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockCropomator.java b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockCropomator.java index 64f6922..a4d1da0 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockCropomator.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockCropomator.java @@ -26,9 +26,8 @@ public class BlockCropomator extends BlockMachineBase public BlockCropomator() { super(unlocName); - - GameRegistry.registerBlock(this, unlocName); GameRegistry.registerTileEntity(TileEntityCropomator.class, unlocName); + GameRegistry.registerBlock(this, unlocName); } @Override diff --git a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockElectroextractor.java b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockElectroextractor.java index 94fff70..b327bc6 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockElectroextractor.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockElectroextractor.java @@ -26,9 +26,8 @@ public class BlockElectroextractor extends BlockMachineBase public BlockElectroextractor() { super(unlocName); - - GameRegistry.registerBlock(this, unlocName); GameRegistry.registerTileEntity(TileEntityElectroextractor.class, unlocName); + GameRegistry.registerBlock(this, unlocName); } @Override diff --git a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockWoodchipper.java b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockWoodchipper.java index 0e75f98..aaa2db7 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockWoodchipper.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Blocks/BlockWoodchipper.java @@ -25,9 +25,8 @@ public class BlockWoodchipper extends BlockMachineBase public BlockWoodchipper() { super(unlocName); - - GameRegistry.registerBlock(this, unlocName); GameRegistry.registerTileEntity(TileEntityWoodchipper.class, unlocName); + GameRegistry.registerBlock(this, unlocName); } @Override diff --git a/src/main/java/com/oitsjustjose/criss_cross/CrissCross.java b/src/main/java/com/oitsjustjose/criss_cross/CrissCross.java index 863581f..ea28c11 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/CrissCross.java +++ b/src/main/java/com/oitsjustjose/criss_cross/CrissCross.java @@ -48,4 +48,9 @@ public class CrissCross { ItemDust.oreDictionaryInit(); } + + public static void printErr(String string) + { + System.out.println(string); + } } \ No newline at end of file diff --git a/src/main/java/com/oitsjustjose/criss_cross/Items/ItemDust.java b/src/main/java/com/oitsjustjose/criss_cross/Items/ItemDust.java index edc16d2..901518c 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Items/ItemDust.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Items/ItemDust.java @@ -37,6 +37,11 @@ public class ItemDust extends Item colors.add(color); } + public static String getName(int meta) + { + return dustNames.get(meta); + } + @Override public boolean requiresMultipleRenderPasses() { diff --git a/src/main/java/com/oitsjustjose/criss_cross/Recipes/CRecipes.java b/src/main/java/com/oitsjustjose/criss_cross/Recipes/CRecipes.java index 10f29a8..5a728fc 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Recipes/CRecipes.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Recipes/CRecipes.java @@ -1,5 +1,6 @@ package com.oitsjustjose.criss_cross.Recipes; +import com.oitsjustjose.criss_cross.CrissCross; import com.oitsjustjose.criss_cross.Blocks.CCBlocks; import com.oitsjustjose.criss_cross.Items.CCItems; import com.oitsjustjose.criss_cross.Items.ItemDust; @@ -17,6 +18,35 @@ public class CRecipes { cropomatorRecipe(); electroextractorRecipe(); + woodChipperRecipe(); + } + + static void woodChipperRecipe() + { + String[] unlocItem = ConfigHandler.woodchipperRecipeItem.split(":"); + ItemStack centerItem = new ItemStack(Blocks.diamond_block); + + if(GameRegistry.findItemStack(unlocItem[0], unlocItem[1], 1) != null) + { + ItemStack newStack = GameRegistry.findItemStack(unlocItem[0], unlocItem[1], 1); + if(unlocItem.length == 2) + centerItem = newStack; + if(unlocItem.length == 3) + centerItem = new ItemStack(newStack.getItem(), 1, Integer.parseInt(unlocItem[2])); + } + else + { + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.woodchipperRecipeItem + + "could not be added as part of the recipe of the Woodchipper. Please confirm you have the name and formatting correct."); + } + + GameRegistry.addRecipe(new ItemStack(CCBlocks.woodchipper), new Object[] + { + "I#I", + "SCS", + "I#I", + '#', Items.diamond_axe, 'I', Blocks.iron_bars, 'S', Items.golden_axe, 'C', centerItem + }); } static void electroextractorRecipe() @@ -34,7 +64,8 @@ public class CRecipes } else { - System.out.println("[CrissCross] Item " + ConfigHandler.electroextractorRecipeItem + " could not be added as part of the recipe of the cropomator. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.electroextractorRecipeItem + + " could not be added as part of the recipe of the electroextractor. Please confirm you have the name and formatting correct."); } GameRegistry.addRecipe(new ItemStack(CCBlocks.electroextractor), new Object[] @@ -61,7 +92,8 @@ public class CRecipes } else { - System.out.println("[CrissCross] Item " + ConfigHandler.cropomatorRecipeItem + " could not be added as part of the recipe of the cropomator. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.cropomatorRecipeItem + + " could not be added as part of the recipe of the cropomator. Please confirm you have the name and formatting correct."); } GameRegistry.addRecipe(new ItemStack(CCBlocks.cropomator), new Object[] @@ -69,7 +101,7 @@ public class CRecipes "I#I", "SCS", "I#I", - '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.iron_hoe, 'C', centerItem + '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.golden_hoe, 'C', centerItem }); } } \ No newline at end of file diff --git a/src/main/java/com/oitsjustjose/criss_cross/Recipes/CropomatorRecipes.java b/src/main/java/com/oitsjustjose/criss_cross/Recipes/CropomatorRecipes.java index febf33c..2dec6a3 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Recipes/CropomatorRecipes.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Recipes/CropomatorRecipes.java @@ -1,5 +1,6 @@ package com.oitsjustjose.criss_cross.Recipes; +import com.oitsjustjose.criss_cross.CrissCross; import com.oitsjustjose.criss_cross.TileEntity.TileEntityCropomator; import com.oitsjustjose.criss_cross.Util.ConfigHandler; @@ -10,91 +11,71 @@ public class CropomatorRecipes { public static void initRecipes() { - //Iterates through the inputItems String array for(int i = 0; i < ConfigHandler.cropomatorInputs.length; i++) { - //Done in a try loop just in case there's an issue with reading a value in. try { - //Splits the modid:item / modid:item:metadata string at the ':' and makes a - //new Array of strings, each element containing the newly separated parts. String[] unlocStack = ConfigHandler.cropomatorInputs[i].split(":"); - //Checks the read in string as modid:item if(unlocStack.length == 2) { - //Attempts to find the Itemstack with given info modid and unlocalizedname if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) TileEntityCropomator.addItemStackToOutputs(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1)); - //If it fails, it prints out an error message letting the user know exactly where they made a mistake else - System.out.println("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + " could not be added to the Cropomator's recipe list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + + " could not be added to the Cropomator's recipe list. Please confirm you have the name and formatting correct."); } - //Checks the read in string as modid:item:metadata if(unlocStack.length == 3) { - //Attempts to find the Itemstack with given info modid and unlocalizedname if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) { - //It then creates a new itemstack with the itemstack's getItem, qty 1, with a parsed int value of the 3rd argument ItemStack newStack = new ItemStack(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1).getItem(), 1, Integer.parseInt(unlocStack[2])); TileEntityCropomator.addItemStackToOutputs(newStack); } - //If it fails, it prints out an error message letting the user know exactly where they made a mistake else - System.out.println("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + " could not be added to the Cropomator's recipe list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + + " could not be added to the Cropomator's recipe list. Please confirm you have the name and formatting correct."); } } - //Gotta catch em all catch(Exception e) { - System.out.println("[CrissCross]: Error reading itemstack for inputs from input file at item: " + (i + 1)); + CrissCross.printErr("[CrissCross]: Error reading itemstack for inputs from input file at item: " + (i + 1)); } } } - //Iterates through the catalystItems String array public static void initCatalysts() { - //Done in a try loop just in case there's an issue with reading a value in. for(int i = 0; i < ConfigHandler.cropomatorCatalysts.length; i++) { try { - //Splits the modid:item / modid:item:metadata string at the ':' and makes a - //new Array of strings, each element containing the newly separated parts. String[] unlocStack = ConfigHandler.cropomatorCatalysts[i].split(":"); - //Checks the read in string as modid:item if(unlocStack.length == 2) { - //Attempts to find the Itemstack with given info modid and unlocalizedname if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) TileEntityCropomator.addItemStackToCatalysts(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1)); - //If it fails, it prints out an error message letting the user know exactly where they made a mistake else - System.out.println("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + " could not be added to the Cropomator's catalyst list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + + " could not be added to the Cropomator's catalyst list. Please confirm you have the name and formatting correct."); } - //Checks the read in string as modid:item:metadata if(unlocStack.length == 3) { - //Attempts to find the Itemstack with given info modid and unlocalizedname if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) { - //It then creates a new itemstack with the itemstack's getItem, qty 1, with a parsed int value of the 3rd argument ItemStack newStack = new ItemStack(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1).getItem(), 1, Integer.parseInt(unlocStack[2])); TileEntityCropomator.addItemStackToCatalysts(newStack); } - //If it fails, it prints out an error message letting the user know exactly where they made a mistake else - System.out.println("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + " could not be added to the Cropomator's catalyst list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.cropomatorInputs[i] + + " could not be added to the Cropomator's catalyst list. Please confirm you have the name and formatting correct."); } } - //Gotta catch em all catch(Exception e) { - System.out.println("[CrissCross]: Error reading itemstack for catalysts from input file at item: " + (i + 1)); + CrissCross.printErr("[CrissCross]: Error reading itemstack for catalysts from input file at item: " + (i + 1)); } } } diff --git a/src/main/java/com/oitsjustjose/criss_cross/Recipes/ElectroextractorRecipes.java b/src/main/java/com/oitsjustjose/criss_cross/Recipes/ElectroextractorRecipes.java index 5119a40..b8ddba8 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Recipes/ElectroextractorRecipes.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Recipes/ElectroextractorRecipes.java @@ -1,6 +1,6 @@ package com.oitsjustjose.criss_cross.Recipes; -import com.oitsjustjose.criss_cross.Items.CCItems; +import com.oitsjustjose.criss_cross.CrissCross; import com.oitsjustjose.criss_cross.TileEntity.TileEntityElectroextractor; import com.oitsjustjose.criss_cross.Util.ConfigHandler; @@ -13,9 +13,9 @@ public class ElectroextractorRecipes { public static void initRecipes() { - TileEntityElectroextractor.addBlockRecipe(Blocks.diamond_ore, new ItemStack(Items.diamond)); - TileEntityElectroextractor.addBlockRecipe(Blocks.emerald_ore, new ItemStack(Items.emerald)); - TileEntityElectroextractor.addBlockRecipe(Blocks.coal_ore, new ItemStack(Items.coal)); + TileEntityElectroextractor.addRecipe(Blocks.diamond_ore, new ItemStack(Items.diamond)); + TileEntityElectroextractor.addRecipe(Blocks.emerald_ore, new ItemStack(Items.emerald)); + TileEntityElectroextractor.addRecipe(Blocks.coal_ore, new ItemStack(Items.coal)); } public static void initFuels() @@ -28,9 +28,10 @@ public class ElectroextractorRecipes if(unlocStack.length == 2) { if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) - TileEntityElectroextractor.addItemStackToFuels(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 0)); + TileEntityElectroextractor.addFuel(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 0)); else - System.out.println("[CrissCross] Item " + ConfigHandler.electroextractorEnergySources[i] + " could not be added to the Electroextractor's fuel list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.electroextractorEnergySources[i] + + " could not be added to the Electroextractor's fuel list. Please confirm you have the name and formatting correct."); } if(unlocStack.length == 3) @@ -38,15 +39,16 @@ public class ElectroextractorRecipes if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) { ItemStack newStack = new ItemStack(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1).getItem(), 1, Integer.parseInt(unlocStack[2])); - TileEntityElectroextractor.addItemStackToFuels(newStack); + TileEntityElectroextractor.addFuel(newStack); } else - System.out.println("[CrissCross] Item " + ConfigHandler.electroextractorEnergySources[i] + " could not be added to the Electroextractor's fuel list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.electroextractorEnergySources[i] + + " could not be added to the Electroextractor's fuel list. Please confirm you have the name and formatting correct."); } } catch(Exception e) { - System.out.println("[CrissCross]: Error reading itemstack for electroextractor's energy sources at item: " + (i + 1)); + CrissCross.printErr("[CrissCross]: Error reading itemstack for electroextractor's energy sources at item: " + (i + 1)); } } } diff --git a/src/main/java/com/oitsjustjose/criss_cross/Recipes/WoodchipperRecipes.java b/src/main/java/com/oitsjustjose/criss_cross/Recipes/WoodchipperRecipes.java index 1ca6d31..a0a1a85 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Recipes/WoodchipperRecipes.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Recipes/WoodchipperRecipes.java @@ -2,6 +2,7 @@ package com.oitsjustjose.criss_cross.Recipes; import java.util.ArrayList; +import com.oitsjustjose.criss_cross.CrissCross; import com.oitsjustjose.criss_cross.TileEntity.TileEntityWoodchipper; import com.oitsjustjose.criss_cross.Util.ConfigHandler; @@ -20,9 +21,6 @@ public class WoodchipperRecipes String logName; String plankName; - System.out.println(logs.toString()); - System.out.println(planks.toString()); - for(int i = 0; i < logs.size(); i++) { for(int logMeta = 0; logMeta < 16; logMeta++) @@ -62,9 +60,10 @@ public class WoodchipperRecipes if(unlocStack.length == 2) { if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) - TileEntityWoodchipper.addItemStackToFuels(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 0)); + TileEntityWoodchipper.addFuel(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 0)); else - System.out.println("[CrissCross] Item " + ConfigHandler.woodchipperFuels[i] + " could not be added to the Woodchipper's fuel list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.woodchipperFuels[i] + + " could not be added to the Woodchipper's fuel list. Please confirm you have the name and formatting correct."); } if(unlocStack.length == 3) @@ -72,15 +71,16 @@ public class WoodchipperRecipes if(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1) != null) { ItemStack newStack = new ItemStack(GameRegistry.findItemStack(unlocStack[0], unlocStack[1], 1).getItem(), 1, Integer.parseInt(unlocStack[2])); - TileEntityWoodchipper.addItemStackToFuels(newStack); + TileEntityWoodchipper.addFuel(newStack); } else - System.out.println("[CrissCross] Item " + ConfigHandler.woodchipperFuels[i] + " could not be added to the Woodchipper's fuel list. Please confirm you have the name and formatting correct."); + CrissCross.printErr("[CrissCross] Item " + ConfigHandler.woodchipperFuels[i] + + " could not be added to the Woodchipper's fuel list. Please confirm you have the name and formatting correct."); } } catch(Exception e) { - System.out.println("[CrissCross]: Error reading itemstack for Woodchipper's energy sources at item: " + (i + 1)); + CrissCross.printErr("[CrissCross]: Error reading itemstack for Woodchipper's energy sources at item: " + (i + 1)); } } } diff --git a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityCropomator.java b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityCropomator.java index 1057b66..890bc46 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityCropomator.java +++ b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityCropomator.java @@ -31,8 +31,7 @@ public class TileEntityCropomator extends TileEntity implements ISidedInventory public int catalystTime; public int processTime; public int catalystInUseTime; - - + @Override public int getSizeInventory() { diff --git a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityElectroextractor.java b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityElectroextractor.java index a3b39ad..f760ba7 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityElectroextractor.java +++ b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityElectroextractor.java @@ -3,6 +3,7 @@ package com.oitsjustjose.criss_cross.TileEntity; import java.util.ArrayList; import com.oitsjustjose.criss_cross.Blocks.BlockElectroextractor; +import com.oitsjustjose.criss_cross.Items.ItemDust; import com.oitsjustjose.criss_cross.Util.ConfigHandler; import cpw.mods.fml.relauncher.Side; @@ -302,24 +303,24 @@ public class TileEntityElectroextractor extends TileEntity implements ISidedInve outputItems.add(output); } - public static void addItemRecipe(Item item, ItemStack output) + public static void addRecipe(Item item, ItemStack output) { inputItems.add(new ItemStack(item)); outputItems.add(output); } - public static void addBlockRecipe(Block block, ItemStack output) + public static void addRecipe(Block block, ItemStack output) { inputItems.add(new ItemStack(block)); outputItems.add(output); } - public static void addItemStackToFuels(ItemStack itemstack) + public static void addFuel(ItemStack itemstack) { fuelItems.add(itemstack); } - public static boolean removeItemStackFromFuels(ItemStack itemstack) + public static boolean removeFuel(ItemStack itemstack) { for(int i = 0; i < fuelItems.size(); i++) { @@ -354,6 +355,7 @@ public class TileEntityElectroextractor extends TileEntity implements ISidedInve if(inputItems.get(i).getItem() == ItemStacks[0].getItem() && inputItems.get(i).getItemDamage() == ItemStacks[0].getItemDamage()) { output = new ItemStack(outputItems.get(i).getItem(), qty, outputItems.get(i).getItemDamage()); + output.setStackDisplayName("Electrolytic " + ItemDust.getName(outputItems.get(i).getItemDamage()) + " Dust"); } } diff --git a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityWoodchipper.java b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityWoodchipper.java index 058a9e8..e9e4f7c 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityWoodchipper.java +++ b/src/main/java/com/oitsjustjose/criss_cross/TileEntity/TileEntityWoodchipper.java @@ -301,24 +301,24 @@ public class TileEntityWoodchipper extends TileEntity implements ISidedInventory outputItems.add(output); } - public static void addItemRecipe(Item item, ItemStack output) + public static void addRecipe(Item item, ItemStack output) { inputItems.add(new ItemStack(item)); outputItems.add(output); } - public static void addBlockRecipe(Block block, ItemStack output) + public static void addRecipe(Block block, ItemStack output) { inputItems.add(new ItemStack(block)); outputItems.add(output); } - public static void addItemStackToFuels(ItemStack itemstack) + public static void addFuel(ItemStack itemstack) { fuelItems.add(itemstack); } - public static boolean removeItemStackFromFuels(ItemStack itemstack) + public static boolean removeFuel(ItemStack itemstack) { for(int i = 0; i < fuelItems.size(); i++) { diff --git a/src/main/java/com/oitsjustjose/criss_cross/Util/ConfigHandler.java b/src/main/java/com/oitsjustjose/criss_cross/Util/ConfigHandler.java index ba35c63..5150d6f 100644 --- a/src/main/java/com/oitsjustjose/criss_cross/Util/ConfigHandler.java +++ b/src/main/java/com/oitsjustjose/criss_cross/Util/ConfigHandler.java @@ -51,21 +51,6 @@ public class ConfigHandler public static int woodchipperOutput; public static String woodchipperRecipeItem; public static String[] woodchipperFuels; - public static String[] woodchipperLogs; - public static String[] woodchipperPlanks; - - public static String[] defaultWoodchipperLogs = new String[] - { - "minecraft:log:0", "minecraft:log:1", "minecraft:log:2", - "minecraft:log:3", "minecraft:log2:0", "minecraft:log2:1" - }; - - public static String[] defaultWoodchipperPlanks = new String[] - { - "minecraft:planks:0", "minecraft:planks:1", "minecraft:planks:2", - "minecraft:planks:3", "minecraft:planks:4", "minecraft:planks:5" - }; - public static String[] defaultWoodchipperFuels = new String[] { "minecraft:water_bucket", "minecraft:potion:0" @@ -84,10 +69,10 @@ public class ConfigHandler private static void loadConfiguration() { //Cropomator Configs - cropomatorInputs = config.get(config.CATEGORY_GENERAL, "Items to be added to the Cropomator's recipes.", defaultCropomatorInputs, + cropomatorInputs = config.get(config.CATEGORY_GENERAL, "Cropomator's Recipe Items.", defaultCropomatorInputs, "A list of items to be added to the Cropomator's recipe list. Formatted as: :: or :.").getStringList(); - cropomatorCatalysts = config.get(config.CATEGORY_GENERAL, "Items to be added to the Cropomator's Catalyst list.", defaultCropomatorCatalystItems, + cropomatorCatalysts = config.get(config.CATEGORY_GENERAL, "Cropomator's Catalyst Items.", defaultCropomatorCatalystItems, "A list of items to be added to the Cropomator's catalyst list. Formatted as: :: or :.").getStringList(); cropomatorProcessTime = config.getInt("Cropomator Processing Time", config.CATEGORY_GENERAL, 150, 1, Short.MAX_VALUE, @@ -96,11 +81,11 @@ public class ConfigHandler cropomatorOutput = config.getInt("Cropomator Output Quantity", config.CATEGORY_GENERAL, 3, 0, 64, "Control how many of the input item you get as the output item. Default is 3."); - cropomatorRecipeItem = config.getString("Key crafting item of the Cropomator.", config.CATEGORY_GENERAL, "minecraft:diamond_block", + cropomatorRecipeItem = config.getString("Cropomator Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block", "This is the item located in the center of the crafting recipe for the Cropomator. Formatted as: :: or :."); //Electroextractor's Configs - electroextractorEnergySources = config.get(config.CATEGORY_GENERAL, "Items to be added to the Electroextractor's energy sources.", defaultElectroextractorEnergySources, + electroextractorEnergySources = config.get(config.CATEGORY_GENERAL, "Electroextractor's Fuel Items.", defaultElectroextractorEnergySources, "A list of items to be added as the Electroextractor's energy sources. Formatted as: :: or :.").getStringList(); electroextractorProcessTime = config.getInt("Electroextractor Processing Time", config.CATEGORY_GENERAL, 250, 0, Short.MAX_VALUE, @@ -109,15 +94,15 @@ public class ConfigHandler electroextractorOutput = config.getInt("Electroextractor Output Quantity", config.CATEGORY_GENERAL, 2, 0, 64, "Control how many dusts you get as the output. Default is 2."); - electroextractorRecipeItem = config.getString("Key crafting item of the Electroextractor.", config.CATEGORY_GENERAL, "minecraft:diamond_block", + electroextractorRecipeItem = config.getString("Electroextractor Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block", "This is the item located in the center of the crafting recipe for the Electroextractor. Formatted as: :: or :."); - electroextractorOreDictInputs = config.get(config.CATEGORY_GENERAL, "Ore Dictionary Entries to be added to the Electroextractor.", defaultElectroextractorOreDictInputs, + electroextractorOreDictInputs = config.get(config.CATEGORY_GENERAL, "Electroextractor OreDictionary Entries.", defaultElectroextractorOreDictInputs, "Formatted as :." + "\n" + " Remove the 'ore' part of the oredict name (i.e. 'oreIron' should be entered as 'Iron')" + "\n" + "Use http://www.colorpicker.com/ to find a color and http://bit.ly/1RhPhcX to convert it from Hex to Decimal.").getStringList(); //Woodchipper's Configs - woodchipperFuels = config.get(config.CATEGORY_GENERAL, "Items to be added as the Woodchipper's 'fuels'", defaultWoodchipperFuels, + woodchipperFuels = config.get(config.CATEGORY_GENERAL, "Woodchipper Fuel Items", defaultWoodchipperFuels, "A list of items to be added as the Woodchipper's 'fuels'. Formatted as: :: or :.").getStringList(); woodchipperProcessTime = config.getInt("Woodchipper Process Time", config.CATEGORY_GENERAL, 400, 0, Short.MAX_VALUE, @@ -126,17 +111,9 @@ public class ConfigHandler woodchipperOutput = config.getInt("Woodchipper Output Quantity", config.CATEGORY_GENERAL, 6, 0, 64, "Control how many planks are yielded from processing a log. Default is 6."); - woodchipperRecipeItem = config.getString("Key crafting item of the Woodchipper", config.CATEGORY_GENERAL, "minecraft:diamond_block", + woodchipperRecipeItem = config.getString("Woodchipper Crafting Item", config.CATEGORY_GENERAL, "minecraft:diamond_block", "This is the item located in the center of the crafting recipe for the Woodchipper. Formatted as: :: or :."); - woodchipperLogs = config.get(config.CATEGORY_GENERAL, "Items that the Woodchipper shall consider as logs.", defaultWoodchipperLogs, - "These should 1:1 match what you put in the list of planks. So the first item on this list corresponds to the first item on the planks list, etc. etc." + "\n" + - "Formatted as: :: or :.").getStringList(); - - woodchipperPlanks = config.get(config.CATEGORY_GENERAL, "Items that the Woodchipper shall consider as planks.", defaultWoodchipperPlanks, - "These should 1:1 match what you put in the list of logs. So the first item on this list corresponds to the first item on the logs list, etc. etc." + "\n" + - "Formatted as: :: or :.").getStringList(); - if (config.hasChanged()) config.save(); }