// Once the chip is taken/placed/changed, this will be called to update the current recipe.
private void onChipChanged(Slot slot) {
// Placing an encoded chips will replace the current recipe, by design
if( slot.getHasStack() ) { // placed a chip
CraftRecipe recipe = RecipeUtils.getRecipe( slot.getStack(), player.worldObj );
if( recipe != null ) { // placed an encoded chip
// update the crafting grid
craftPad.gridInv.setContents( recipe.getIngredients() );
} else { // placing a blank chip
// Automatically clear invalid chips.
if( CraftManager.isEncoded( slot.getStack() ) ) {
slot.putStack( new ItemStack( XActMod.itemRecipeBlank ) );