MisterPeModder / ShulkerBoxTooltip

What's in my shulker box?
MIT License
96 stars 31 forks source link

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

Open Wolterhon opened 3 years ago

Wolterhon commented 3 years ago

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.

Abbanon commented 3 years ago

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

5HT2 commented 2 years ago

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:

https://github.com/MisterPeModder/ShulkerBoxTooltip/blob/ee41a44b0a1f5558712939f8e4cc04e4acbf2031/src/main/java/com/misterpemodder/shulkerboxtooltip/impl/ShulkerBoxTooltipClient.java#L88

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

Adding a ci.cancel() to https://github.com/MisterPeModder/ShulkerBoxTooltip/blob/ee41a44b0a1f5558712939f8e4cc04e4acbf2031/src/main/java/com/misterpemodder/shulkerboxtooltip/mixin/client/ItemStackMixin.java#L42 appears to disable the modifying of the tooltip entirely, only adding a shulker preview.

MisterPeModder commented 2 years ago

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

5HT2 commented 2 years ago

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.