From d50b472155ae91a017c4ba660c0efab0f0d9e502 Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Wed, 9 Oct 2013 15:21:27 +0800 Subject: [PATCH 1/5] Version 0.3.0 New - Added configurable input and output limits to Capacitor Banks - Added item charging to Capacitor Banks - Added BC gate triggers for Capacitor Banks (implemented by domi1819) - Update SAG Mill recipe update mecansim. The are now 'core' and user defined recipe files to avoid conflicts on update. - Tweaked SAG Mill recipes (implemented by Unrepentant-Atheist) Bugs - #168 Fixed crash when using Java 1.6 - #170 Stopped conduits and capacitor banks from draining power into BC item and fluid pipes. --- build.xml | 2 +- common/crazypants/enderio/EnderIO.java | 2 +- resources/mcmod.info | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index b6f08e60..e3e3e031 100644 --- a/build.xml +++ b/build.xml @@ -19,7 +19,7 @@ - + diff --git a/common/crazypants/enderio/EnderIO.java b/common/crazypants/enderio/EnderIO.java index 6b0289d0..a76bf10e 100644 --- a/common/crazypants/enderio/EnderIO.java +++ b/common/crazypants/enderio/EnderIO.java @@ -59,7 +59,7 @@ import crazypants.enderio.material.MaterialRecipes; import crazypants.enderio.trigger.TriggerEnderIO; import crazypants.enderio.trigger.TriggerProviderEIO; -@Mod(name = "EnderIO", modid = "EnderIO", version = "0.2.4b", dependencies = "required-after:Forge@[9.10.0.800,)") +@Mod(name = "EnderIO", modid = "EnderIO", version = "0.3.0", dependencies = "required-after:Forge@[9.10.0.800,)") @NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = { "EnderIO" }, packetHandler = PacketHandler.class) public class EnderIO { diff --git a/resources/mcmod.info b/resources/mcmod.info index 0c928d80..9a7a9a21 100644 --- a/resources/mcmod.info +++ b/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "EnderIO", "name": "Ender IO", "description": "Compact conduits, painted things and access to your stuff through an eye of ender.", - "version": "0.2.4b", + "version": "0.3.0", "mcversion": "1.6.2", "url": "http://www.minecraftforum.net/topic/1937619-162152-ender-io-how-many-pipes-in-one-block-updated-198/", "updateUrl": "", From 2176d5503d90e1e6d6e8405fa7a469f3a21655bc Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Wed, 9 Oct 2013 16:28:50 +0800 Subject: [PATCH 2/5] Release 1.3.1 --- build.xml | 2 +- common/crazypants/enderio/EnderIO.java | 2 +- resources/assets/enderio/config/SAGMillRecipes_Core.xml | 2 +- resources/mcmod.info | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index e3e3e031..a12b5e8a 100644 --- a/build.xml +++ b/build.xml @@ -19,7 +19,7 @@ - + diff --git a/common/crazypants/enderio/EnderIO.java b/common/crazypants/enderio/EnderIO.java index a76bf10e..323c9098 100644 --- a/common/crazypants/enderio/EnderIO.java +++ b/common/crazypants/enderio/EnderIO.java @@ -59,7 +59,7 @@ import crazypants.enderio.material.MaterialRecipes; import crazypants.enderio.trigger.TriggerEnderIO; import crazypants.enderio.trigger.TriggerProviderEIO; -@Mod(name = "EnderIO", modid = "EnderIO", version = "0.3.0", dependencies = "required-after:Forge@[9.10.0.800,)") +@Mod(name = "EnderIO", modid = "EnderIO", version = "0.3.1", dependencies = "required-after:Forge@[9.10.0.800,)") @NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = { "EnderIO" }, packetHandler = PacketHandler.class) public class EnderIO { diff --git a/resources/assets/enderio/config/SAGMillRecipes_Core.xml b/resources/assets/enderio/config/SAGMillRecipes_Core.xml index b09223b3..1e7cccac 100644 --- a/resources/assets/enderio/config/SAGMillRecipes_Core.xml +++ b/resources/assets/enderio/config/SAGMillRecipes_Core.xml @@ -135,7 +135,7 @@ - + diff --git a/resources/mcmod.info b/resources/mcmod.info index 9a7a9a21..82d6fa45 100644 --- a/resources/mcmod.info +++ b/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "EnderIO", "name": "Ender IO", "description": "Compact conduits, painted things and access to your stuff through an eye of ender.", - "version": "0.3.0", + "version": "0.3.1", "mcversion": "1.6.2", "url": "http://www.minecraftforum.net/topic/1937619-162152-ender-io-how-many-pipes-in-one-block-updated-198/", "updateUrl": "", From 9edd80707747d5f7a804f3dfe68d884d1e538bbd Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Fri, 11 Oct 2013 07:20:13 +0800 Subject: [PATCH 3/5] #177 Added more null checks. --- .../conduit/liquid/LiquidConduitNetwork.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/common/crazypants/enderio/conduit/liquid/LiquidConduitNetwork.java b/common/crazypants/enderio/conduit/liquid/LiquidConduitNetwork.java index 5d4b73d9..058d32a3 100644 --- a/common/crazypants/enderio/conduit/liquid/LiquidConduitNetwork.java +++ b/common/crazypants/enderio/conduit/liquid/LiquidConduitNetwork.java @@ -161,7 +161,7 @@ public class LiquidConduitNetwork extends AbstractConduitNetwork // Flush any tanks with a tiny bit left List toEmpty = new ArrayList(); for (ILiquidConduit con : conduits) { - if(con.getTank().getFluidAmount() < 10) { + if(con != null && con.getTank().getFluidAmount() < 10) { toEmpty.add(con); } else { //some of the conduits have fluid left in them so don't do the final drain yet @@ -246,12 +246,14 @@ public class LiquidConduitNetwork extends AbstractConduitNetwork if(con.getConduitConnections().contains(ForgeDirection.DOWN)) { BlockCoord loc = con.getLocation().getLocation(ForgeDirection.DOWN); ILiquidConduit downCon = ConduitUtil.getConduit(con.getBundle().getEntity().worldObj, loc.x, loc.y, loc.z, ILiquidConduit.class); - int filled = downCon.fill(ForgeDirection.UP, tank.getFluid().copy(), false, false, pushPoken); - int actual = filled; - actual = Math.min(actual, tank.getFluidAmount()); - actual = Math.min(actual, downCon.getTank().getAvailableSpace()); - tank.addAmount(-actual); - downCon.getTank().addAmount(actual); + if(downCon != null) { + int filled = downCon.fill(ForgeDirection.UP, tank.getFluid().copy(), false, false, pushPoken); + int actual = filled; + actual = Math.min(actual, tank.getFluidAmount()); + actual = Math.min(actual, downCon.getTank().getAvailableSpace()); + tank.addAmount(-actual); + downCon.getTank().addAmount(actual); + } } totalAmount = tank.getFluidAmount(); @@ -341,6 +343,9 @@ public class LiquidConduitNetwork extends AbstractConduitNetwork } private boolean canFlowTo(ILiquidConduit con, ILiquidConduit neighbour) { + if(con == null || neighbour == null) { + return false; + } if(neighbour.getNetwork() != this) { return false; } @@ -379,8 +384,10 @@ public class LiquidConduitNetwork extends AbstractConduitNetwork // and don't add more than it can take actual = Math.min(actual, to.getTank().getAvailableSpace()); - from.getTank().addAmount(-actual); - to.getTank().addAmount(actual); + if(from != null && to != null) { + from.getTank().addAmount(-actual); + to.getTank().addAmount(actual); + } } } From a66c65f59a3d4bd386f3d5de35c96e42fdcb1abb Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Mon, 14 Oct 2013 08:47:07 +0800 Subject: [PATCH 4/5] Small recipe tweaks. --- common/crazypants/enderio/Config.java | 2 +- common/crazypants/enderio/machine/MachineRecipes.java | 3 +-- common/crazypants/enderio/material/Alloy.java | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/crazypants/enderio/Config.java b/common/crazypants/enderio/Config.java index 9e81777f..a112682b 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; 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/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; From d4211a8682daf3c4ec7ad39f7ea73d4283db7c29 Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Mon, 14 Oct 2013 11:49:08 +0800 Subject: [PATCH 5/5] Fixed: #173 #174 #177 #184 --- common/crazypants/enderio/Config.java | 4 +- .../enderio/conduit/AbstractItemConduit.java | 12 +++-- .../enderio/machine/crusher/RecipeConfig.java | 8 +++ .../machine/hypercube/BlockHyperCube.java | 2 + .../machine/hypercube/HyperCubeRegister.java | 50 ++++++++++--------- 5 files changed, 45 insertions(+), 31 deletions(-) diff --git a/common/crazypants/enderio/Config.java b/common/crazypants/enderio/Config.java index a112682b..a8d932e3 100644 --- a/common/crazypants/enderio/Config.java +++ b/common/crazypants/enderio/Config.java @@ -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/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/BlockHyperCube.java b/common/crazypants/enderio/machine/hypercube/BlockHyperCube.java index 38acafb4..09a7f17f 100644 --- a/common/crazypants/enderio/machine/hypercube/BlockHyperCube.java +++ b/common/crazypants/enderio/machine/hypercube/BlockHyperCube.java @@ -208,6 +208,8 @@ public class BlockHyperCube extends Block implements ITileEntityProvider, IGuiHa if(!(te instanceof TileHyperCube)) { return false; } + TileHyperCube thc = (TileHyperCube) te; + thc.getTankInfo(ForgeDirection.EAST); entityPlayer.openGui(EnderIO.instance, GuiHandler.GUI_ID_HYPER_CUBE, world, x, y, z); return true; } 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) {