From 4611f8880d78945111f19b54389c7f1524ef01d6 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 25 Feb 2021 04:45:35 +1300 Subject: [PATCH] Evoker fangs and fireworks should now start off nicer --- .../me/libraryaddict/disguise/disguisetypes/Disguise.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index 6b15dfc8..47f8702f 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -422,7 +422,7 @@ public abstract class Disguise { private int blockX, blockY, blockZ, facing; private int deadTicks = 0; private int actionBarTicks = -1; - private long lastRefreshed; + private long lastRefreshed = System.currentTimeMillis(); @Override public void run() { @@ -469,8 +469,8 @@ public abstract class Disguise { // If the disguise type is tnt, we need to resend the entity packet else it will turn invisible if (getType() == DisguiseType.FIREWORK || getType() == DisguiseType.EVOKER_FANGS) { - if (lastRefreshed < System.currentTimeMillis()) { - lastRefreshed = System.currentTimeMillis() + ((getType() == DisguiseType.FIREWORK ? 40 : 23) * 50); + if (lastRefreshed + ((getType() == DisguiseType.FIREWORK ? 40 : 23) * 50) < System.currentTimeMillis()) { + lastRefreshed = System.currentTimeMillis(); DisguiseUtilities.refreshTrackers(disguise); }