Skip to content

Commit

Permalink
sync extended action duration to client
Browse files Browse the repository at this point in the history
fix #1391
  • Loading branch information
Cheaterpaul committed Jul 17, 2024
1 parent b72f440 commit 42f159d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ public void deactivateAllActions() {

@Override
public void extendActionTimer(@NotNull ILastingAction<T> action, int duration) {
int i = activeTimers.getOrDefault(RegUtil.id(action), -1);
ResourceLocation id = RegUtil.id(action);
int i = activeTimers.getOrDefault(id, -1);
if (i > 0) {
activeTimers.put(RegUtil.id(action), i + duration);
activeTimers.put(id, i + duration);
int expectedDuration = this.expectedDurations.getInt(id);
expectedDurations.put(id, expectedDuration + duration);
dirty = true;
}
}

Expand Down

0 comments on commit 42f159d

Please sign in to comment.