import type { MultipleEntitiesArgument } from 'sandstone/arguments' import type { Macroable } from 'sandstone/core' import { CommandNode } from 'sandstone/core/nodes' import { targetParser } from 'sandstone/variables/parsers' import { CommandArguments } from '../../helpers' export class SwingCommandNode extends CommandNode { command = 'swing' as const } export class SwingCommand extends CommandArguments { protected NodeType = SwingCommandNode /** * Forces the targeted bipedal entity to initiate its hand swing animation with either their mainhand or their offhand. * * Defaults to `@s`, `mainhand`, and `whack`. */ swing = (targets: Macroable, MACRO> = '@s', hand: 'mainhand' | 'offhand' = 'mainhand', animation: 'none' | 'whack' | 'stab' = 'whack') => this.finalCommand([targetParser(targets), hand, animation]) }