Represent a minecraft item with its associated data
const Item=require("prismarine-item")("1.8");
const ironShovelItem=new Item(256,1);
console.log(ironShovelItem);
const notchItem=Item.toNotch(ironShovelItem);
console.log(notchItem);
console.log(Item.fromNotch(notchItem));
Take an item
in the format of the minecraft packets and return an Item
instance.
Take an Item
instance and return it in the format of the minecraft packets.
Take two seperate item
instances, and makes one item using the same combining done by the vanilla anvil
itemOne
- first item
itemTwo
- second item
matchStackSize
- whether to check for count equality
Checks equality between two items based on itemType, count, metadata, and stringified nbt
Numerical id.
Number which represents different things depending on the item. See http://www.minecraftwiki.net/wiki/Data_values#Data
Buffer.
Return true if items are equal.
A getter/setter for abstracting the underlying nbt
A getter/setter for abstracting the underlying nbt
A getter/setter for abstracting the underlying nbt (does calculations)
A getter/setter for abstracting the underlying nbt. See https://minecraft.gamepedia.com/Anvil_mechanics#Anvil_Uses
A getter for abstracting the underlying nbt, get's the mob name from a spawn egg Item. e.g. a zombie spawn egg on 1.8 will return Zombie
- add item.spawnEggMobName (thanks @U9G)
- fix item present detection (thanks @U9G)
- Revise typings (thanks @extremeheat)
- Revise deps (thanks @rom1504)
- Correctly identify null items in MC 1.13 (thanks @u9g)
- add matchStackSize option on Item.equal (thanks @u9g)
- Item.equal checks nbt equality (thanks @u9g)
- Item.anvil added, along with a ton of getters & setters for Item (thanks @u9g)
- 1.16 support (thanks @DrakoTrogdor)
- typescripts definitions (thanks @IdanHo)
- 1.15 support
- 1.14 support
- allow unknown items
- 1.13 support
- make nbt default to null
- display the item id if it is not found in minecraft data
- bump mcdata
- bump dependencies
- Import from mineflayer