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 a1a9390b6..d3b387157 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 @@ -229,13 +229,16 @@ protected void execute() throws InterruptedException, ExecutionException { MovecraftLocation test = new MovecraftLocation(newHitBox.getMidPoint().getX(), newHitBox.getMinY(), newHitBox.getMidPoint().getZ()); test = test.translate(0, -1, 0); - while (test.toBukkit(world).getBlock().getType().isAir()) { + // If we are out of bounds, that is technically air, but then we would have an infinite loop, so stay in Y bounds + while (test.toBukkit(world).getBlock().getType().isAir() && world.getMinHeight() >= test.getY()) { test = test.translate(0, -1, 0); } Material testType = test.toBukkit(world).getBlock().getType(); if (craft.getType().getMaterialSetProperty(CraftType.FORBIDDEN_HOVER_OVER_BLOCKS).contains(testType)) { + // Why is there no return here? Shouldnt there be one? fail(String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft over block"), testType.name().toLowerCase().replace("_", " "))); + return; } } //call event diff --git a/Movecraft/src/main/resources/localisation/movecraftlang_en.properties b/Movecraft/src/main/resources/localisation/movecraftlang_en.properties index 96790495e..d71770d52 100644 --- a/Movecraft/src/main/resources/localisation/movecraftlang_en.properties +++ b/Movecraft/src/main/resources/localisation/movecraftlang_en.properties @@ -112,6 +112,7 @@ Translation\ -\ Failed\ Craft\ is\ obstructed=The craft cannot move because its Translation\ -\ Failed\ Craft\ out\ of\ fuel=The craft is out of fuel\! Translation\ -\ Failed\ Craft\ hit\ minimum\ height\ limit=Craft has hit the minimum height limit Translation\ -\ Failed\ Craft\ over\ block=This craft cannot move over %s\! +Translation\ -\ Failed\ Craft\ over\ void=The craft can't go over nonexisting terrain! Insufficient\ Permissions=Insufficient Permissions Invalid\ Coordinates=Invalid Coordinates