From 867104b90053932a03dc5b02a6d203beb2ae8d20 Mon Sep 17 00:00:00 2001 From: Dream-Master Date: Wed, 22 Jun 2016 20:51:49 +0200 Subject: [PATCH] 851995fb6ec173a60db1c812aaf40c081ae6aaea [851995f] --- .../java/gregtech/api/util/GT_Utility.java | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index c6d1ab52..6f056650 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1045,15 +1045,35 @@ public class GT_Utility { } public static boolean isOpaqueBlock(World aWorld, int aX, int aY, int aZ) { - return aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); + boolean result; + try { + result=aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); + } catch (Throwable e) { + result=true; + } + return result; + } public static boolean isBlockAir(World aWorld, int aX, int aY, int aZ) { - return aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ); - } + boolean result; + try { + result=aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ); + } catch (Throwable e) { + result=false; + } + return result; + } public static boolean hasBlockHitBox(World aWorld, int aX, int aY, int aZ) { - return aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) != null; + boolean result; + try { + result=aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) != null; + } catch (Throwable e) { + result=false; + } + return result; + } public static void setCoordsOnFire(World aWorld, int aX, int aY, int aZ, boolean aReplaceCenter) {