if (par3World.isRemote)
par2EntityPlayer.swingItem();
playSound(par3World, par4, par5, par6);
if (tile instanceof TileTransvector)
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.set"));
else
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.golemconnector.set"));
} else
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.notinterf"));
} else {
int x = getX(par1ItemStack);
int y = getY(par1ItemStack);
int z = getZ(par1ItemStack);
TileEntity tile1 = par3World.getTileEntity(x, y, z);
if (tile1 == null || !(tile1 instanceof TileTransvector)) {
setY(par1ItemStack, -1);
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.notpresent"));
} else {
TileTransvector trans = (TileTransvector) tile1;
if (tile != null && tile1 instanceof TileTransvectorInterface && tile instanceof TileTransvectorInterface) {
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.interffail"));
return true;
}
if (Math.abs(x - par4) > trans.getMaxDistance() || Math.abs(y - par5) > trans.getMaxDistance() || Math.abs(z - par6) > trans.getMaxDistance()) {
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.toofar"));
return true;
}
trans.x = par4;
trans.y = par5;
trans.z = par6;
setY(par1ItemStack, -1);
playSound(par3World, par4, par5, par6);
par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.complete"));
par3World.markBlockForUpdate(trans.x, trans.y, trans.z);
}
}
return true;