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 4: Line 4:
|oplevel=2
|oplevel=2
}}
}}
Controls the swinging animation of [[Minecraft:entities]]' hands.{{info needed|What entities does this apply to?}}
Controls the swinging animation of [[Minecraft:entities]]' hands.


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


== Arguments ==
== Arguments ==
{{argument|targets|entity}}
{{argument|targets|entity}}
: Specifies entities to swing. Defaults to {{cd|@s}} (the command executor).
: Specifies entities to swing. Defaults to {{cd|@s}} (the command executor).
: Not all entities{{info needed|which entities?}} will animate a swing on the client side.
: Not all entities will animate a swing on the client side.
: {{arg desc|je=entity|amount=multiple|type=entities}}
: {{arg desc|je=entity|amount=multiple|type=entities}}
{{cd|mainhand{{!}}offhand}}
{{cd|mainhand{{!}}offhand}}
: Specifies the arm to swing. Defaults to {{cd|mainhand}}.
: Specifies the arm to swing. Defaults to {{cd|mainhand}}.
{{cd|whack{{!}}stab}}{{upcoming|JE 26.3}}
: Specifies the swing animation to play. Defaults to {{cd|whack}}.
{{cd|time}}{{upcoming|JE 26.3}}
: Optional; Specifies the duration of the swing animation in ticks. Defaults to six ticks.


== Result ==
== Result ==
Line 35: Line 40:
|{{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|time}} arguments.}}
}}
}}



Revision as of 11:08, 5 August 2026

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

Syntax

/swing [<targets>] [mainhand|offhand]Template:Until
/swing [<targets>] [mainhand|offhand] [whack|stab] [time]Template:Upcoming

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:CdTemplate:Upcoming

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

Template:CdTemplate:Upcoming

Optional; Specifies the duration of the swing animation in ticks. Defaults to six ticks.

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