Tooltip clearing does not work properly
IchHabeHunger54 opened this issue ยท 3 comments
What happens:
Tooltip clearing does not work properly. See the following screenshot:
What you expected to happen:
For it to work properly...? This is what it looks like without that line:
The lines:
- Item Name
- Tooltip (which is the thing to be removed)
- Advanced Tooltips
- JEI Integration's Max Stack Size Information
- Mod Id (JEI)
Script used:
Relevant code:
<item:cyclic:laser>.clearTooltip();
crafttweaker.log file:
Log acts like everything is fine, there are no errors; this is the only line even containing "tooltip":
[17:17:35.310][DONE][CLIENT][INFO] Clearing the tooltip for: <item:cyclic:laser>
Environment:
- Minecraft Version: 1.16.5
- Forge Version: 36.1.0
- CraftTweaker Version: 7.1.0.252
- Are you using a server: no
Tooltip clearing works fine.
The tooltip is all the text in the blue box, so the actual lines are just:
- Tooltip (which is the thing to be removed)
The tooltip is given to us in a List<ITextComponent>
and we quite literally just call .clear();
If you want to remove specific lines of the tooltip, use removeTooltip(String regex)
.
As for the modid, that isn't part of the tooltip, if you look at the item in your inv vs in JEI, you will see that JEI shows the modid while your inventory doesn't (shouldn't anyway).
This is how JEI does it, and why we can't clear it: