diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-07-09 10:49:52 +0800 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-07-09 10:49:52 +0800 |
commit | 675913a65470a228eead892a2b1d58a4e2f253f5 (patch) | |
tree | 3e4b32a6e2b8ceaa5434c9b7c31df1f6fcc7da4b /src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java | |
parent | 85e5615bac19cf70d00653355f1e01e7d1849f37 (diff) | |
download | Skyblocker-675913a65470a228eead892a2b1d58a4e2f253f5.tar.gz Skyblocker-675913a65470a228eead892a2b1d58a4e2f253f5.tar.bz2 Skyblocker-675913a65470a228eead892a2b1d58a4e2f253f5.zip |
Update Title Container rendering
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java b/src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java index 7dfef3d9..4f6b2fb4 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java +++ b/src/main/java/me/xmrvizzy/skyblocker/utils/title/Title.java @@ -11,8 +11,8 @@ import net.minecraft.util.Formatting; */ public class Title { private MutableText text; - protected float lastX = 0; - protected float lastY = 0; + protected float x = -1; + protected float y = -1; /** * Constructs a new title with the given translation key and formatting to be applied. @@ -45,4 +45,13 @@ public class Title { public void setFormatting(Formatting formatting) { this.text.formatted(formatting); } + + protected boolean isDefaultPos() { + return x == -1 && y == -1; + } + + protected void resetPos() { + this.x = -1; + this.y = -1; + } } |