From 22965195731937d3b3dc8bdee2e72d5ed79fd566 Mon Sep 17 00:00:00 2001 From: Andrew Dudney Date: Sat, 19 Apr 2014 16:04:18 -0600 Subject: [PATCH] Changed minimum hardness to 1, so that digging dirt is no longer a free operation. Changed breaking blocks to have only the exact amount of red cubes sent toward them equal to their hardness. --- common/buildcraft/core/blueprints/BptBuilderBase.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/buildcraft/core/blueprints/BptBuilderBase.java b/common/buildcraft/core/blueprints/BptBuilderBase.java index 277b9293..e2c80c36 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBase.java +++ b/common/buildcraft/core/blueprints/BptBuilderBase.java @@ -148,15 +148,17 @@ public abstract class BptBuilderBase implements IAreaProvider { .getBlock(slot.x, slot.y, slot.z) .getBlockHardness(context.world(), slot.x, slot.y, slot.z); + if(hardness == 0){ + hardness = 1; + } if (builder.energyAvailable() < hardness * TileAbstractBuilder.BREAK_ENERGY) { return false; } else { builder.consumeEnergy(hardness * TileAbstractBuilder.BREAK_ENERGY); - for (int i = 0; i <= hardness; ++i) { - slot.addStackConsumed(new ItemStack( - BuildCraftBuilders.buildToolBlock)); + for (int i = 0; i < hardness; ++i) { + slot.addStackConsumed(new ItemStack(BuildCraftBuilders.buildToolBlock)); } return true;