Bug fix: /move command went to the wrong location

This commit is contained in:
BruceChen 2022-08-25 14:36:15 +08:00
parent 5f520e2cf4
commit ed8e97fd2d
4 changed files with 35 additions and 9 deletions

View file

@ -168,7 +168,8 @@ namespace MinecraftClient.Mapping
throw new ArgumentException("minOffset must be lower or equal to maxOffset", "minOffset");
// Round start coordinates for easier calculation
start = new Location(Math.Floor(start.X), Math.Floor(start.Y), Math.Floor(start.Z));
start.ToFloor();
goal.ToFloor();
// We always use distance squared so our limits must also be squared.
minOffset *= minOffset;