Creoii Mod Documentation & Wiki
Lucky Block
Lucky Block
  • Overview
  • Installing Addons
  • Creating Addons
  • Upcoming Features
  • Outcomes
    • Outcomes
    • Advancement Outcome
    • Block Outcome
    • Command Outcome
    • Difficulty Outcome
    • Effect Outcome
    • Entity Outcome
    • Explosion Outcome
    • Feature Outcome
    • Group Outcome
    • Item Outcome
    • Message Outcome
    • None Outcome
    • Particle Outcome
    • Random Outcome
    • Sound Outcome
    • Structure Outcome
  • Parameters
    • Parameters
    • Parameter Index
  • Vec Providers
    • Vec Providers
    • Vec Provider Index
  • Shapes
    • Shapes
Powered by GitBook
On this page
  1. Outcomes

Random Outcome

The random outcome executes a random outcome from a list.

{
  "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.

{
  "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.

{
  "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.

{
  "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.

PreviousParticle OutcomeNextSound Outcome

Last updated 5 months ago