
As the title says, I am trying to add information tabs to some items in my 1.20.1 modpack. The 1.19+ version of the code is supposed to be:
REIEvents.information(event => {
event.addItem('example:ingredient', ['Line 1', 'Line 2'])
})
but my code only works when I do:
REIEvents.information(event => {
event.addItem("minecraft:dirt", "dirt", "more dirt")
})
When I remove "more dirt" it breaks and does not show the tab. I am not sure where it is displaying "dirt". Any advice is appreciated
by ElmtreeStudio
2 Comments
More dirt 👍
At a first glance, it looks like you forgot the square brackets in your code. addItem() expects to receive the item as a string, then a list (square brackets] of strings, with each string in that list being each line of text on that item’s information tab.
“`REIEvents.information(event => {
event.addItem(‘minecraft:dirt’, [‘dirt’, ‘more dirt’])})