Add support for Y-offsets with back direction (#2164)

This commit is contained in:
Maddy Miller 2022-08-07 16:55:56 +10:00 committed by GitHub
parent e01b049265
commit 54ed9e89d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -555,7 +555,12 @@ private Direction getPlayerDirection(@Nullable Player player, String dirStr) thr
case "b":
case "back":
return getDirectionRelative(player, 180);
Direction dir = getDirectionRelative(player, 180);
if (dir.isUpright()) {
// If this is an upright direction, flip it.
dir = dir == Direction.UP ? Direction.DOWN : Direction.UP;
}
return dir;
case "l":
case "left":