minecraft-types
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

Minecraft Types

A package that supplies Minecraft types.

Installation

Install Minecraft Types into your client or server-side project using npm i minecraft-types.


Usage

Materials

Useful to detect Minecraft material IDs (blocks/items) or to get information on them.

import { Materials } from "minecraft-types";

const stone = Materials.get("stone");

Materials.isId("dirt"); // true

Enchantments

Useful to detect Minecraft enchantment IDs or to get information on them.

import { Enchantments } from "minecraft-types";

const sharpness = Enchantments.get("sharpness");

Enchantments.isId("fire_aspect"); // true

Entities

Useful to detect Minecraft entity IDs or to get information on them.

import { Entities } from "minecraft-types";

const zombie = Entities.get("zombie");

Entities.isId("wither_skeleton"); // true

To generate your own lists or update these ones

/plugin contains the source code for a PaperMC plugin, compile it and install it on a PaperMC server. The plugin will automatically generate some useful files into the <SERVER ROOT>/extract directory. Create the directory import in this repo's repository and copy the contents of <SERVER ROOT>/extract into import. Run npm run generate.

Readme

Keywords

Package Sidebar

Install

npm i minecraft-types

Weekly Downloads

1

Version

0.4.0

License

MIT

Unpacked Size

577 kB

Total Files

25

Last publish

Collaborators

  • eyezah