Skip to content

Commit

Permalink
Removed code duplicate (isGrounded)
Browse files Browse the repository at this point in the history
  • Loading branch information
omnivoyant authored Jun 24, 2022
1 parent 7b42c92 commit 23e6127
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package adris.altoclef.tasksystem;

import adris.altoclef.AltoClef;
import adris.altoclef.util.helpers.EntityHelper;

/**
* Some tasks may mess up royally if we interrupt them while mid air.
Expand All @@ -12,6 +13,6 @@ public interface ITaskRequiresGrounded extends ITaskCanForce {
default boolean shouldForce(AltoClef mod, Task interruptingCandidate) {
if (interruptingCandidate instanceof ITaskOverridesGrounded)
return false;
return !(mod.getPlayer().isOnGround() || mod.getPlayer().isSwimming() || mod.getPlayer().isTouchingWater() || mod.getPlayer().isClimbing());
return !(EntityHelper.isGrounded(mod));
}
}

0 comments on commit 23e6127

Please sign in to comment.