Skip to content

Commit

Permalink
Adjusted afk algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
borisshoes committed Sep 26, 2024
1 parent 3e4bae9 commit f9b1995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version = 1.3-1.21
mod_version = 1.3.1-1.21
maven_group = net.borisshoes
archives_base_name = limitedafk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ public void update(){
boolean selectAfk = curTime - getLastActionTime("selectSlot") < afkTimer && getLastActionTime("selectSlot") > 0; // Change Equipment
boolean chatAfk = curTime - getLastActionTime("chatMessage") < afkTimer && getLastActionTime("chatMessage") > 0; // Sent Message
afkCount += lookAfk ? 10 : 0;
afkCount += moveAfk ? 3 : 0;
afkCount += moveAfk ? 4 : 0;
afkCount += selectAfk ? 3 : 0;
afkCount += interactAfk ? 1 : 0;
afkCount += actionAfk ? 1 : 0;
afkCount += selectAfk ? 1 : 0;
afkCount += chatAfk ? 1 : 0;

boolean curAfk = afkCount < 13;
boolean curAfk = afkCount < 18;

if((player.isCreative() || player.isSpectator()) && (boolean)config.getValue("ignoreCreativeAndSpectator")){
curAfk = false;
Expand Down

0 comments on commit f9b1995

Please sign in to comment.