# @nxg-org/mineflayer-common-sense

> Miscellaneous functions to handle different minecraft events.

Latest version **1.3.0** (published 2024-02-04) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @nxg-org/mineflayer-common-sense
pnpm add @nxg-org/mineflayer-common-sense
yarn add @nxg-org/mineflayer-common-sense
bun add @nxg-org/mineflayer-common-sense
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2024-02-04 |
| First published | 2021-12-06 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 60.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | generel_schwerz |
| Maintainers | generel_schwerz, rob9315 |
| Keywords | mineflayer, mineflayer-plugin, auto-eat, mineflayer-common-sense |

## Links

- npm: https://www.npmjs.com/package/@nxg-org/mineflayer-common-sense
- Repository: https://github.com/nxg-org/mineflayer-common-sense
- Homepage: https://github.com/nxg-org/mineflayer-common-sense#readme
- Issues: https://github.com/nxg-org/mineflayer-common-sense/issues
- npm.io page: https://npm.io/package/@nxg-org/mineflayer-common-sense

## Dependencies (4)

- [assert](https://npm.io/package/assert.md) ^2.0.0
- [js-levenshtein](https://npm.io/package/js-levenshtein.md) ^1.1.6
- [prismarine-physics](https://npm.io/package/prismarine-physics.md) ^1.6.0
- [@nxg-org/mineflayer-util-plugin](https://npm.io/package/@nxg-org/mineflayer-util-plugin.md) ^1.8.2

## Recent versions

- 1.3.0 (latest) — 2024-02-04
- 1.2.2 — 2023-02-14
- 1.2.1 — 2023-02-14
- 1.2.0 — 2023-02-14
- 1.1.0 — 2022-10-05
- 1.0.2 — 2022-02-15
- 1.0.1 — 2021-12-20
- 1.0.0 — 2021-12-06

## README

# Mineflayer Common Sense


### Basic Usage
```ts
import { createBot } from "mineflayer";
import commonSense from "@nxg-org/mineflayer-common-sense"

const bot = createBot({ ... });

bot.loadPlugin(commonSense)

bot.once("spawn", () => {
    bot.commonSense.setOptions({

        // automatically respond to events.
        autoRespond: true,

        // check if we're currently falling (does not mean it will respond)
        fallCheck: true,

        // check if we're currently on fire (does not mean it will respond)
        fireCheck: true,

        // all responses will use the off-hand for placements (boolean)
        useOffhand: true
    })
})

```

This module is meant to provide basic responses to events that inconvenience the bot and are trivial to implement.



Because I hate writing README's for whatever reason, the publicly accessible methods are the public functions in ``example/basic.ts``. The names are self explanatory.

---
_Source: https://npm.io/package/@nxg-org/mineflayer-common-sense · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
