You would first need to create your own custom block. Then, you would make a procedure, which, when right clicked, opens a custom GUI. (You would want to make an inventory GUI, with two input slots, and one output slot.) If you want the crafting table to be able to hold items, you would also need to enable block entity and inventory; otherwise the items will be returned to the player when the GUI is closed.
The difficult part is getting the GUI to work. You need one procedure that triggers whenever an item is removed from the output slot, which shrinks the itemstacks in the input slots by one. You also need a procedure to check the items in each of the input slots, and if they form a recipe, place the result item in the output slot. (Though if you only have two slots to worry about, this should be pretty straightforward.) It might be worth checking out a NorthWestTrees tutorial to get a better idea of how you'd set this up.
You would first need to create your own custom block. Then, you would make a procedure, which, when right clicked, opens a custom GUI. (You would want to make an inventory GUI, with two input slots, and one output slot.) If you want the crafting table to be able to hold items, you would also need to enable block entity and inventory; otherwise the items will be returned to the player when the GUI is closed.
The difficult part is getting the GUI to work. You need one procedure that triggers whenever an item is removed from the output slot, which shrinks the itemstacks in the input slots by one. You also need a procedure to check the items in each of the input slots, and if they form a recipe, place the result item in the output slot. (Though if you only have two slots to worry about, this should be pretty straightforward.) It might be worth checking out a NorthWestTrees tutorial to get a better idea of how you'd set this up.