# 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/wiki/game-settings/world_config.md#loot). There is no lower bound, so a factor below 1 can give 0. Use it in any number-provider slot.

| Field | Meaning and default |
| - | - |
| `type` | `hbmspace:wand_loot_scaled`. |
| `value` | Unscaled count: a number provider. |

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.0,
          "min": 10.0
        }
      }
    }
  ],
  "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.
