Minecraft:Commands/swing: Difference between revisions
From SAS Gaming Wiki
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
== Syntax == | == Syntax == | ||
: <code>/swing [<targets>] [ | : <code>/swing [<targets>] [mainhand|offhand] [<animation>] [<duration>]</code> | ||
== Arguments == | == Arguments == | ||
{{argument|targets|entity}} | {{argument|targets|entity}} | ||
: Specifies entities to swing. Defaults to the command executor. | : Specifies entities to swing. Defaults to {{cd|@s}} (the command executor). | ||
: Not all entities | : 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| | {{cd|mainhand{{!}}offhand}} | ||
: Specifies the arm to swing. Defaults to mainhand. | : Specifies the arm to swing. Defaults to {{cd|mainhand}}. | ||
{{Argument|animation|swing_animation}} | |||
: Specifies the swing animation to play. Defaults to {{cd|whack}}. | |||
: {{arg desc|je=swing_animation}} | |||
{{argument|duration|time}} | |||
: Specifies the duration of the swing animation. Defaults to {{cd|6t}}. | |||
: {{arg desc|je=time|min=1}} | |||
== Result == | == Result == | ||
| Line 35: | 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||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.}} | |||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{Navbox commands}} | ||
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
- 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.
- Specifies the swing animation to play. Defaults to Template:Cd.
- Template:Arg desc
- 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