public void shuffleInventory(@Nonnull IInventory inv,@Nonnull Random random){
  final List<ItemStack> list=getInventoryList(inv);
  Collections.shuffle(list,random);
  for (int i=0; i < inv.getSizeInventory(); ++i) {
    inv.setInventorySlotContents(i,list.get(i));
  }
}

public void shuffleInventory ( @ Nonnull IInventory inv , @ Nonnull Random random ) { final List < ItemStack > list = getInventoryList ( inv ) ; Collections . shuffle ( list , random ) ; for ( int i = 0 ; i < inv . getSizeInventory ( ) ; ++ i ) { inv . setInventorySlotContents ( i , list . get ( i ) ) ; } }
shuffles all items in the inventory
