If you swim through water while carrying beds, wood, wool, or a bucket of lava in your inventory, these items will get wet, and some of their functions will be disabled. However, if you are in the water and holding a bucket of lava, a cobblestone block will spawn directly in front of you, and the bucket will become empty. There is also an item designed for drying and keeping things dry: the Water Transporter Bundle. Everything inside it remains dry while submerged in water, and if you place a wet item into it, it will dry out again.