Items can be duplicated by right clicking to split the stack. Then picking up the item and moving it to another slot. Then click confirm and you will have a new stack in your hand.