diff options
| author | Aizistral | 2022-11-11 22:31:22 +0100 |
|---|---|---|
| committer | Aizistral | 2022-11-11 22:31:22 +0100 |
| commit | f8fb102bf05ea70374c85325d85678e8e1739408 (patch) | |
| tree | a5f36e3169fd08f3e0451edfbf02ec109d61a7b8 /src/main/java | |
| parent | cbadf7397d1b4d2bd907ddbbbe881cca873454c0 (diff) | |
Caching isn't always good
Fixes #287
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/gui/AdvancedTooltip.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/gui/AdvancedTooltip.java b/src/main/java/com/aizistral/nochatreports/gui/AdvancedTooltip.java index 20261c4..d4c7189 100644 --- a/src/main/java/com/aizistral/nochatreports/gui/AdvancedTooltip.java +++ b/src/main/java/com/aizistral/nochatreports/gui/AdvancedTooltip.java @@ -63,10 +63,13 @@ public class AdvancedTooltip extends Tooltip { @Override public List<FormattedCharSequence> toCharSequence(Minecraft minecraft) { - if (this.cachedTooltip == null) { - this.cachedTooltip = splitTooltip(minecraft, this.getMessage(), this.maxWidth); - } - return this.cachedTooltip; + if (this.supplier == null) { + if (this.cachedTooltip == null) { + this.cachedTooltip = splitTooltip(minecraft, this.getMessage(), this.maxWidth); + } + return this.cachedTooltip; + } else + return splitTooltip(minecraft, this.getMessage(), this.maxWidth); } public boolean hasCustomRender() { |
