From 7a775efef8e6420043b75ad54be797d898b82404 Mon Sep 17 00:00:00 2001 From: joserobjr Date: Thu, 24 Dec 2015 12:26:26 -0300 Subject: [PATCH] Fixes #344 Infinite loop when ray trace hits an unloaded block --- src/main/java/mods/eln/misc/Utils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/mods/eln/misc/Utils.java b/src/main/java/mods/eln/misc/Utils.java index f4a244148..341b48ed2 100644 --- a/src/main/java/mods/eln/misc/Utils.java +++ b/src/main/java/mods/eln/misc/Utils.java @@ -918,11 +918,11 @@ public static ArrayList traceRay(World world, double x, double y, double d = 0; while (d < norm) { - if (!Utils.isBlockLoaded(world, x, y, z)) - continue; - Block b = Utils.getBlock(world, x, y, z); - if (b != null) - blockList.add(b); + if (Utils.isBlockLoaded(world, x, y, z)) { + Block b = Utils.getBlock(world, x, y, z); + if (b != null) + blockList.add(b); + } x += dx; y += dy;