I created code that recognize what object is in input slot and if it's white it add white item to output slot and if it's orange it outputs orange item.if (button.id == 0){
if((Filamencik.getStackInSlot(00) !=null ) &&Filamencik.getStackInSlot(00).getItem() == bialyfilament.block){ Filamencik.setInventorySlotContents(01, new ItemStack(bialymarfin.block, 1)); }
if((Filamencik.getStackInSlot(00) !=null ) &&Filamencik.getStackInSlot(00).getItem() == bialyfilament.block){ Filamencik.setInventorySlotContents(00, null); }
if((Filamencik.getStackInSlot( 00) !=null ) &&Filamencik.getStackInSlot( 00).getItem() == pomaranczowyfilament.block){ Filamencik.setInventorySlotContents(01, new ItemStack(pomaranczowyMarfin.block, 1)); }
if((Filamencik.getStackInSlot( 00) !=null ) &&Filamencik.getStackInSlot( 00).getItem() == pomaranczowyfilament.block){ Filamencik.setInventorySlotContents(00, null); } } }
if i insert item to input slot and press event button input item dissapear, output item shows. If i quit GUI in that moment output item will come out, but when i click output item in GUI it disappears and input item shows again