Shulker Box Tooltip [Fabric/Forge/NeoForge]

Shulker Box Tooltip [Fabric/Forge/NeoForge]

7M Downloads

Suggestion: add an option that removes all the text from the tooltip (screenshot attached)

Wolterhon opened this issue ยท 4 comments

commented

mspaint_TSn0ldeRkB
The screenshot was edited by me in Paint so I'm sorry for poor editing but I hope you still get the idea.

commented

I was about to ask for the option to remove the "Contains x stack(s)" tooltip line, but this works too.

All you should have to do is set contentHint to null, here:

I'm looking into adding a proper option to disable this entirely, though.

Adding a ci.cancel() to

private void onGetTooltip(PlayerEntity player, TooltipContext context,
appears to disable the modifying of the tooltip entirely, only adding a shulker preview.

commented

The Contains x stack(s) can be removed by setting the tooltip type to None or Vanilla in the configuration.

commented

Ah, I didn't know that. I found out that cancelling the drawing of vanilla tooltips when the item is a shulker breaks the mod's tooltip rendering since the mod modifies the drawing instead of adding it's own method that injects into drawing them.

commented

I was about to ask for the option to remove the "Contains x stack(s)" tooltip line, but this works too.