-1

How can I get a list of every item with a unique ID in Minecraft 1.14.4 in an easy-to-process format? I'm making a data pack that requires a loot table with every item, and it would take much too long to manually type in ~900 items.

1

I made a JSON list (Pastebin link).

I ran this script on the Blocks page on the wiki:

const table = document.getElementsByTagName('table')[0]
const rows = table.querySelectorAll('tbody > tr')
const blocks = [...rows]
  .map(r => {
    const as = r.getElementsByTagName('a')
    return as.length === 1 ? as[0] : as[1]
  })
  .map(a => a.textContent.replace(/'| /g, '_').toLowerCase())

and this one on the Items page:

const items = uls.reduce((ids, ul) => {
  [...ul.children]
    .map(li => li.children[1].textContent.replace(/'| /g, '_').toLowerCase())
    .forEach(i => ids.push(i))
  return ids
}, [])

Disclaimer: The script just converted the names to snake_case and I haven't double-checked them, so some of them may be wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.