Enchanted Cavern

The Enchanted Cavern is a rare structure, located just barely the bedrock layer. It is surrounded by a thick layer of Prismarine. When it first spawns it replaces all nearby iron ore with water, gravel with lapis lazuli, gold ore with diamond, and redstone ore with gold in that order. The Enchanted Cavern features a flat grass+flowery area and a small pond in the center, with a large lamp-like structure hanging above it. A small glass haven hangs from the lamp, with a dispenser at the bottom, chest at the top, and a short description of the cavern in the middle. The dispenser contains an Enchanted Shard, and 'The Chest; TL;DR'. The chest features a unique sacrifice mechanic.

Given its rarity and its ability to spawn in most biomes, the best way to find it is via the Enchanted Cavern Locator spell. The cavern stops spawning after day 12.

## Chest Mechanics

*This is more complicated than it has any right to be.* *For a shorter rundown on the mechanics, click here. TL;DR : Put random stuff you don't need in the chest and you might get some useful stuff back.*

 At the start of every day, the chest in the center of the cavern disappears for a short period of time. Any items inside the chest at time of disappearance are considered up for sacrifice. Depending on what items are sacrificed, you may be granted an effect, or given certain rewards, which will be deposited back into the chest. However, you are not guaranteed a reward from most items. The list of items eligible to give rewards is as listed, with their base chance to give rewards listed in brackets:

* Iron Tools/Weapons/Armor(includes horse armor) - [25%]
* Gold Tools/Weapons/Armor(includes horse armor) - [50%]
* Diamond Tools/Weapons Armor(includes horse armor) - [75%]
* Netherite Tools/Weapons/Armor - [75%]
* Leather Armor - [25%]
* Bows/Crossbows - [25%]
* Shields - [25%]
* Egg - [100%]
* Blaze Powder - [100%]
* Golden Apple - [100%]
* Brewing Stand - [100%]
* Enchanting Table - [100%]
* Ghast Tear - [100%]
* Emerald Block - [100%]
* Diamond Block - [100%]

### Reagents/Booster items

The base chance of all the above items can be increased by offering Reagent/Booster items alongside them. Reagent items boost the chance of ALL other items in the chest additively:

* Emeralds [+0.5%]
* Iron Ingots [+0.5%]
* Gold Ingots [+1.0%]
* Diamonds [+2.5%]
* Netherite Scrap [+15%]

These stack with each other and themselves. For example, if you put 60 iron ingots into the chest, it will increase the chance of all items being saved by +30%. Iron Equipment goes up to 55% (25% base + 30%), Gold Equipment goes up to 80%(50% base + 30%), and so on. Putting a netherite scrap into the chest alongside the ingots changes these values, to 70% for Iron(25% base + 30%(60x iron ingots) + 15%(1x netherite scrap), and to 95% for Gold(50% base + 30%(60x iron ingots) + 15%(1x netherite scrap). Values past 100% are ignored.

Since Reagent items increase the base reward chance value of EVERY other item in the chest, it is most beneficial to stack up as much equipment as possible before deciding to add any Reagent items into the chest. Note that Reagent items are also consumed when added to the chest.

## Rewards

If an item succeeds in its base reward chance as described above, then this whole section applies. If the item fails its base chance, then NONE of this section will apply, and the item is simply destroyed. Some items have further 'randomness' to their rewards, even after the above succeeds.

The table below shows the list of items, and their rewards:

\**Tools/Armor/Equipment all give at least one material back(excluding shovels). They also give a random amount of materials back based on how much material is used in the crafting recipes. For all items, the average output ends up being 75% of the materials used in its recipe.*

*\*\*When sacrificed, a golden apple has a chance to heal all players near the cavern for 2 hearts at the start of each day thereafter. The chances are 25% for one apple sacrificed, 50% for 2 apples sacrificed, and 100% for 3 apples sacrificed. Sacrificing more than 3 apples will have no effect, and each apple must be sacrificed on separate days.*

### Enchanted items

*As a reminder, this section ONLY applies if the base reward chance from way above succeeds. If it fails, none of this applies.*

Enchanted items have a base 50% chance to give back all of their enchantments in book form, and some experience bottles as well. Enchantments that go beyond level V will be capped to level V. Similar to how base reward chance can be increased, so can the base enchantment chance. It is increased in the same way, via Reagent items, however in this case only 2 items apply:

* Emeralds [+0.5%]
* Gold Ingots [+1.0%]

These 2 items *also* increase the enchantment save chance, in addition to the base reward chance from above. Meaning, Emeralds and Gold Ingots increase *both* the base reward chance and the base enchantment chance for all items inside of the chest. As an example, putting 10 emeralds in the chest will increase the base reward chance for all items by +5%, and the base enchantment by +5%. Iron would have a 30%(25% base + 5%(10x emeralds)) base reward chance, and a 55% base enchantment(50% base, +5%(10x emeralds).

With the reminder up top in mind, this means that items can only give back enchantments if *both* the base reward chance and the base enchantment chance succeed. Keep this in mind when sacrificing items.