# Random Outcome

The random outcome executes a random outcome from a list.

```json
{
  "type": "lucky:random",
  "outcomes": [
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_sword"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_shovel"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_pickaxe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_axe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_hoe"
    }
  ]
}
```

This outcome spawns a random Netherite tool on the ground.

```json
{
  "type": "lucky:random",
  "outcomes": [
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_sword"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_shovel"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_pickaxe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_axe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_hoe"
    }
  ],
  "count": 2
}
```

This outcome spawns 2 different Netherite tools on the ground.

```json
{
  "type": "lucky:random",
  "outcomes": [
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_sword"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_shovel"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_pickaxe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_axe"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_hoe"
    }
  ],
  "duplicates": true,
  "count": 2
}
```

This outcome spawns 2 random Netherite tools on the ground which may be the same.

### Weight

The "weight" field (defaults to 1) is used to change how likely one outcome is to be randomly chosen. A "weight" of 0 will never be picked, whereas a "weight" of 10 will be 10x likely to be picked.

```json
{
  "type": "lucky:random",
  "outcomes": [
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_sword",
      "weight": 10
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_shovel"
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_pickaxe",
      "weight": 0
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_axe",
      "weight": {
        "type": "minecraft:uniform",
        "max_inclusive": 11,
        "min_inclusive": 0
      }
    },
    {
      "type": "lucky:item",
      "item": "minecraft:netherite_hoe"
    }
  ]
}
```

This outcome will never pick the Netherite Pickaxe, and is much more likely to pick the Netherite Sword or Axe.
