node-minecraft-assets
node-minecraft-assets copied to clipboard
[Bug Report] Dupe hopper in 1.20.2 textureContent will be replaced by one.
i wanna get hopper item (like it in hotbar), but returned a hopper outside texture. because of textureContent.json have 2 name: hopper/
i tried use this indexer.js
module.exports.buildIndexFromArray = function (array, fieldToIndex) {
if (array === undefined) { return undefined }
return array.reduce(function (index, element) {
if (!index.hasOwnProperty(element[fieldToIndex])) {
index[element[fieldToIndex]] = element
}
return index
}, {})
}
and work good for me