It installs itself: no loader, no launcher
Bedrock add-ons are not Java mods. Opening dist/metal-detector.mcaddon hands both packs to the game and you switch them on in the world's settings. No experimental features need turning on. A dedicated server takes the same two folders from dist/loose, listed in world_behavior_packs.json and world_resource_packs.json.
Tip: Both packs have to be on. Without the resource pack the detector has no picture and no name.
Spots are computed, not placed
Nothing is buried in your world in advance. A hidden number rolled once for your world is mixed with a chunk's coordinates to decide, always the same way, whether that chunk hides something and where. About 40% of chunks host a candidate. The result is that your world's treasure is fixed and consistent, and none of it exists as data until a detector asks the question.
The beep ladder
The detector reaches 16 blocks. Beyond 12 blocks it beeps once a second at a low pitch; inside 12 it goes to every 16 ticks, then 12, then 8, then within 3 blocks it is every 4 ticks and pitched high. The sound is the vanilla note.bit. Those five bands are copied unchanged from the Java version.
Tip: The pitch is the useful signal, not the speed. Learn the top of the ladder and you will know when you are on it.
The beep points the way
The sound is not played at your feet. It is emitted from a point two blocks toward the find, so the game's ordinary stereo panning does the pointing for free. When the treasure is straight below you the offset falls back to your own position, which is itself a signal: a beep with no direction means stop walking.
Tip: Headphones make this mod roughly twice as good.
Sweep first, then dig
Inside 5 blocks the spot goes live: it sparkles every so often and it can be opened. Digging is done with any shovel, on the exact block. But the spot has to be your current, actively-beeping target. Blind-digging the whole beach must not work, and it does not. Relog beside a known spot and you have to let it beep at you once before it will open again.
What comes out of the ground
Every dig rolls one to three junk items, then a 25% chance of a treasure matched to the terrain, then a 3% chance of a real prize. Junk is iron and gold nuggets, bone, string, rotten flesh, flint, clay, brick, coal, sticks, leather, paper, copper. Prizes are emeralds, gold, lapis, amethyst, a diamond, a name tag, a saddle, a golden apple. Identical items are merged so a dig drops three stacks rather than seven single items.
Tip: Treasure is mostly junk on purpose. That is what makes the 3% land.
The ground decides the category, not the biome
Gravel and clay give coastal loot: prismarine, nautilus shells. Sand gives desert, red sand gives badlands, both leaning gold. Snow lying on top overrides everything and gives snowy: iron and blue ice. Podzol, rooted dirt and moss give jungle; mud and mycelium give swamp; soul sand and nylium give nether; end stone gives end. Everything else is heartlands (iron and seeds), and plain ground is thinned to a third of its candidates, so travelling to real terrain pays.
What the Bedrock version does not do
This is the core loop only, and the Java original is far larger, at 239 classes. Not ported: the Prospector and Resonant detector tiers with their longer ranges and better odds; attunement, which points a detector at one specific item; the seven artifacts and their passive powers; the treasure journal and its collectible sets, which would need redesigning as a menu because Bedrock has no custom screens; the dozen decoration blocks; detection of vanilla buried treasure; and the config file. Bedrock also exposes no world seed, so spots are consistent within your world but cannot be derived from the seed the way the Java version's can.