# Loot

Scaled structure loot and Space's loot-table data.

## `hbmspace:wand_loot_scaled`

The provider returns $\lfloor v \times f \rfloor$, where `v` is `value` and `f` is NTM's [`loot.amount_factor`](https://movblock.mov/ntm-next/26.3/wiki/game-settings/world_config.md#loot). There is no lower bound, so a factor below 1 can give 0. Use it in integer slots such as pool `rolls` and `set_count`; it is a context integer provider.

| Field | Meaning and default |
| - | - |
| `type` | `hbmspace:wand_loot_scaled`. |
| `value` | Unscaled count: an integer, an inline context integer provider or a provider ID. |

Space wraps the `rolls` of 77 structure chest tables in it, 66 of them replacing NTM tables of the same ID. From `data/hbm/loot_table/chests/ammo_10_15.json`:

```json
{
  "type": "minecraft:chest",
  "hbm:random_slots": true,
  "pools": [
    {
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "hbm:chests/ammo"
        }
      ],
      "rolls": {
        "type": "hbmspace:wand_loot_scaled",
        "value": {
          "type": "minecraft:uniform",
          "max": 15,
          "min": 10
        }
      }
    }
  ],
  "random_sequence": "hbm:chests/ammo_10_15"
}
```

## Space loot tables

Space ships block, entity and chest tables under `data/hbmspace/loot_table/`. Its replacements of NTM tables also change the drops of the Leviathan Steam Turbine and High-Power Steam Condenser, which keep their damaged state, Australian Ore, which drops raw australium without Silk Touch, and the Mask Man.

Fishing in the celestial dimensions uses pools defined in code: Ike yields a plushie, and the other bodies yield junk. Space wraps the vanilla fishing tables at load, including datapack versions, which apply outside those dimensions.
