diff --git a/common/crazypants/enderio/Config.java b/common/crazypants/enderio/Config.java index 9e81777f..a8d932e3 100644 --- a/common/crazypants/enderio/Config.java +++ b/common/crazypants/enderio/Config.java @@ -25,7 +25,7 @@ public final class Config { public static double conduitScale = DEFAULT_CONDUIT_SCALE; - public static int numConduitsPerRecipe = 4; + public static int numConduitsPerRecipe = 8; public static double transceiverEnergyLoss = 0.1; @@ -52,9 +52,7 @@ public final class Config { try { FileUtils.moveFile(deprecatedFile, configFile); } catch (IOException e) { - Log.error("Could not move old config file to new directory: " + e); - e.printStackTrace(); - throw new RuntimeException("Could not move old config file to new directory.", e); + Log.warn("Could not move old config file to new directory: " + e); } } diff --git a/common/crazypants/enderio/conduit/AbstractItemConduit.java b/common/crazypants/enderio/conduit/AbstractItemConduit.java index 3de19c94..a29098db 100644 --- a/common/crazypants/enderio/conduit/AbstractItemConduit.java +++ b/common/crazypants/enderio/conduit/AbstractItemConduit.java @@ -66,10 +66,12 @@ public abstract class AbstractItemConduit extends Item implements IConduitItem { if(!world.isRemote) { if(world.setBlock(placeAt.x, placeAt.y, placeAt.z, ModObject.blockConduitBundle.actualId, 0, 1)) { IConduitBundle bundle = (IConduitBundle) world.getBlockTileEntity(placeAt.x, placeAt.y, placeAt.z); - bundle.addConduit(createConduit(stack)); - Block b = EnderIO.blockConduitBundle; - world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, b.stepSound.getPlaceSound(), - (b.stepSound.getVolume() + 1.0F) / 2.0F, b.stepSound.getPitch() * 0.8F); + if(bundle != null) { + bundle.addConduit(createConduit(stack)); + Block b = EnderIO.blockConduitBundle; + world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, b.stepSound.getPlaceSound(), + (b.stepSound.getVolume() + 1.0F) / 2.0F, b.stepSound.getPitch() * 0.8F); + } } } if(!player.capabilities.isCreativeMode) { @@ -88,7 +90,7 @@ public abstract class AbstractItemConduit extends Item implements IConduitItem { IConduitBundle bundle = (TileConduitBundle) world.getBlockTileEntity(placeX, placeY, placeZ); if(bundle == null) { - System.out.println("AbstractItemConduit.onItemUse: Bunle null"); + System.out.println("AbstractItemConduit.onItemUse: Bundle null"); return false; } IConduit con = createConduit(stack); diff --git a/common/crazypants/enderio/machine/MachineRecipes.java b/common/crazypants/enderio/machine/MachineRecipes.java index 23d00486..29352132 100644 --- a/common/crazypants/enderio/machine/MachineRecipes.java +++ b/common/crazypants/enderio/machine/MachineRecipes.java @@ -39,8 +39,7 @@ public class MachineRecipes { //stirling gen ItemStack stirlingGen = new ItemStack(blockStirlingGenerator.actualId, 1, 0); - GameRegistry.addShapedRecipe(stirlingGen, "bcb", "bfb", "gpg", 'b', Block.stoneBrick, 'f', Block.furnaceIdle, 'p', Block.pistonBase, 'g', basicGear, 'c', - capacitor); + GameRegistry.addShapedRecipe(stirlingGen, "bbb", "bfb", "gpg", 'b', Block.stoneBrick, 'f', Block.furnaceIdle, 'p', Block.pistonBase, 'g', basicGear); //reservoir ItemStack fusedQuartz = new ItemStack(ModObject.blockFusedQuartz.actualId, 1, 0); diff --git a/common/crazypants/enderio/machine/crusher/RecipeConfig.java b/common/crazypants/enderio/machine/crusher/RecipeConfig.java index 7f10b0ca..82452873 100644 --- a/common/crazypants/enderio/machine/crusher/RecipeConfig.java +++ b/common/crazypants/enderio/machine/crusher/RecipeConfig.java @@ -21,6 +21,14 @@ public class RecipeConfig { } public void merge(RecipeConfig userConfig) { + + if(userConfig.dumpItemRegistery) { + dumpItemRegistery = true; + } + if(userConfig.dumpOreDictionary) { + dumpOreDictionary = true; + } + for (RecipeGroup group : userConfig.getRecipeGroups().values()) { if(!group.enabled) { if(recipeGroups.remove(group.name) != null) { diff --git a/common/crazypants/enderio/machine/hypercube/HyperCubeRegister.java b/common/crazypants/enderio/machine/hypercube/HyperCubeRegister.java index cd7d617a..db130f49 100644 --- a/common/crazypants/enderio/machine/hypercube/HyperCubeRegister.java +++ b/common/crazypants/enderio/machine/hypercube/HyperCubeRegister.java @@ -52,36 +52,40 @@ public class HyperCubeRegister { } private void convertOldFile() { - File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg"); - Configuration config = new Configuration(oldFile); - config.load(); + try { + File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg"); + Configuration config = new Configuration(oldFile); + config.load(); - Property pcNamesProp = config.get(CATEGORY_PUBLIC_CHANNELS, "names", new String[] {}); - String[] pcNames = pcNamesProp.getStringList(); - if(pcNames != null) { - for (String name : pcNames) { - publicChannels.add(new Channel(name, null)); + Property pcNamesProp = config.get(CATEGORY_PUBLIC_CHANNELS, "names", new String[] {}); + String[] pcNames = pcNamesProp.getStringList(); + if(pcNames != null) { + for (String name : pcNames) { + publicChannels.add(new Channel(name, null)); + } } - } - Property userNamesProp = config.get(CATEGORY_PRIVATE_CHANNELS, "users", new String[] {}); - String[] userNames = userNamesProp.getStringList(); - if(userNames != null) { - for (String user : userNames) { - Property userChannles = config.get(CATEGORY_PRIVATE_CHANNELS, user + ".channels", new String[] {}); - String[] channelNames = userChannles.getStringList(); - if(channelNames != null && channelNames.length > 0) { - List channels = getChannelsForUser(user); - for (String chanName : channelNames) { - channels.add(new Channel(chanName, user)); + Property userNamesProp = config.get(CATEGORY_PRIVATE_CHANNELS, "users", new String[] {}); + String[] userNames = userNamesProp.getStringList(); + if(userNames != null) { + for (String user : userNames) { + Property userChannles = config.get(CATEGORY_PRIVATE_CHANNELS, user + ".channels", new String[] {}); + String[] channelNames = userChannles.getStringList(); + if(channelNames != null && channelNames.length > 0) { + List channels = getChannelsForUser(user); + for (String chanName : channelNames) { + channels.add(new Channel(chanName, user)); + } } } } + + updateConfig(); + + oldFile.renameTo(new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg.old")); + } catch (Exception e) { + Log.warn("Could not convert old Dimensional Transciever (hypercube.cfg) to new format. Channles will be reset."); } - updateConfig(); - - oldFile.renameTo(new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg.old")); - } public synchronized List getChannelsForUser(String user) { diff --git a/common/crazypants/enderio/material/Alloy.java b/common/crazypants/enderio/material/Alloy.java index 2b463307..319c0d66 100644 --- a/common/crazypants/enderio/material/Alloy.java +++ b/common/crazypants/enderio/material/Alloy.java @@ -25,9 +25,8 @@ public enum Alloy { new ItemStack(ModObject.itemMaterial.actualId, 1, Material.SILICON.ordinal())), CONDUCTIVE_IRON("Conductive Iron", "conductiveIron", - new ItemStack(Item.redstone), - new ItemStack(Item.ingotIron), - new ItemStack(Item.redstone)); + new ItemStack(Item.redstone, 2), + new ItemStack(Item.ingotIron)); public final String unlocalisedName; public final String uiName;