Evaluate a vanilla provider
/compute default integer minecraft:brewing/uses_defaultEvaluates the integer provider brewing/uses_default, defined in the 26.3 game data as the constant 20.

/compute evaluates a context provider, a number defined by game data, and gives back the value. It works in three contexts: default, a block position or an entity. The float mode accepts an optional scale, the integer mode does not.
/compute block <computePos> (float|integer)/compute default (float|integer)/compute entity <computeTarget> (float|integer)/compute block/compute block <computePos> (float|integer)| Argument | Expects | What it does |
|---|---|---|
| computePos | Block coordinates (x y z) | Block position used as context, for example ~ ~-1 ~ for the block below you. |
| provider | Number or provider | Provider ID such as minecraft:brewing/uses_default, or an inline value; float or integer depending on the mode. |
| scaleoptional | Number | Optional multiplier applied to the result, available in float mode only. |
/compute default/compute default (float|integer)| Argument | Expects | What it does |
|---|---|---|
| provider | Number or provider | Provider ID such as minecraft:brewing/uses_default, or an inline value; float or integer depending on the mode. |
| scaleoptional | Number | Optional multiplier applied to the result, available in float mode only. |
/compute entity/compute entity <computeTarget> (float|integer)| Argument | Expects | What it does |
|---|---|---|
| computeTarget | Entity selectorone | Single entity used as context, for example @s or @n[type=minecraft:cow]. |
| provider | Number or provider | Provider ID such as minecraft:brewing/uses_default, or an inline value; float or integer depending on the mode. |
| scaleoptional | Number | Optional multiplier applied to the result, available in float mode only. |
/compute default integer minecraft:brewing/uses_defaultEvaluates the integer provider brewing/uses_default, defined in the 26.3 game data as the constant 20.
/compute block ~ ~ ~ integer minecraft:compostable/lowEvaluates the compostable/low provider with the block at your position as context.
/compute default float 1.5 10Evaluates the inline float value 1.5 and applies the scale 10.
/data modify storage mypack:vars uses set compute default integer minecraft:brewing/uses_defaultUses compute as a source of /data modify and saves the result at uses in the mypack:vars storage.
Fill in the fields, then copy the command.
Command generatorcompute default, compute block <pos> and compute entity <target> choose the context; the game data names them command_compute_default, command_compute_position and command_compute_entity. Then float reads a provider of the context_float_provider registry and integer one of context_int_provider. A provider is an ID, such as minecraft:brewing/uses_default or minecraft:compostable/low, or an inline value. Provider types include constant, uniform, add, mul, conditional and storage, plus score for integers.
The same compute source also exists in /data modify, to write the value into NBT. Test providers from the chat or a /function before using them in a pack.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
An ID from the context_float_provider or context_int_provider registry, including providers added by data packs, or an inline value such as a number.
It multiplies the result in float mode. The integer mode has no scale argument.
Type it in the chat with cheats on: /compute block <computePos> (float|integer).
Cheats on, or operator level 2.
It is in the official command tree since Java Edition 26.3.