CraftTweaker

CraftTweaker

151M Downloads

Curio Tooltip clearing issue

Kaiserbow opened this issue ยท 2 comments

commented

Issue description

Using IItemStack.removeTooltip(regex as String) does not work to remove Curio tooltips (namely, Slot/Tier/etc). As well as this, using IItemStack.clearTooltip() crashes Minecraft when used on a Curio-compatible item.

Steps to reproduce

Multiple non-Curio and Curio items were tested (non-Curio being Vanilla items, Curio items being Rings of Ascension and Spartan Weaponry), and no issues arose when removing lines from tooltip for Vanilla items. All attempts on Curio items crashed Minecraft.

Script used

https://pastebin.com/ZiD73yWn

The crafttweaker.log file

https://pastebin.com/04gPxSyU

Minecraft version

1.16

Forge version

36.2.0

CraftTweaker version

7.1.0.355

Other relevant information

A standard Minecraft crash log is also available that mentions 'Index Out of Bound' exception.

The latest.log file

https://pastebin.com/cDRYAbfd

commented
<item:ringsofascension:ring_luck>.clearTooltip();

Removes EVERYTHING from the tooltip.
Curios then tries to set a tooltip value at an invalid point because the tooltip is empty.
Nothing I can do about that, so report it to them.

As for removing the Tier: Legendary, I don't see where they add that in their code, but you probably have the regex wrong or are looking at the wrong mod.

commented
<item:ringsofascension:ring_luck>.clearTooltip();

Removes EVERYTHING from the tooltip.
Curios then tries to set a tooltip value at an invalid point because the tooltip is empty.
Nothing I can do about that, so report it to them.

I see, I thought it might have been an error because my understanding was clearTooltip and modifyTooltip was the previous one was cleared, and then the custom one was entered. Now that you've said that, it makes sense now.

As for removing the Tier: Legendary, I don't see where they add that in their code, but you probably have the regex wrong or are looking at the wrong mod.

That may have also been a misunderstanding on my part regarding (regex as String) and thinking String was, literally, a string of the characters to be removed.

I will close this issue now.