diff --git a/common/mekanism/common/miner/ThreadMinerSearch.java b/common/mekanism/common/miner/ThreadMinerSearch.java index b7e1226d1..4d3fb943c 100644 --- a/common/mekanism/common/miner/ThreadMinerSearch.java +++ b/common/mekanism/common/miner/ThreadMinerSearch.java @@ -6,6 +6,7 @@ import mekanism.api.Coord4D; import mekanism.common.IBoundingBlock; import mekanism.common.tile.TileEntityDigitalMiner; import mekanism.common.util.MekanismUtils; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; public class ThreadMinerSearch extends Thread @@ -54,7 +55,7 @@ public class ThreadMinerSearch extends Thread int blockID = tileEntity.worldObj.getBlockId(x, y, z); int meta = tileEntity.worldObj.getBlockMetadata(x, y, z); - if(blockID != 0) + if(blockID != 0 && blockID != Block.bedrock.blockID) { ItemStack stack = new ItemStack(blockID, 1, meta); diff --git a/common/mekanism/common/multipart/MultipartMekanism.java b/common/mekanism/common/multipart/MultipartMekanism.java index c91f06365..73441d472 100644 --- a/common/mekanism/common/multipart/MultipartMekanism.java +++ b/common/mekanism/common/multipart/MultipartMekanism.java @@ -31,6 +31,7 @@ public class MultipartMekanism implements IPartFactory MultipartGenerator.registerPassThroughInterface("cofh.api.energy.IEnergyHandler"); MultipartGenerator.registerPassThroughInterface("mekanism.common.IConfigurable"); MultipartGenerator.registerPassThroughInterface("mekanism.common.ITileNetwork"); + MultipartGenerator.registerPassThroughInterface("ic2.api.tile.IWrenchable"); MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.IBlockableConnection"); } diff --git a/common/mekanism/common/multipart/PartSidedPipe.java b/common/mekanism/common/multipart/PartSidedPipe.java index a2e2361d4..487edc2ab 100644 --- a/common/mekanism/common/multipart/PartSidedPipe.java +++ b/common/mekanism/common/multipart/PartSidedPipe.java @@ -1,5 +1,7 @@ package mekanism.common.multipart; +import ic2.api.tile.IWrenchable; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -10,20 +12,15 @@ import java.util.Set; import mekanism.api.Coord4D; import mekanism.api.EnumColor; import mekanism.api.transmitters.IBlockableConnection; -import mekanism.api.transmitters.IGridTransmitter; import mekanism.api.transmitters.ITransmitter; import mekanism.api.transmitters.TransmissionType; import mekanism.client.render.RenderPartTransmitter; import mekanism.common.IConfigurable; import mekanism.common.ITileNetwork; import mekanism.common.Mekanism; -import mekanism.common.PacketHandler; -import mekanism.common.PacketHandler.Transmission; import mekanism.common.item.ItemConfigurator; import mekanism.common.multipart.PartUniversalCable.CableTier; import mekanism.common.multipart.TransmitterType.Size; -import mekanism.common.network.PacketTransmitterUpdate; -import mekanism.common.network.PacketTransmitterUpdate.PacketType; import net.minecraft.client.particle.EffectRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -56,7 +53,7 @@ import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart, JNormalOcclusion, IHollowConnect, JIconHitEffects, ITileNetwork, IBlockableConnection, IConfigurable, ITransmitter +public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart, JNormalOcclusion, IHollowConnect, JIconHitEffects, ITileNetwork, IBlockableConnection, IConfigurable, ITransmitter, IWrenchable { public static IndexedCuboid6[] smallSides = new IndexedCuboid6[7]; public static IndexedCuboid6[] largeSides = new IndexedCuboid6[7]; @@ -613,6 +610,39 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart, return connectionTypes[side.ordinal()] == ConnectionType.NORMAL || connectionTypes[side.ordinal()] == ConnectionType.PUSH; } } + + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) + { + return false; + } + + @Override + public short getFacing() + { + return 0; + } + + @Override + public void setFacing(short facing) {} + + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) + { + return true; + } + + @Override + public float getWrenchDropRate() + { + return 1.0F; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) + { + return new ItemStack(Mekanism.PartTransmitter, 1, getTransmitter().ordinal()); + } public static enum ConnectionType {