gt: 		Vec3 v3 = target.hitVec.addVector( -x, -y, -z );
context: package appeng.block.networking;
  
  import java.util.EnumSet;
  import java.util.List;
  import java.util.Random;
  
  import net.minecraft.block.Block;
  import net.minecraft.client.particle.EffectRenderer;
  import net.minecraft.client.particle.EntityDiggingFX;
  import net.minecraft.client.renderer.texture.IIconRegister;
  import net.minecraft.creativetab.CreativeTabs;
  import net.minecraft.entity.Entity;
  import net.minecraft.entity.EntityLivingBase;
  import net.minecraft.entity.player.EntityPlayer;
  import net.minecraft.item.Item;
  import net.minecraft.item.ItemStack;
  import net.minecraft.tileentity.TileEntity;
  import net.minecraft.util.IIcon;
  import net.minecraft.util.MovingObjectPosition;
  import net.minecraft.util.Vec3;
  import net.minecraft.world.IBlockAccess;
  import net.minecraft.world.World;
  import net.minecraftforge.common.util.ForgeDirection;
  import powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection;
  import powercrystals.minefactoryreloaded.api.rednet.connectivity.RedNetConnectionType;
  import appeng.api.parts.IPart;
  import appeng.api.parts.IPartHost;
  import appeng.api.parts.PartItemStack;
  import appeng.api.parts.SelectedPart;
  import appeng.api.util.AEColor;
  import appeng.block.AEBaseBlock;
  import appeng.client.render.BaseBlockRender;
  import appeng.client.render.BusRenderHelper;
  import appeng.client.render.blocks.RendererCableBus;
  import appeng.client.texture.ExtraBlockTextures;
  import appeng.core.AEConfig;
  import appeng.core.Api;
  import appeng.core.AppEng;
  import appeng.core.CommonHelper;
  import appeng.core.features.AEFeature;
  import appeng.helpers.AEGlassMaterial;
  import appeng.integration.IntegrationType;
  import appeng.integration.abstraction.IFMP;
  import appeng.parts.ICableBusContainer;
  import appeng.parts.NullCableBusContainer;
  import appeng.tile.AEBaseTile;
  import appeng.tile.networking.TileCableBus;
  import appeng.tile.networking.TileCableBusTESR;
  import appeng.transformer.annotations.integration.Interface;
  import appeng.transformer.annotations.integration.Method;
  import appeng.util.Platform;
  import cpw.mods.fml.common.registry.GameRegistry;
  import cpw.mods.fml.relauncher.Side;
  import cpw.mods.fml.relauncher.SideOnly;
  
  @Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR")
  public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
  {
  
  	static private final ICableBusContainer nullCB = new NullCableBusContainer();
  	static public Class<? extends TileEntity> noTesrTile;
  	static public Class<? extends TileEntity> tesrTile;
  
  	@Override
  	public <T extends TileEntity> T getTileEntity(IBlockAccess w, int x, int y, int z)
  	{
  		TileEntity te = w.getTileEntity( x, y, z );
  
  		if ( noTesrTile.isInstance( te ) )
  			return (T) te;
  
  		if ( tesrTile != null && tesrTile.isInstance( te ) )
  			return (T) te;
  
  		return null;
  	}
  
  	public BlockCableBus() {
  		super( BlockCableBus.class, AEGlassMaterial.instance );
  		setFeature( EnumSet.of( AEFeature.Core ) );
  		setLightOpacity( 0 );
  		isFullSize = isOpaque = false;
  	}
  
  	@Override
  	public int getRenderBlockPass()
  	{
  		if ( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
  			return 1;
  		return 0;
  	}
  
  	@Override
  	@SideOnly(Side.CLIENT)
  	public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
  	{
  		Object object = cb( world, target.blockX, target.blockY, target.blockZ );
  		if ( object instanceof IPartHost )
  		{
  			IPartHost host = (IPartHost) object;
  
  			for (ForgeDirection side : ForgeDirection.values())
  			{
  				IPart p = host.getPart( side );
  				IIcon ico = getIcon( p );
  
  				if ( ico == null )
  					continue;
  
  				byte b0 = (byte) (Platform.getRandomInt() % 2 == 0 ? 1 : 0);
  
  				for (int i1 = 0; i1 < b0; ++i1)
  				{
  					for (int j1 = 0; j1 < b0; ++j1)
  					{
  						for (int k1 = 0; k1 < b0; ++k1)
  						{
  							double d0 = target.blockX + (i1 + 0.5D) / b0;
  							double d1 = target.blockY + (j1 + 0.5D) / b0;
  							double d2 = target.blockZ + (k1 + 0.5D) / b0;
  
  							double dd0 = target.hitVec.xCoord;
  							double dd1 = target.hitVec.yCoord;
  							double dd2 = target.hitVec.zCoord;
  							EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - target.blockX - 0.5D, d1 - target.blockY
  									- 0.5D, d2 - target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
  
  							fx.setParticleIcon( ico );
  
  							effectRenderer.addEffect( fx );
  						}
  					}
  				}
  			}
  		}
  
  		return true;
  	}
  
  	@Override
  	@SideOnly(Side.CLIENT)
  	public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
  	{
  		Object object = cb( world, x, y, z );
  		if ( object instanceof IPartHost )
  		{
  			IPartHost host = (IPartHost) object;
  
  			for (ForgeDirection side : ForgeDirection.values())
  			{
  				IPart p = host.getPart( side );
  				IIcon ico = getIcon( p );
  
  				if ( ico == null )
  					continue;
  
  				byte b0 = 3;
  
  				for (int i1 = 0; i1 < b0; ++i1)
  				{
  					for (int j1 = 0; j1 < b0; ++j1)
  					{
  						for (int k1 = 0; k1 < b0; ++k1)
  						{
  							double d0 = x + (i1 + 0.5D) / b0;
  							double d1 = y + (j1 + 0.5D) / b0;
  							double d2 = z + (k1 + 0.5D) / b0;
  							EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - x - 0.5D, d1 - y - 0.5D, d2 - z
  									- 0.5D, this, meta )).applyColourMultiplier( x, y, z );
  
  							fx.setParticleIcon( ico );
  
  							effectRenderer.addEffect( fx );
  						}
  					}
  				}
  			}
  		}
  
  		return true;
  	}
  
  	private IIcon getIcon(IPart p)
  	{
  		if ( p == null )
  			return null;
  
  		try
  		{
  			IIcon ico = p.getBreakingTexture();
  			if ( ico != null )
  				return ico;
  		}
  		catch (Throwable t)
  		{
  			// nothing.
  		}
  
  		ItemStack is = p.getItemStack( PartItemStack.Network );
  		if ( is == null || is.getItem() == null )
  			return null;
  
  		return is.getItem().getIcon( is, 0 );
  	}
  
  	@Override
  	public boolean canRenderInPass(int pass)
  	{
  		BusRenderHelper.instance.setPass( pass );
  
  		if ( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
  			return true;
  
  		return pass == 0;
  	}
  
  	@Override
  	public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity)
  	{
  		return cb( world, x, y, z ).isLadder( entity );
  	}
  
  	@Override
  	public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour)
  	{
  		return recolourBlock( world, x, y, z, side, colour, null );
  	}
  
  	public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour, EntityPlayer who)
  	{
  		try
  		{
  			return cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
  		}
  		catch (Throwable ignored)
  		{
  		}
  		return false;
  	}
  
  	@Override
  	public void randomDisplayTick(World world, int x, int y, int z, Random r)
  	{
  		cb( world, x, y, z ).randomDisplayTick( world, x, y, z, r );
  	}
  
  	@Override
  	public int getLightValue(IBlockAccess world, int x, int y, int z)
  	{
  		Block block = world.getBlock( x, y, z );
  		if ( block != null && block != this )
  		{
  			return block.getLightValue( world, x, y, z );
  		}
  		if ( block == null )
  			return 0;
  		return cb( world, x, y, z ).getLightValue();
  	}
  
  	@Override
  	public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
  	{
  