@throw-out-error/minecraft-mcfunction
Version:
A simple way to create your mcfunction files using Typescript syntax.
65 lines • 1.74 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.execute = exports.ExecuteCommand = void 0;
const __1 = require("../");
class ExecuteCommand extends __1.Command {
constructor(run) {
super('execute');
this.conditions = [];
this.run = run;
}
get [__1.Command.ARGUMENTS]() {
return [...this.conditions, 'run', this.run];
}
align(...args) {
this.conditions.push('align', ...args);
return this;
}
anchored(...args) {
this.conditions.push('anchored', ...args);
return this;
}
as(...args) {
this.conditions.push('as', ...args);
return this;
}
at(...args) {
this.conditions.push('at', ...args);
return this;
}
facing(...args) {
this.conditions.push('facing', ...args);
return this;
}
in(...args) {
this.conditions.push('in', ...args);
return this;
}
positioned(...args) {
this.conditions.push('positioned', ...args);
return this;
}
rotated(...args) {
this.conditions.push('rotated', ...args);
return this;
}
store(...args) {
this.conditions.push('store', ...args);
return this;
}
if(...args) {
this.conditions.push('if', ...args);
return this;
}
unless(...args) {
this.conditions.push('unless', ...args);
return this;
}
}
exports.ExecuteCommand = ExecuteCommand;
function execute(run) {
return new ExecuteCommand(run);
}
exports.execute = execute;
__1.Command.registerCommand('execute', execute);
//# sourceMappingURL=execute.js.map