Minecraft:Commands/swing: Difference between revisions
From SAS Gaming Wiki
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| Line 8: | Line 8: | ||
== Syntax == | == Syntax == | ||
: <code>/swing [<targets>] [mainhand|offhand]</code>{{until|JE 26.3}} | : <code>/swing [<targets>] [mainhand|offhand]</code>{{until|JE 26.3}} | ||
: <code>/swing [<targets>] [mainhand|offhand] [ | : <code>/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>]</code>{{upcoming|JE 26.3}} | ||
== Arguments == | == Arguments == | ||
| Line 17: | Line 17: | ||
{{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}} | ||
: 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}} | ||
: | {{argument|duration|time}}{{upcoming|JE 26.3}} | ||
: Specifies the duration of the swing animation. Defaults to {{cd|6t}}. | |||
: {{arg desc|je=time|min=1}} | |||
== Result == | == Result == | ||
| Line 41: | Line 43: | ||
|{{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|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| | |{{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.}} | ||
}} | }} | ||
Revision as of 11:17, 9 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] [<animation>] [<duration>]Template:Upcoming
Arguments
- 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
- Specifies the arm to swing. Defaults to Template:Cd.
Template:ArgumentTemplate:Upcoming
- Specifies the swing animation to play. Defaults to Template:Cd.
- Template:Arg desc
Template:ArgumentTemplate:Upcoming
- 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
Minecraft:es:Comandos/swing Minecraft:de:Befehl/swing Minecraft:ja:コマンド/swing Minecraft:pt:Comandos/swing Minecraft:ru:Команды консоли/swing Minecraft:zh:命令/swing