Skip to content

Commit

Permalink
Update loader.js (#34)
Browse files Browse the repository at this point in the history
When i try use the module, te texture get this url ´https://raw.githubusercontent.com/rom1504/minecraft-assets/master/data/1.20.2/minecraft:items/acacia_boat.png´. The prefix ´minecraft:´ is ​​the problem, even when reading it using getContent return erro trying search route C:\..\AppData\Local\deno\npm\registry.npmjs.org\minecraft-assets\1.12.2\minecraft-assets\data\1.20.2\minecraft:items\acacia_boat\.png
  • Loading branch information
GenarLoya authored Nov 27, 2024
1 parent c8f6b3c commit dc19cd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function mcDataToNode (mcData, mcVersion) {
return indexes.blocksByName[name]
}
function getTexture (name) {
return findItemOrBlockByName(name).texture
return findItemOrBlockByName(name).texture.replace('minecraft:', '')
}
return {
blocks: indexes.blocksByName,
Expand Down

0 comments on commit dc19cd7

Please sign in to comment.