Minecraft:Commands/compute
From SAS Gaming Wiki
More actions
(Redirected from Minecraft:/compute)
Template:Wip Template:In development Template:Infobox command
Evaluates Minecraft:number providers in various Minecraft:loot contexts.
Syntax
- Template:Cmd
- Template:Cmd
- Where Template:Cd is one of:
- Template:Cd
- Runs the provider with the [[Minecraft:Loot context#minecraft:command_compute_default|Template:Cd]] context, which provides common parameters such as the execution position and Template:Cd entity.
- Template:Cd
- Runs the provider with the [[Minecraft:Loot context#minecraft:command_compute_position|Template:Cd]] context, providing the block state and block entity of the block at Template:Cd.
- Template:Cd
- Runs the provider with the [[Minecraft:Loot context#minecraft:command_compute_entity|Template:Cd]] context, providing the selected entity as Template:Cd.
- Template:Cd
- In float mode, Template:Cd is evaluated as a floating-point value. If Template:Cd is specified, the resulting value is multiplied by it. The resulting value is then rounded down to the nearest integer.
- If Template:Cd is omitted, a scale of Template:Cd is used.
- In integer mode, specified by Template:Cd, the provider is evaluated directly as an integer. The Template:Cd argument cannot be used with integer mode.
Arguments
- Specifies the block whose state and block entity are made available to the number provider.
- Template:Arg desc
- Specifies the entity whose data is made available to the number provider as Template:Cd.
- Template:Arg desc
- Specifies the Minecraft:number provider to evaluate.
- Template:Arg desc
- Specifies the value by which the provider's result is multiplied in float mode.
- If omitted, Template:Cd is used.
- The resulting value is rounded down to the nearest integer after scaling.
- Template:Arg desc
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table
When the provider has a registered identifier, a successful command also displays its identifier and the computed result. In float mode, if scaling and rounding change the provider's original value, the output also displays the original floating-point value.
History
Template:Navbox new content Template:Navbox commands
Minecraft:de:Befehl/compute Minecraft:ja:コマンド/compute Minecraft:zh:命令/compute