prismarine-item
Advanced tools
| version: 2 | ||
| updates: | ||
| - package-ecosystem: npm | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| open-pull-requests-limit: 10 | ||
| ignore: | ||
| - dependency-name: "@types/node" | ||
| versions: | ||
| - 15.0.0 | ||
| - dependency-name: minecraft-data | ||
| versions: | ||
| - 2.80.0 |
+3
-1
| /// <reference types="node" /> | ||
| import { Tag, TagType } from 'prismarine-nbt' | ||
| declare class Item { | ||
@@ -9,3 +11,3 @@ constructor(type: number, count: number, metadata?: number, nbt?: object); | ||
| metadata: number; | ||
| nbt: Buffer | null; | ||
| nbt: Tags[TagType] | null; | ||
| name: string; | ||
@@ -12,0 +14,0 @@ displayName: string; |
+4
-1
@@ -73,5 +73,8 @@ const nbt = require('prismarine-nbt') | ||
| static fromNotch (item) { | ||
| if (mcData.isNewerOrEqualTo('1.13')) { | ||
| if (mcData.isNewerOrEqualTo('1.14')) { | ||
| if (item.present === false) return null | ||
| return new Item(item.itemId, item.itemCount, item.nbtData) | ||
| } else if (mcData.isNewerOrEqualTo('1.13')) { | ||
| if (item.itemId === -1) return null | ||
| return new Item(item.itemId, item.itemCount, item.nbtData) | ||
| } else { | ||
@@ -78,0 +81,0 @@ if (item.blockId === -1) return null |
+3
-3
| { | ||
| "name": "prismarine-item", | ||
| "version": "1.8.0", | ||
| "version": "1.9.0", | ||
| "description": "Represent a minecraft item with its associated data", | ||
@@ -21,5 +21,5 @@ "main": "index.js", | ||
| "devDependencies": { | ||
| "@types/node": "^14.0.1", | ||
| "@types/node": "^15.0.1", | ||
| "jest": "^26.1.0", | ||
| "minecraft-data": "2.79.0", | ||
| "minecraft-data": "^2.79.0", | ||
| "standard": "^16.0.1" | ||
@@ -26,0 +26,0 @@ }, |
+6
-0
@@ -93,2 +93,8 @@ # prismarine-item | ||
| ## 1.9.0 | ||
| * Revise typings (thanks @extremeheat) | ||
| * Revise deps (thanks @rom1504) | ||
| * Correctly identify null items in MC 1.13 (thanks @u9g) | ||
| ## 1.8.0 | ||
@@ -95,0 +101,0 @@ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
64121
0.97%11
10%961
0.42%151
4.14%