Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Sep 8, 2024
1 parent 6014f0d commit 569b0fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function loader (registryOrVersion) {
}

static fromNotch (networkItem, stackId) {
console.log('fromNotch', arguments)
if (registry.type === 'pc') {
if (registry.supportFeature('itemsWithComponents')) { // 1.20.5+
console.trace('fromNotch itemsWithComponents')
Expand All @@ -165,6 +166,8 @@ function loader (registryOrVersion) {
console.trace('fromNotch itemSerializationUsesBlockId')
if (networkItem.blockId === -1) return null
return new Item(networkItem.blockId, networkItem.itemCount, networkItem.itemDamage, networkItem.nbtData, null, true)
} else {
throw new Error('Unknown Minecraft item version')
}
} else if (registry.type === 'bedrock') {
if (networkItem.network_id === 0) return null
Expand Down

0 comments on commit 569b0fb

Please sign in to comment.