Merge pull request #462 from nevercast/patch-pipe-break

Made pipes slightly harder to break
This commit is contained in:
CovertJaguar 2012-11-30 06:20:26 -08:00
commit d2f262b899
4 changed files with 12 additions and 1 deletions

View file

@ -18,7 +18,7 @@
<property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft"/>
<property name="mcp.version" value="723"/>
<property name="forge.version" value="1.4.5-6.4.0.396"/>
<property name="forge.version" value="1.4.5-6.4.1.408"/>
<property name="bc.version" value="3.1.8"/>
<available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip"/>

View file

@ -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(",");

View file

@ -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;

View file

@ -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;