@Override
  public void onUpdate(final String field, final Object oldValue, final Object newValue) {
    super.onUpdate(field, oldValue, newValue);

    if (field.equals("craftingMode")) {
      this.getAndUpdateOutput();
      this.updateOrderOfOutputSlots();
    }
  }
  @Override
  public void detectAndSendChanges() {
    super.detectAndSendChanges();
    if (Platform.isServer()) {
      if (this.isCraftingMode() != this.getPatternTerminal().isCraftingRecipe()) {
        this.setCraftingMode(this.getPatternTerminal().isCraftingRecipe());
        this.updateOrderOfOutputSlots();
      }

      this.substitute = this.patternTerminal.isSubstitution();
    }
  }
 @Override
 public void putStacksInSlots(final ItemStack[] par1ArrayOfItemStack) {
   super.putStacksInSlots(par1ArrayOfItemStack);
   this.getAndUpdateOutput();
 }
 @Override
 public void putStackInSlot(final int par1, final ItemStack par2ItemStack) {
   super.putStackInSlot(par1, par2ItemStack);
   this.getAndUpdateOutput();
 }