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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pixelwalker

v0.0.2

Published

PixelWalker.JS API Bindings

Readme

NPM | GitHub | Reference

Example

import Client from 'pixelwalker.js'
import CommandManager from './hello.js'
const client = new Client({ token: 'YOUR TOKEN HERE' })

client.on('start', () => client.say('🤖 Connected!'))
client.on('error', ([error]) => {throw error})

client
    .include(CommandManager)
    .connect('WORLD ID')
import Client from 'pixelwalker.js'

export default (client) => 
    client.onCommand('hello', async ([player, _]) => {
        client.say(`🤖 Hello, ${player.username}! `)
    })

Installation

npm i --save pixelwalker.js

Examples

Give God Mode on Join
client.on('player:join', ([player]) => player.god(true))

The above example is a simple module that gives every player god mode upon joining.

Snake Trail
const blocks = ['glass_red', 'glass_orange', 'glass_yellow', 'glass_green', 'glass_cyan', 'glass_blue', 'glass_purple', 'glass_magenta', 0]

client.on('player:block', async ([player, pos, block]) => {
    if (block.name == 'empty') return
    if (!blocks.includes(block.name)) return

    await client.wait(250)
    client.block(pos[0], pos[1], pos[2], blocks[blocks.indexOf(block.name) + 1])
})

In this example a very simple snake trail is generated. The block types are stored and iterated over in the array. Note: Client.block(...) returns a promise that awaits if the block was placed by the internal queue manager. Awaiting blocks will cause low performance.

Replace Block Types
client.onCommand('replace', async ([player, _, from, to]) => {
    if (BlockMappings[from] == undefined || BlockMappings[to] == undefined) return
    const blocks = client.world.list(from)
    blocks.map(([x, y, layer]) => client.block(x, y, layer, to))
    await Promise.all(blocks)
    client.say(`🤖 Replaced ${blocks.length} blocks!`)
})

To replace all blocks of a kind, you can use the following procedure: List all blocks of replacing type in the world data, then place on all given coordinates the wished block type. If you want to make sure, that code continues to run only after all blocks are placed (without caring about placement order), await all promises.

Brush Size Variations
const brushes = {}

client.on('player:block', async ([player, pos, block]) => {
    let brush = brushes[player.id]
    if (brush == undefined) return
    for (let x = -Math.floor(brush / 2); x < brush / 2; x++)
    for (let y = -Math.floor(brush / 2); y < brush / 2; y++)
    if ((x +.5) ** 2 + (y+.5) ** 2 <= (brush/2) ** 2)
        client.block(pos[0] + x, pos[1] + y, pos[2], block)
})

client.onCommand('brush', ([player, _, size]) => {
    const value = parseInt(size)
    brushes[player.id] = value != NaN ? value : 1
})

In this example you create a public command !brush <size> which will store an individual brush setting for every player. This will be then used by the bot to create a a circle of the given radius. To make it a square, you can remove the if-condition that uses the pythagorean theorem.