Run these from an operator’s chat, a command block, or a function file. Stopwatch and Fetchprofile are newer commands — check availability on your Minecraft version.

How to Use the Random Command Generator

  1. Pick a mode: Value quietly generates a number, Roll generates a number and announces it in chat, or Reset reinitializes a named random sequence.
  2. For Value or Roll, set the Min and Max range (e.g. 1 to 6 for a die roll).
  3. For Roll, optionally name a sequence so repeated rolls of that sequence share consistent, non-repeating randomness.
  4. For Reset, name the sequence and optionally supply a seed plus whether to fold in the world seed and the sequence’s own ID.
  5. Copy the generated /random command into a command block, the console, or an operator’s chat.

Command Syntax Reference

/random value <range> [sequence]
/random roll <range> [sequence]
/random reset <sequence> [seed] [includeWorldSeed] [includeSequenceId]
/random reset *

/random value 1..6 silently returns a number between 1 and 6 (useful with execute store result to capture it into a scoreboard). /random roll 1..6 does the same but also announces the result in chat, like a visible dice roll. Both accept an optional named sequence – a persistent random stream identified by a resource-location-style name (my_pack:my_sequence) – so that repeated rolls of the same sequence avoid short-term repeats, similar to shuffling a deck instead of drawing with replacement. /random reset <sequence> reinitializes that named sequence, optionally with an explicit seed so its outcomes become reproducible, and /random reset * resets every sequence in the world at once.

Frequently Asked Questions

What’s the actual difference between /random value and /random roll?

value is silent – it’s meant to be captured programmatically, typically piped into a scoreboard via execute store result score .... roll produces the same kind of number but also prints a chat message announcing it, which is what you want for a player-facing dice or lottery mechanic.

Why use a named sequence instead of a plain random range?

A named sequence keeps its own internal state between calls, so results are drawn more like a shuffled deck than independent coin flips – it reduces the chance of the same value coming up many times in a row over repeated rolls, which feels more “fair” for game mechanics like loot rolls.

What do includeWorldSeed and includeSequenceId actually control on reset?

When resetting a sequence with an explicit seed, these two optional booleans control whether the world’s own seed and the sequence’s name are mixed into the final seed value. Leaving them at their defaults (both true) means the same typed seed can still produce different results across different worlds or different sequence names, which is usually what you want to avoid predictable, copy-pasteable outcomes.

Can I get the exact same dice roll every time for testing?

Yes – reset the sequence with a fixed seed and set both includeWorldSeed and includeSequenceId to false, which removes the world- and name-based variation and makes the sequence fully deterministic from that seed alone.

Related Tools