Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
prismarine-item
Advanced tools
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
instance and returns it in the format of the minecraft packets.
Take an item
in the format of the minecraft packets and return an Item
instance.
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
matchNbt
- wether to check for NBT 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.
The stack ID of the item, if the version supports Stack IDs.
Return true if items are equal.
A getter/setter for abstracting the underlying nbt
the item's custom name (ie. anvil name)
the item's custom lore (ie. set in give command)
Returns an array of enchants on the Item with their name and level
Updates the Item's NBT enchantments based on assigned array
In adventure mode, the list of block names (as strings) that this Item can be placed on
In adventure mode, the list of block names (as strings) that this Item can be used to break
A getter/setter for abstracting the underlying nbt. See https://minecraft.gamepedia.com/Anvil_mechanics#Anvil_Uses
If the current item is a type of Spawn Egg, the protocol name of the entity that will be spawned. For example, a zombie spawn egg on 1.8 will return Zombie
.
Max durability for the item, if it supports durability
maxDurability
field, fix handling item sent by server with new sentByServer
arg (#106) (thanks @extremeheat)FAQs
Represent a minecraft item with its associated data
We found that prismarine-item demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.