#Is it possible to remove tooltips?

12 messages · Page 1 of 1 (latest)

meager plank
#

I'm looking for a minecraft forge script (version 1.18.2) that removes that annoying tooltip for items This text: "Building Blocks, Tools etc".
I looked at the wiki and saw no option to disable tooltips or clear them, is this possible without adding a mod?

tough stirrupBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

meager plank
#

It is possible to remove tooltips?

#

Is it possible to remove tooltips?

dull harbor
#

yes

agile ledgeBOT
#

[Quote ➤](#archived-example-scripts message) Small 1.19.2 script that removes the stat bits at the bottom of tools and armour

const remove = (index, text) => {
    text.remove(index)
    return index - 1
}
const keyContains = (string, component) => {
    let key = component?.contents?.key
    return key != null && key.contains(string)
}
ItemEvents.tooltip(event => {
    event.addAdvanced(Ingredient.all, (s, a, text) => {
        let isStatSection = false
        for (let i = 0;i < text.size();i++) {
            let component = text.get(i)
            if (keyContains("item.modifiers", component)) {
                isStatSection = true
                i = remove(i, text)
                i = remove(i, text)
                continue
            }
            if (isStatSection) {
                if (keyContains("attribute", component)) {
                    i = remove(i, text)
                    continue
                }
                for (let c of component.getSiblings()) {
                    if (keyContains("attribute", c)) {
                        i = remove(i, text)
                    }
                }
            }
        }
    })
})

Could be ported to 1.18.2, but I can't be bothered. All required changes are also done to the ench desc script, so can copy from there

dull harbor
#

this is a little more complicated than you need

meager plank
#

xDD thx, but this is kubejs 6 i think, need i just to change the events?

#

oh saw the command xD i will port it

#

/ticket close

tough stirrupBOT
#

Ticket closed!