myncraftjs
Version:
Simple minecraft bot package extends from mineflayer
17 lines (16 loc) • 559 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRand = exports.wait = void 0;
const wait_1 = __importDefault(require("./wait"));
const wait = async (a, b) => {
const rand = (0, exports.getRand)(a, b);
await (0, wait_1.default)(rand);
};
exports.wait = wait;
const getRand = (a, b) => {
return Math.floor(Math.random() * (b - a + 1)) + a;
};
exports.getRand = getRand;