juancarloscp52 / BedrockIfy

A Minecraft mod that implements some Minecraft Bedrock features into Java edition.
GNU General Public License v3.0
178 stars 38 forks source link

The duration of Lingering Potions are displayed incorrectly #228

Closed lonefelidae16 closed 1 year ago

lonefelidae16 commented 1 year ago

Hi 👋

I noticed that the BedrockIfy tooltip feature was displaying the wrong duration for Lingering Potions. Upon examination, I found that a custom class PotionTooltip is instantiated with this StatusEffectInstance, and it doesn’t contain the duration multiplier.

Getting the multiplier is difficult and hard coded, so I think it is better to use the result of Item#appendTooltip for the PotionItem. And it works fine on my instance.

2023-02-23_11 23 16

When I tried to fix, it had far-reaching implications, leading to a refactoring. Please take a look at the code in the new PR I’m about to create.