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.

This commit is contained in:
Andrew Dudney 2014-04-19 16:04:18 -06:00
parent 0799147b3f
commit 2296519573

View file

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