# prismarine-registry

> Prismarine Registry

Latest version **1.12.0** (published 2026-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install prismarine-registry
pnpm add prismarine-registry
yarn add prismarine-registry
bun add prismarine-registry
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.12.0 |
| Published | 2026-03-30 |
| First published | 2022-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 29.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Author | Romain Beaumont |
| Maintainers | rom1504 |
| Keywords | prismarine, template |

## Links

- npm: https://www.npmjs.com/package/prismarine-registry
- Repository: https://github.com/PrismarineJS/prismarine-registry
- Homepage: https://github.com/PrismarineJS/prismarine-registry#readme
- Issues: https://github.com/PrismarineJS/prismarine-registry/issues
- npm.io page: https://npm.io/package/prismarine-registry

## Dependencies (3)

- [minecraft-data](https://npm.io/package/minecraft-data.md) ^3.70.0
- [prismarine-nbt](https://npm.io/package/prismarine-nbt.md) ^2.0.0
- [prismarine-block](https://npm.io/package/prismarine-block.md) ^1.17.1

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.12.0 (latest) — 2026-03-30
- 1.11.0 — 2025-01-04
- 1.10.0 — 2024-10-26
- 1.9.0 — 2024-10-14
- 1.8.0 — 2024-10-12
- 1.7.0 — 2023-02-03
- 1.6.0 — 2022-11-20
- 1.5.0 — 2022-10-01
- 1.4.0 — 2022-09-29
- 1.3.0 — 2022-08-29
- 1.2.0 — 2022-04-11
- 1.1.0 — 2022-01-12
- 1.0.0 — 2022-01-12
- 0.1.0 — 2022-01-08

## README

# prismarine-registry
[![NPM version](https://img.shields.io/npm/v/prismarine-registry.svg)](http://npmjs.com/package/prismarine-registry)
[![Build Status](https://github.com/PrismarineJS/prismarine-registry/workflows/CI/badge.svg)](https://github.com/PrismarineJS/prismarine-registry/actions?query=workflow%3A%22CI%22)
[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](https://discord.gg/GsEFRM8)
[![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/PrismarineJS/prismarine-registry)

Creates an dynamic instance of node-minecraft-data.

## Usage

```js
const registry = require('prismarine-registry')('1.18')

registry.blocksByName['stone'] // See information about stone
```

## API

[See minecraft-data API](https://github.com/PrismarineJS/node-minecraft-data/blob/master/doc/api.md)

### mcpc

#### loadDimensionCodec / writeDimensionCodec

* loads/writes data from dimension codec in login packet

#### .chatFormattingByName, .chatFormattingById (1.19+)

Contains mapping from chat type ID (numeric or string) to information about how the 
chat type should be formatted and what the relevant parameters are.

```js
{
  'minecraft:chat': { formatString: '<%s> %s', parameters: [ 'sender', 'content' ] },
  'minecraft:say_command': { formatString: '[%s] %s', parameters: [ 'sender', 'content' ] },
  'minecraft:msg_command': { formatString: '%s whispers to you: %s', parameters: [ 'sender', 'content' ] },
  'minecraft:team_msg_command': { formatString: '%s <%s> %s', parameters: [ 'team_name', 'sender', 'content' ] },
  'minecraft:emote_command': { formatString: '* %s %s', parameters: [ 'sender', 'content' ] }
}
```

#### .dimensionsById, dimensionsByName (1.19+)

Mapping to dimension data object containing dimension `name`, `minY` and `height`.

### mcpe

#### loadItemStates / writeItemStates

* loads/writes data from an item states array inside the bedrock start game packet.

```js
// In a client
const { createClient } = require('bedrock-protocol');
const registry = require('prismarine-registry')('bedrock_1.19.50');

const client = createClient({
  'host': '127.0.0.1'
})

client.on('start_game', ({ itemstates }) => {
  registry.loadItemStates(itemstates);
})

// In a server
server.on('connect', (client) => {
  const itemstates = registry.writeItemStates()
  client.write('start_game', { ...startGamePacket, itemstates })
})
```

---
_Source: https://npm.io/package/prismarine-registry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
