From f8004473ed172a5bc771d5c0f46f2f0e7ed12e54 Mon Sep 17 00:00:00 2001 From: Lexer747 Date: Mon, 11 May 2026 22:02:45 +0100 Subject: [PATCH 1/2] fix desync with modern resizable --- .../AttackTimerMetronomePlugin.java | 50 +++++++-------- .../com/attacktimer/testdata/PunishTest.txt | 7 ++- .../attacktimer/testdata/PunishWastedTest.txt | 7 ++- .../testdata/PunishWastedWrongStyleTest.txt | 7 ++- .../com/attacktimer/testdata/basicTest.txt | 61 ++++++++++--------- .../attacktimer/testdata/eatingFoodTest.txt | 26 ++++---- 6 files changed, 80 insertions(+), 78 deletions(-) diff --git a/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java b/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java index 02765db..41f4945 100644 --- a/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java +++ b/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java @@ -56,7 +56,6 @@ import net.runelite.api.events.InteractingChanged; import net.runelite.api.events.SoundEffectPlayed; import net.runelite.api.events.StatChanged; -import net.runelite.api.events.VarClientIntChanged; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.VarPlayerID; import net.runelite.api.gameval.VarbitID; @@ -123,7 +122,7 @@ public enum AttackState public Color CurrentColor = Color.WHITE; private Spellbook currentSpellBook = Spellbook.STANDARD; - private int lastEquippingMonotonicValue = -1; + private int lastUsedWeaponId = -1; private int soundEffectTick = -1; private int soundEffectId = -1; private boolean isUsingMagic = false; @@ -206,31 +205,6 @@ public void onVarbitChanged(VarbitChanged varbitChanged) } } - // onVarbitChanged happens when the user causes some interaction therefore we can't rely on some fixed - // timing relative to a tick. A player can swap many items in the duration of the a tick. - @Subscribe - public void onVarClientIntChanged(VarClientIntChanged varClientIntChanged) - { - if (!config.enableMetronome()) return; - final int currentMagicVarBit = client.getVarcIntValue(EQUIPPING_MONOTONIC); - if (currentMagicVarBit <= lastEquippingMonotonicValue) - { - return; - } - lastEquippingMonotonicValue = currentMagicVarBit; - - // This windowing safe guards of from late swaps inside a tick, if we have already rendered the tick - // then we shouldn't perform another attack. - boolean preAttackWindow = attackState == AttackState.DELAYED_FIRST_TICK && renderedState != attackState; - if (preAttackWindow) - { - // "Perform an attack" this is overwrites the last attack since we now know the user swapped - // "Something" this tick, the equipped weapon detection will pick up specific weapon swaps. Even - // swapping more than 1 weapon inside a single tick. - performAttack(); - } - } - // onSoundEffectPlayed used to track spell casts, for when the player casts a spell on first tick coming // off cooldown, in some cases (e.g. ice barrage) the player will have no animation. Also they don't have // a projectile to detect instead :/ @@ -341,6 +315,7 @@ private void setAttackDelay() PoweredStaves stave = PoweredStaves.getPoweredStaves(weaponId, curAnimation); boolean matchesSpellbook = matchesSpellbook(curAnimation); attackDelayHoldoffTicks = getWeaponSpeed(weaponId, stave, curAnimation, matchesSpellbook); + lastUsedWeaponId = weaponId; } // matchesSpellbook tries two methods, matching the animation the spell book based on the enum of @@ -570,7 +545,7 @@ public void onGameTick(GameTick tick) } else { - uiHideDebounceTickCount--; + uiHideDebounceTickCount = Math.max(-20, uiHideDebounceTickCount - 1); } break; case DELAYED_FIRST_TICK: @@ -648,7 +623,6 @@ public void writeState(ByteArrayDataOutput outChannel) sb.append("renderedState: "); sb.append(this.renderedState);sb.append(SEPARATOR); sb.append("pendingEatDelayTicks: "); sb.append(this.pendingEatDelayTicks);sb.append(SEPARATOR); sb.append("currentSpellBook: "); sb.append(this.currentSpellBook);sb.append(SEPARATOR); - sb.append("lastEquippingMonotonicValue: "); sb.append(this.lastEquippingMonotonicValue);sb.append(SEPARATOR); sb.append("soundEffectTick: "); sb.append(this.soundEffectTick);sb.append(SEPARATOR); sb.append("soundEffectId: "); sb.append(this.soundEffectId);sb.append("\n"); // @formatter:on @@ -672,5 +646,23 @@ public void onRender() attackState = AttackState.NOT_ATTACKING; } } + checkForLateWeaponSwaps(); } + + public void checkForLateWeaponSwaps() + { + final boolean weaponMisMatch = Utils.getWeaponId(client) != lastUsedWeaponId; + + // This windowing safe guards of from late swaps inside a tick, if we have already rendered the tick + // then we shouldn't perform another attack. + final boolean preAttackWindow = attackState == AttackState.DELAYED_FIRST_TICK && renderedState != attackState; + if (preAttackWindow && weaponMisMatch) + { + // "Perform an attack" this is overwrites the last attack since we now know the user swapped + // "Something" this tick, the equipped weapon detection will pick up specific weapon swaps. Even + // swapping more than 1 weapon inside a single tick. + performAttack(); + } + } + } diff --git a/src/test/java/com/attacktimer/testdata/PunishTest.txt b/src/test/java/com/attacktimer/testdata/PunishTest.txt index 1489368..7db69fb 100644 --- a/src/test/java/com/attacktimer/testdata/PunishTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishTest.txt @@ -1,3 +1,4 @@ -tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt b/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt index 1489368..7db69fb 100644 --- a/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt @@ -1,3 +1,4 @@ -tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt b/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt index ae5d4f2..fb21075 100644 --- a/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt @@ -1,3 +1,4 @@ -tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 8, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 7, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 8, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 7, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/basicTest.txt b/src/test/java/com/attacktimer/testdata/basicTest.txt index e68694b..35e77f9 100644 --- a/src/test/java/com/attacktimer/testdata/basicTest.txt +++ b/src/test/java/com/attacktimer/testdata/basicTest.txt @@ -1,36 +1,41 @@ -tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 1. Start by setting up the player and plugin [TEST MESSAGE] 2. Mock an attack animation -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 3. Check that the plugin has registered the attack [TEST MESSAGE] 4. Check that the plugin counts down correctly -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 2, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 2, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 5. Check that the plugin is back to a waiting state and it still counts down -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: -2, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -3, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -2, attackDelayHoldoffTicks: -4, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -3, attackDelayHoldoffTicks: -5, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -4, attackDelayHoldoffTicks: -6, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -5, attackDelayHoldoffTicks: -7, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -6, attackDelayHoldoffTicks: -8, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -7, attackDelayHoldoffTicks: -9, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -8, attackDelayHoldoffTicks: -10, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -9, attackDelayHoldoffTicks: -11, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -10, attackDelayHoldoffTicks: -12, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -11, attackDelayHoldoffTicks: -13, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -12, attackDelayHoldoffTicks: -14, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -13, attackDelayHoldoffTicks: -15, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -14, attackDelayHoldoffTicks: -16, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -15, attackDelayHoldoffTicks: -17, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -16, attackDelayHoldoffTicks: -18, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -17, attackDelayHoldoffTicks: -19, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -18, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -19, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -21, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: -2, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -3, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -2, attackDelayHoldoffTicks: -4, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -3, attackDelayHoldoffTicks: -5, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -4, attackDelayHoldoffTicks: -6, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -5, attackDelayHoldoffTicks: -7, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -6, attackDelayHoldoffTicks: -8, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -7, attackDelayHoldoffTicks: -9, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -8, attackDelayHoldoffTicks: -10, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -9, attackDelayHoldoffTicks: -11, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -10, attackDelayHoldoffTicks: -12, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -11, attackDelayHoldoffTicks: -13, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -12, attackDelayHoldoffTicks: -14, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -13, attackDelayHoldoffTicks: -15, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -14, attackDelayHoldoffTicks: -16, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -15, attackDelayHoldoffTicks: -17, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -16, attackDelayHoldoffTicks: -18, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -17, attackDelayHoldoffTicks: -19, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -18, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -19, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: -22, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: -23, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: -24, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt b/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt index 482fff8..95a769c 100644 --- a/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt +++ b/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt @@ -1,21 +1,23 @@ -tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 1. Start by setting up the player and plugin [TEST MESSAGE] 2. Mock an attack animation -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 3. Check that the plugin has registered the attack -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] Perform an eat -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 3, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 3, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] Next game tick -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] Perform a fast eat -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 2, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 2, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] Next game tick -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 6, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 6, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 [TEST MESSAGE] 4. Check that the plugin counts down correctly -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 4, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 2, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 5, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 4, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 2, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 +tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 + 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 From 64e2fc7e4d5eec00d45d37a101fb7f67c14ac9f6 Mon Sep 17 00:00:00 2001 From: Lexer747 Date: Mon, 11 May 2026 22:13:42 +0100 Subject: [PATCH 2/2] fix the tests for real --- src/test/java/com/attacktimer/IntegrationTests.java | 1 - src/test/java/com/attacktimer/testdata/PunishTest.txt | 1 - src/test/java/com/attacktimer/testdata/PunishWastedTest.txt | 1 - .../com/attacktimer/testdata/PunishWastedWrongStyleTest.txt | 1 - src/test/java/com/attacktimer/testdata/basicTest.txt | 5 ----- src/test/java/com/attacktimer/testdata/eatingFoodTest.txt | 2 -- 6 files changed, 11 deletions(-) diff --git a/src/test/java/com/attacktimer/IntegrationTests.java b/src/test/java/com/attacktimer/IntegrationTests.java index ae4e7aa..9346096 100644 --- a/src/test/java/com/attacktimer/IntegrationTests.java +++ b/src/test/java/com/attacktimer/IntegrationTests.java @@ -173,7 +173,6 @@ protected void performStateVerificationOrUpdate(ByteArrayDataOutput channel, Pat try (var file = Files.newByteChannel(path, EnumSet.of(StandardOpenOption.CREATE, StandardOpenOption.WRITE))) { file.write(ByteBuffer.wrap(actualBytes)); - file.close(); } fail("Updated file: " + path); return; diff --git a/src/test/java/com/attacktimer/testdata/PunishTest.txt b/src/test/java/com/attacktimer/testdata/PunishTest.txt index 7db69fb..c550595 100644 --- a/src/test/java/com/attacktimer/testdata/PunishTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishTest.txt @@ -1,4 +1,3 @@ tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 -urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt b/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt index 7db69fb..c550595 100644 --- a/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishWastedTest.txt @@ -1,4 +1,3 @@ tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 -urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt b/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt index fb21075..94ae22e 100644 --- a/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt +++ b/src/test/java/com/attacktimer/testdata/PunishWastedWrongStyleTest.txt @@ -1,4 +1,3 @@ tickPeriod: 0, uiHideDebounceTickCount: 0, attackDelayHoldoffTicks: 0, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 0, uiHideDebounceTickCount: -1, attackDelayHoldoffTicks: -1, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 8, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 7, attackState: DELAYED_FIRST_TICK, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 -urrentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/basicTest.txt b/src/test/java/com/attacktimer/testdata/basicTest.txt index 35e77f9..c591e93 100644 --- a/src/test/java/com/attacktimer/testdata/basicTest.txt +++ b/src/test/java/com/attacktimer/testdata/basicTest.txt @@ -35,8 +35,3 @@ tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attac tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: -20, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 -: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -22, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -23, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -24, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: -25, attackDelayHoldoffTicks: -20, attackState: NOT_ATTACKING, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 diff --git a/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt b/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt index 95a769c..1a42612 100644 --- a/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt +++ b/src/test/java/com/attacktimer/testdata/eatingFoodTest.txt @@ -19,5 +19,3 @@ tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 3, attackSta tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 2, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, soundEffectTick: -1, soundEffectId: -1 - 1, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1 -tickPeriod: 4, uiHideDebounceTickCount: 1, attackDelayHoldoffTicks: 0, attackState: DELAYED, renderedState: NOT_ATTACKING, pendingEatDelayTicks: 0, currentSpellBook: STANDARD, lastEquippingMonotonicValue: -1, soundEffectTick: -1, soundEffectId: -1