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

@redtact/mc-assets

v0.3.0

Published

Self-hosted Minecraft asset pipeline for deepslate viewers: blockstates/models/texture fetching, deepslate Resources building, and an asset download CLI.

Readme

@redtact/mc-assets

Self-hosted Minecraft asset pipeline for deepslate viewers.

Not affiliated with the deepslate project or Mojang. This is an independent, community-maintained package. Minecraft is a trademark of Mojang Studios; no Minecraft assets are distributed with this package — the fetch-mc-assets CLI downloads them into your own project at build time, and you are responsible for complying with the applicable asset terms.

  • fetch-mc-assets (CLI) — download blockstates/models (PrismarineJS/minecraft-assets, SHA-pinned) and textures (misode/mcmeta, version-tag-pinned) into your app's public/mc-assets/<version>/ at build time, so the viewer has no runtime dependency on third-party origins
  • configureMcAssets({ baseUrl, revision }) — point the runtime at your asset origin (defaults to same-origin /mc-assets) and set the cache-bust revision. Each call replaces the entire config — pass all options in one call (omitted fields reset to defaults). revision is required when the assets are served with immutable/long-lived caching
  • getBlockStates / getBlockModels / fetchTexture — asset fetching with request de-duplication and animation-frame cropping
  • buildResources(blockNames, options?) — build a complete deepslate Resources (definitions, models, texture atlas, block flags) for exactly the blocks in your structure. Pass { extraTextures } to add texture paths that no model references

deepslate (^0.25.1) is a peer dependency. Node.js >= 20.19 (or >= 22.12 on the 22.x line) is required for the CJS entry (require(esm) support).

npx -p @redtact/mc-assets fetch-mc-assets --emit-module src/mcAssetsRevision.ts
# → public/mc-assets/1.21.5/ + a revision constant module for your app
import { configureMcAssets, buildResources } from "@redtact/mc-assets";
import { MC_ASSETS_REVISION } from "./mcAssetsRevision"; // from --emit-module

// Replaces the entire config — pass all options in one call.
// `revision` is REQUIRED when serving the assets with immutable caching.
configureMcAssets({ revision: MC_ASSETS_REVISION });
const resources = await buildResources(blockNames);

Textures that no model references

buildResources normally collects textures by walking blockstate → model → parent for the block names you pass. Some deepslate render paths build texture IDs in code instead, so they are unreachable that way.

The fluid textures are the important case: deepslate's liquidRenderer constructs block/{water,lava}_{still,flow} directly, and it also runs for any block with waterlogged=true — stairs, slabs, fences, bubble_column, and so on. A structure can therefore need water textures without minecraft:water ever appearing in its palette. buildResources always includes those four textures (a few KB) so waterlogged blocks never render as the missing-texture checkerboard.

For your own out-of-band textures, use extraTextures (paths without the minecraft: prefix; the atlas key becomes minecraft:{path}):

const resources = await buildResources(blockNames, {
  extraTextures: ["block/my_custom_overlay"],
});

Bundle size: @redtact/mc-assets/urls

The main entry statically imports deepslate/render (for buildResources), and deepslate does not declare sideEffects: false, so it cannot be tree-shaken away. If a code path only needs configuration / URL resolution / asset fetching, import the deepslate-free subpath:

import { textureUrl, configureMcAssets } from "@redtact/mc-assets/urls";

Measured with esbuild (--bundle --minify, entry importing only textureUrl + configureMcAssets):

| Import source | Bundle (raw) | Bundle (gzip) | deepslate | | --- | --- | --- | --- | | @redtact/mc-assets/urls | 297 B | 241 B | not included | | @redtact/mc-assets | 246 kB | 71.5 kB | included |

/urls exports configureMcAssets, McAssetsOptions, mcAssetsBase, textureUrl, MC_VERSION, getBlockStates, getBlockModels, fetchTexture. The main entry re-exports them, so configuration state is shared between the two entries.

See the repository README for full usage.

License

Apache-2.0 — see LICENSE and NOTICE.