From 23b7c933e6107162d8e1eeee4cc04c2c6ec125c6 Mon Sep 17 00:00:00 2001 From: NeverCast Date: Fri, 30 Nov 2012 21:14:45 +1300 Subject: [PATCH] Made pipes slightly harder to break Configuration option added Also updated build.xml ( Required, previous forge version didn't have double support in Configuration ) --- build.xml | 2 +- common/buildcraft/BuildCraftTransport.java | 5 +++++ common/buildcraft/core/DefaultProps.java | 1 + common/buildcraft/transport/BlockGenericPipe.java | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 51096c1b..cd34e431 100644 --- a/build.xml +++ b/build.xml @@ -18,7 +18,7 @@ - + diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index e0650561..42cc575c 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -99,6 +99,7 @@ public class BuildCraftTransport { public static boolean alwaysConnectPipes; public static boolean usePipeLoss; public static int maxItemsInPipes; + public static float pipeDuribility; public static Item pipeWaterproof; public static Item pipeGate; @@ -218,6 +219,10 @@ public class BuildCraftTransport { pipeLoss.comment = "Set to false to turn off energy loss over distance on all power pipes"; usePipeLoss = pipeLoss.getBoolean(DefaultProps.USE_PIPELOSS); + Property duribility = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pipes.duribility", DefaultProps.PIPES_DURIBILITY); + duribility.comment = "How long a pipe will take to break"; + pipeDuribility = (float)duribility.getDouble(DefaultProps.PIPES_DURIBILITY); + Property exclusionItemList = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_BLOCK,"woodenPipe.item.exclusion", ""); String[] excludedItemBlocks = exclusionItemList.value.split(","); diff --git a/common/buildcraft/core/DefaultProps.java b/common/buildcraft/core/DefaultProps.java index 23fefafb..3334115f 100644 --- a/common/buildcraft/core/DefaultProps.java +++ b/common/buildcraft/core/DefaultProps.java @@ -117,6 +117,7 @@ public class DefaultProps { public static boolean CURRENT_CONTINUOUS = false; public static boolean PIPES_ALWAYS_CONNECT = false; + public static double PIPES_DURIBILITY = 0.25D; public static boolean FILLER_DESTROY = false; public static boolean USE_PIPELOSS = true; diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index d0c1d243..628c7fda 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -50,6 +50,11 @@ public class BlockGenericPipe extends BlockContainer { } + @Override + public float getBlockHardness(World par1World, int par2, int par3, int par4) { + return BuildCraftTransport.pipeDuribility; + } + @Override public int getRenderType() { return TransportProxy.pipeModel;