diff --git a/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java b/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java index b59784e0f..c2807a30a 100644 --- a/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java +++ b/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java @@ -514,22 +514,22 @@ private void processHighCraft(int minY, int maxY) { dy = Math.min(dy, -1); return; } - final int perWorldMaxHeigh = (int) craftType.getPerWorldProperty(CraftType.PER_WORLD_MAX_HEIGHT_ABOVE_GROUND, world); + final int perWorldMaxHeighAboveGround = (int) craftType.getPerWorldProperty(CraftType.PER_WORLD_MAX_HEIGHT_ABOVE_GROUND, world); // world == craft.world - if (perWorldMaxHeigh <= world.getMinHeight()) { + if (perWorldMaxHeighAboveGround <= 0) { return; } final MovecraftLocation middle = oldHitBox.getMidPoint(); int testY; - for (testY = minY; testY > world.getMinHeight(); testY--) { + for (testY = minY; testY > 0; testY--) { if (!craft.getWorld().getBlockAt(middle.getX(), testY - 1, middle.getZ()).getType().isAir()) { break; } } - if (maxY - testY > perWorldMaxHeigh) + if (maxY - testY > perWorldMaxHeighAboveGround) dy = Math.min(dy, -1); }