Treasure Bags are consumable items obtained in Expert mode as a reward for defeating Bosses. Its contents depend on the boss it comes from. It is opened by either right-clicking it inside the inventory or using it while it is in your hand. In multiplayer, each player that is online at the end of the battle receives one Treasure Bag each. Treasure bags are client-side and will despawn if you exit the world.
Each Treasure Bag contains the boss's usual drops from normal mode, along with one Expert mode-exclusive item (pink-highlighted items below)— with the exception of the Lunatic Cultist, Dark Mage, Betsy, and Ogre, who currently do not provide an Expert mode-exclusive item. Hardmode bosses' Bags additionally have a 5% chance to contain one random set of developer items.
Each treasure bag has an internal rarity, despite being expert items, which always have a rainbow rarity.
Bag - Rarity
Developer items
In addition to the above, all Treasure Bags from Hardmode bosses have a 5% chance to contain a random set of developer items. Obtaining a Treasure Bag in an Expert world, then opening the bag in a Normal world will retain the Treasure Bag's chance to yield developer items.
A Light Pet that senses nearby enemies, treasure, and ores.
Notes
Additionally, in multiplayer, participation is based on damage dealt to the enemy. It is possible for a player to not receive a bag if they did not contribute enough damage to the battle.
It is advisable to open bags on the ground in a quiet area if you have a full inventory as the delay in picking up the prizes can cause items to fall to other players.
Treasure yields are considerably higher in multiplayer - multiple bags are handed out, with each containing the entire reward of a kill, and drop rates on the boss's unique items are often doubled.
The Moon Lord's treasure bag is the only one to include both two Expert mode items and no money.
Betsy's treasure bag is the only (obtainable) bag that does not have an Expert mode item. It is also (along with the Moon Lord's) one of the only ones to contain no money, though it does give Defender Medals.
The Lunatic Cultist, Ogre, and Dark Mage have sprites for a treasure bag, even though they don't drop one.
Unlike the Lunatic Cultist's treasure bag, the Ogre and Dark Mage don't have data assigned to their treasure bags, as attempting to hack in either one will cause them to disappear from the player's inventory instantly.