0.3.0 • Published 26 days ago
minecraft-types v0.3.0
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
.