made progress in improvement of block breaking, for #1571
This commit is contained in:
parent
1d97913609
commit
c3c3a3d3f0
4 changed files with 19 additions and 10 deletions
|
@ -30,11 +30,11 @@ import buildcraft.api.filler.IFillerPattern;
|
|||
import buildcraft.api.gates.ActionManager;
|
||||
import buildcraft.builders.BlockArchitect;
|
||||
import buildcraft.builders.BlockBlueprintLibrary;
|
||||
import buildcraft.builders.BlockBuildTool;
|
||||
import buildcraft.builders.BlockBuilder;
|
||||
import buildcraft.builders.BlockFiller;
|
||||
import buildcraft.builders.BlockMarker;
|
||||
import buildcraft.builders.BlockPathMarker;
|
||||
import buildcraft.builders.BlockStripes;
|
||||
import buildcraft.builders.BuilderProxy;
|
||||
import buildcraft.builders.EventHandlerBuilders;
|
||||
import buildcraft.builders.GuiHandler;
|
||||
|
@ -109,7 +109,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
public static final char BPT_SEP_CHARACTER = '-';
|
||||
public static final int LIBRARY_PAGE_SIZE = 12;
|
||||
public static final int MAX_BLUEPRINTS_NAME_SIZE = 14;
|
||||
public static BlockStripes stripesBlock;
|
||||
public static BlockBuildTool buildToolBlock;
|
||||
public static BlockMarker markerBlock;
|
||||
public static BlockPathMarker pathMarkerBlock;
|
||||
public static BlockFiller fillerBlock;
|
||||
|
@ -298,8 +298,8 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
LanguageRegistry.addName(blueprintItem, "Blueprint");
|
||||
CoreProxy.proxy.registerItem(blueprintItem);
|
||||
|
||||
stripesBlock = new BlockStripes ();
|
||||
CoreProxy.proxy.registerBlock(stripesBlock);
|
||||
buildToolBlock = new BlockBuildTool ();
|
||||
CoreProxy.proxy.registerBlock(buildToolBlock);
|
||||
|
||||
markerBlock = new BlockMarker();
|
||||
CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
||||
|
|
|
@ -15,9 +15,9 @@ import net.minecraft.util.IIcon;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStripes extends Block {
|
||||
public class BlockBuildTool extends Block {
|
||||
|
||||
public BlockStripes() {
|
||||
public BlockBuildTool() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,6 @@ public class BlockStripes extends Block {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
texture = par1IconRegister.registerIcon("buildcraft:blockStripesLaser");
|
||||
texture = par1IconRegister.registerIcon("buildcraft:blockRedLaser");
|
||||
}
|
||||
}
|
|
@ -109,7 +109,7 @@ public class BuildingItem implements IBuilder {
|
|||
|
||||
if (stacksToDisplay.size() == 0) {
|
||||
StackAtPosition sPos = new StackAtPosition();
|
||||
sPos.stack = new ItemStack(BuildCraftBuilders.stripesBlock);
|
||||
sPos.stack = new ItemStack(BuildCraftBuilders.buildToolBlock);
|
||||
stacksToDisplay.add(sPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,8 +132,17 @@ public class BptBuilderTemplate extends BptBuilderBase {
|
|||
if (BlockUtil.isSoftBlock(world, slot.x, slot.y, slot.z)) {
|
||||
iterator.remove();
|
||||
} else {
|
||||
slot.addStackConsumed(new ItemStack(
|
||||
BuildCraftBuilders.stripesBlock));
|
||||
int hardness = (int) context
|
||||
.world()
|
||||
.getBlock(slot.x, slot.y, slot.z)
|
||||
.getBlockHardness(context.world(), slot.x, slot.y,
|
||||
slot.z) + 1;
|
||||
|
||||
for (int i = 0; i < hardness; ++i) {
|
||||
slot.addStackConsumed(new ItemStack(
|
||||
BuildCraftBuilders.buildToolBlock));
|
||||
}
|
||||
|
||||
result = slot;
|
||||
iterator.remove();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue