npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nxg-org/mineflayer-auto-jump

v0.7.12

Published

Auto-jump for mineflayer.

Downloads

319

Readme

mineflayer-auto-jump

Installation


npm install mineflayer-auto-jump

Usage


const mineflayer = require('mineflayer')
const {loader: autoJump} = require('@nxg-org/mineflayer-auto-jump')

const bot = mineflayer.createBot({
  host: 'localhost',
  port: 25565,
  username: 'player'
})

bot.loadPlugin(autoJump)


bot.autoJump.enable() // it will now auto jump!

API

autoJump.enable()

Enable auto jump

autoJump.disable()

Disable auto jump

autoJump.shouldJump()

Returns if the bot should jump (if we do not jump right now, there will be an issue).

autoJump.canJump()

Returns if the bot is allowed to jump (no jump needed, but no detriment to jumping right now).

autoJump.strictBlockCollision: boolean

If true, only jump if the bot is colliding with a block ABOVE current walking level. If false, the bot will jump if it is colliding with a block at all.

autoJump.jumpOnAllEdges: boolean

If the bot should jump on all edges. This is mainly used for descending slopes, combined with maxBlockOffset.

autoJump.jumpIntoWater: boolean

If the bot should jump into water. Useful if you want to save time when falling into water instead of just falling off of a block.

autoJump.maxBlockOffset: number

The maximum block offset for the bot to consider jumping. It works as current Y - maxBlockOffset as the threshold for jumping.

autoJump.minimizeFallDmg: boolean

If the bot should minimize fall damage. Similar to maxBlockOffset set to 3 except also takes into account water falling (allows for a bit more leniency).

autoJump.debug: boolean

If the bot should debug the jump checker. Your console will be spammed. Just report the information to me.

autoJump.cancelOnShift: boolean

If the bot should cancel the jump if the player is holding shift. Useful for sneaking.

Events

autoJump.on('shouldJump', () => {})

Emitted when the bot should jump.