Fixed 1 tick movement delay on some actions

This commit is contained in:
Doggo 2024-06-08 12:23:06 +00:00 committed by Ryan
parent 98c0698097
commit 28b168e742

View file

@ -312,7 +312,7 @@ public abstract class MovementPulse extends Pulse {
if (interactLocation == null) if (interactLocation == null)
interactLocation = loc; interactLocation = loc;
if (destination instanceof Entity || interactLocation == null || (!mover.getWalkingQueue().hasPath() && interactLocation.getDistance(mover.getLocation()) > 0) || (usingTruncatedPath && destination.getLocation().getDistance(mover.getLocation()) < 14)) { if (destination instanceof Entity || interactLocation == null || (mover.getWalkingQueue().getQueue().size() <= 1 && interactLocation.getDistance(mover.getLocation()) > 0) || (usingTruncatedPath && destination.getLocation().getDistance(mover.getLocation()) < 14)) {
if (!checkAllowMovement()) if (!checkAllowMovement())
return; return;
if (destination instanceof Entity && previousLoc != null && previousLoc.equals(loc) && mover.getWalkingQueue().hasPath()) if (destination instanceof Entity && previousLoc != null && previousLoc.equals(loc) && mover.getWalkingQueue().hasPath())