Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Argument types

From SAS Gaming Wiki
Revision as of 02:41, 29 March 2026 by imported>VECthba (Navigation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page contains a list of all command argument types. Template:TOC

Java Edition

brigadier:bool

Template:Arg desc

Template:Anchor

brigadier:double

Template:Arg desc

Each double argument may have a custom minimum and maximum value.

Precision varies throughout number line; the maximum absolute value is about 1.8×10308.

brigadier:float

Template:Arg desc

Each float argument type may have a custom minimum and maximum value.

Precision varies throughout number line; the maximum absolute value is about 3.4×1038.

Template:Anchor

brigadier:integer

Template:Arg desc

Each integer argument type may have a custom minimum and maximum value.

Maximum range is from −(231) to (231 − 1), or from (−2,147,483,648) to (2,147,483,647).

Template:Anchor

brigadier:long

Template:Arg desc

Note: Although a long argument type is present in Minecraft:brigadier, it is not used by Minecraft.

Each long argument type may have a custom minimum and maximum value.

Maximum range is from −(263) to (263−1), or from (−9,223,372,036,854,775,808) to (9,223,372,036,854,775,807).

Template:Anchor

brigadier:string

Template:Arg desc

Each string argument type can accept either a single word (no spaces), a quotable phrase (either single word or quoted string), or a greedy phrase (taking the rest of the command as the string argument).

Template:Anchor

minecraft:angle

Template:Arg desc

Template:Anchor

minecraft:block_pos

Template:Arg desc

Template:Anchor

minecraft:block_predicate

The format of block_predicate parameters is block_id[block_states]{data_tags}, in which block states and data tags can be omitted when they are not needed.

  • block_id is required, and it should be in the format of Minecraft:resource location(if namespace isn't set it defaults to minecraft:).
    • It can also be the resource location of a block tag prefixed with #, such as #minecraft:planks.
  • Minecraft:Block states are inside [], comma-separated and properties and values must be supported by the block or all blocks in the tag. They are optional.
    • minecraft:stone[doesntexist=purpleberry] is unparseable, because stone doesn't have doesntexist.
    • minecraft:redstone_wire[power=tuesday] is unparseable, because redstone_wire's power is a number between 0 and 15.
  • Data tags are inside {}. They are optional.
  • When test for block, only the states provided are tested.
    • If a command tests for redstone_wire[power=15], it checks only power, but ignores other states such as north.

Template:Anchor

minecraft:block_state

The format of block_state parameters is block_id[block_states]{data_tags}, in which block states and data tags can be omitted when they are not needed.

  • block_id is required, and it should be in the format of Minecraft:resource location (if namespace isn't set it defaults to minecraft:).
  • Minecraft:Block states are inside [], comma-separated and must be properties/values supported by the blocks. They are optional.
    • minecraft:stone[doesntexist=purpleberry] is unparseable, because stone doesn't have doesntexist.
    • minecraft:redstone_wire[power=tuesday] is unparseable, because redstone_wire's power is a number between 0 and 15.
  • Data tags are inside {}. They are optional.
  • When placing blocks, any states provided are set, but anything omitted retain their default values, depending on the block type.
    • If a command sets redstone_wire[power=15], it is set power to 15, but north is a default value (in this case, set to none).

Template:Anchor

minecraft:color

Template:Arg desc

Template:Anchor

minecraft:column_pos

Template:Arg desc

Template:Anchor

minecraft:component

Template:Arg desc

Template:Anchor

minecraft:dimension

Template:Arg desc

Template:Anchor

minecraft:entity

Template:Arg desc

Each entity argument may place limits on the number of entities (single/multiple) selected or the type of entities (player/any entity) selected.

Template:Anchor

minecraft:entity_anchor

Template:Arg desc

Template:Anchor

minecraft:float_range

Template:Arg desc

Template:Anchor

minecraft:function

Template:Arg desc

Template:Anchor

minecraft:game_profile

Template:Arg desc

Template:Anchor

minecraft:gamemode

Template:Arg desc

Template:Anchor

minecraft:heightmap

Template:Arg desc

Template:Anchor

minecraft:int_range

Template:Arg desc

Template:Anchor

minecraft:item_predicate

The format of item_predicate parameters is <item_type>[<list of tests>], in which the list of tests with [] can be omitted when not needed.

  • <item_type> is required.
    • It can be in the format of Minecraft:resource location (if namespace isn't set it defaults to minecraft:).
    • It can also be the resource location of a block tag or item tag with the prefix of #, such as #minecraft:planks.
    • It can also be a wildcard character * to match any item type.
  • The list of tests is optional. Test entries are inside [] and separated with <separator>.
  • A test entry can be:
    • <component_id> - Checks if a component exists.
    • <component_id>=<value> - Matches exact value of a component.
      • <value> is a representation of component value in SNBT format.
    • <predicate_id>~<value> - Checks an item sub-predicate
      • <predicate_id> is the ID of an Minecraft:item sub-predicate.
      • <value> is a representation of item sub-predicate in SNBT format.
      • Example: *[damage~{durability:{min:3}}] matches any stack with at least 3 uses left.
    • minecraft:count - Matches the stack size.
      • count - Always passes.
      • count=<positive_int> - Passes only when the stack size equals to the given value.
      • count~<positive_int> - Passes only when the stack size equals to the given value.
      • count~<int_range> - Passes when the stack size is in the specified range.
        • <int_range> is an SNBT of {min:<min value>, max:<max value>}. Both min and max are optional.
      • Example: *[count~{max:2}] matches any stack with count <= 2.
    • Any test entry above can be negated by prefixing with !.
      • Example: *[!count=1] matches any stack that has count other than 1.
  • A <separator> can be:
    • | - Logical OR.
    • , - Logical AND.
    • Unlike most programming languages, the precedence of | (Logical OR) is higher than , (Logical AND).
    • That means tests entries joined with | are treated as a single entry to check multiple alternatives.
    • Example: *[!damage|damage=0, count=1] looks for items without damage component or with 0 damage, and its count must be 1.

Template:Anchor

minecraft:item_slot

Template:Arg desc

Template:Anchor

minecraft:item_slots

Template:Arg desc

Template:Anchor

minecraft:item_stack

The format of item_stack is <item_id>[<list of components>], in which the list of components with [] can be omitted when not needed.

  • <item_id> is required, and it should be in the format of Minecraft:resource location (if namespace isn't set it defaults to minecraft:).
  • The list of data components is optional. Data component entries are inside [] separated with ,.
    • A data component entry can be:
      • <component_id>=<value> - Sets value of a data component.
      • !<component_id> - Removes a default data component of the item.
  • When giving items, any components provided are set or removed, but anything omitted retain their default values, depending on the item type.

Template:Anchor

minecraft:loot_modifier

Template:Arg desc

Template:Anchor

minecraft:loot_predicate

Template:Arg desc

Template:Anchor

minecraft:loot_table

Template:Arg desc

Template:Anchor

minecraft:message

Template:Arg desc

Template:Anchor

minecraft:nbt_compound_tag

Template:Arg desc

Template:Anchor

minecraft:nbt_path

Template:Arg desc

Template:Anchor

minecraft:nbt_tag

Template:Arg desc

Template:Anchor

minecraft:objective

Template:Arg desc

Template:Anchor

minecraft:objective_criteria

Template:Arg desc

Template:Anchor

minecraft:operation

Template:Arg desc

Template:Anchor

minecraft:particle

Template:Arg desc

Template:Anchor

minecraft:resource

Template:Arg desc

Template:Anchor

minecraft:resource_key

Template:Arg desc

Template:Anchor

minecraft:resource_location

Template:Arg desc It is resolved during command execution into the unregistered content, or sent to the client to resolve into a client-side content.

Template:Anchor

minecraft:resource_or_tag

Template:Arg desc

Template:Anchor

minecraft:resource_or_tag_key

Template:Arg desc

Template:Anchor

minecraft:resource_selector

Similar to resouce_location except enables the use of wildcard characters.

  • * - matches from 0 to any number of characters
  • ? - matches exactly one character

Template:Anchor

minecraft:rotation

Template:Arg desc

Template:Anchor

minecraft:score_holder

Template:Arg desc

Each score holder argument may specify if it can select only one score holder or multiple score holders.

Template:Anchor

minecraft:scoreboard_slot

Template:Arg desc

Template:Anchor

minecraft:style

Template:Arg desc

Template:Anchor

minecraft:swizzle

Template:Arg desc

Template:Anchor

minecraft:team

Template:Arg desc

Template:Anchor

minecraft:template_mirror

Template:Arg desc

Template:Anchor

minecraft:template_rotation

Template:Arg desc

Template:Anchor

minecraft:time

Template:Arg desc

Template:Anchor

minecraft:uuid

Template:Arg desc

Template:Anchor

minecraft:vec2

Template:Arg desc

Template:Anchor

minecraft:vec3

Template:Arg desc

Removed

Template:Anchor

minecraft:entity_summon

Template:Arg desc

Template:Anchor

minecraft:item_enchantment

Template:Arg desc

Template:Anchor

minecraft:mob_effect

Template:Arg desc

Bedrock Edition

Template:Update

BlockStateCommandParam

Also known as BLOCK_STATE_ARRAY.

Template:Arg desc

CommandCompareOperator

Also known as COMPAREOPERATOR.

Template:Arg desc

CommandFilePath

Also known as PATHCOMMAND.

Template:Arg desc

CommandIntegerRange

Also known as FULLINTEGERRANGE.

Template:Arg desc

CommandMessage

Also known as MESSAGE_ROOT.

Template:Arg desc

CommandOperator

Also known as OPERATOR.

Template:Arg desc

CommandPosition

Also known as POSITION.

Template:Arg desc

CommandPositionFloat

Also known as POSITION_FLOAT.

Template:Arg desc

CommandRawText

Also known as RAWTEXT.

Template:Arg desc Template:AnchorTemplate:Anchor

CommandSelector<Actor> and CommandSelector<Player>

Also known as SELECTION.

CommandSelector<Actor> is used to specify entities. Template:Arg desc

CommandSelector<Player> is used to specify players. Template:Arg desc

CommandWildcardInt

Also known as WILDCARDINT.

Must be a 32-bit integer, or an asterisk (Template:Cd) to represent MIN_INT(-2,147,483,648),

float

Also known as VAL.

Template:Arg desc

int

Also known as INT.

Template:Arg desc

Json::Value

Also known as JSON_OBJECT.

Template:Arg desc

RelativeFloat

Also known as RVAL.

Template:Arg desc Template:Anchor

std::basic_string

Also known as ID.

Template:Arg desc Template:Anchor

std::unique_ptr<Command>

Also known as SLASHCOMMAND.

Represents a complete command.

WildcardCommandSelector<Actor>

Also known as WILDCARDSELECTION.

Template:Arg desc Template:Anchor

Enum

Must be an unquoted string without space.

History

Template:Missing information Template:HistoryTable

References

<references/>

Navigation

Template:Navbox commands

Minecraft:fr:Types d'arguments Minecraft:ja:引数の型 Minecraft:lzh:附項之類 Minecraft:pt:Tipos de argumentos Minecraft:ru:Типы аргументов Minecraft:zh:参数类型

Contents