Fix safelogin support with 1.18 world heights (#4667)

Fixes #4665.
This commit is contained in:
Josh Roy 2021-12-03 15:31:36 -05:00 committed by GitHub
parent c45c741210
commit d091d6902c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,7 +267,7 @@ public final class LocationUtil {
int y = (int) Math.round(loc.getY());
final int z = loc.getBlockZ();
int count = 0;
while (LocationUtil.isBlockUnsafe(ess, world, x, y, z) && y > -1) {
while (LocationUtil.isBlockUnsafe(ess, world, x, y, z) && y >= ess.getWorldInfoProvider().getMinHeight(world)) {
y--;
count++;
if (count > 2) {