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

Minecraft:Commands/swing: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 7: Line 7:


== Syntax ==
== Syntax ==
: <code>/swing [<targets>] [mainhand|offhand]</code>{{until|JE 26.3}}
: <code>/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>]</code>
: <code>/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>]</code>{{upcoming|JE 26.3}}


== Arguments ==
== Arguments ==
Line 17: Line 16:
{{cd|mainhand{{!}}offhand}}
{{cd|mainhand{{!}}offhand}}
: Specifies the arm to swing. Defaults to {{cd|mainhand}}.
: Specifies the arm to swing. Defaults to {{cd|mainhand}}.
{{Argument|animation|swing_animation}}{{upcoming|JE 26.3}}
{{Argument|animation|swing_animation}}
: Specifies the swing animation to play. Defaults to {{cd|whack}}.
: Specifies the swing animation to play. Defaults to {{cd|whack}}.
: {{arg desc|je=swing_animation}}
: {{arg desc|je=swing_animation}}
{{argument|duration|time}}{{upcoming|JE 26.3}}
{{argument|duration|time}}
: Specifies the duration of the swing animation. Defaults to {{cd|6t}}.
: Specifies the duration of the swing animation. Defaults to {{cd|6t}}.
: {{arg desc|je=time|min=1}}
: {{arg desc|je=time|min=1}}
Line 42: Line 41:
|{{HistoryLine||26.1|dev=snap1|Added {{cmd|swing|link=none}}.}}
|{{HistoryLine||26.1|dev=snap1|Added {{cmd|swing|link=none}}.}}
|{{HistoryLine|||dev=snap3|Both arguments are now optional, and default to {{cd|@s}} and {{cd|mainhand}} respectively.}}
|{{HistoryLine|||dev=snap3|Both arguments are now optional, and default to {{cd|@s}} and {{cd|mainhand}} respectively.}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine||26.3|dev=snap7|When used on a player, the player's attack strength will no longer be reset.|Added the {{cd|whack{{!}}stab}} and {{cd|duration}} arguments.}}
|{{HistoryLine||26.3|dev=snap7|When used on a player, the player's attack strength will no longer be reset.|Added the {{cd|whack{{!}}stab}} and {{cd|duration}} arguments.}}
}}
}}

Latest revision as of 11:14, 16 September 2026

Template:Exclusive Template:Infobox command Controls the swinging animation of Minecraft:entities' hands.

Syntax

/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>]

Arguments

Template:Argument

Specifies entities to swing. Defaults to Template:Cd (the command executor).
Not all entities will animate a swing on the client side.
Template:Arg desc

Template:Cd

Specifies the arm to swing. Defaults to Template:Cd.

Template:Argument

Specifies the swing animation to play. Defaults to Template:Cd.
Template:Arg desc

Template:Argument

Specifies the duration of the swing animation. Defaults to Template:Cd.
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

History

Template:HistoryTable

Navigation

Template:Navbox commands

Minecraft:es:Comandos/swing Minecraft:de:Befehl/swing Minecraft:ja:コマンド/swing Minecraft:pt:Comandos/swing Minecraft:ru:Команды консоли/swing Minecraft:zh:命令/swing