aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-04-10 12:09:28 +0200
committerTechnus <daniel112092@gmail.com>2016-04-10 12:09:28 +0200
commit7a047d977aa1f9aa4ca84bb13f6efcc2693d1f0a (patch)
treec0372d9c977a2fcacd268f784fdfa762ca583ed9 /src/main
parent3cf92b0a59f666b329da1ee30ed546291d87f5c3 (diff)
downloadGT5-Unofficial-7a047d977aa1f9aa4ca84bb13f6efcc2693d1f0a.tar.gz
GT5-Unofficial-7a047d977aa1f9aa4ca84bb13f6efcc2693d1f0a.tar.bz2
GT5-Unofficial-7a047d977aa1f9aa4ca84bb13f6efcc2693d1f0a.zip
Update GT_Utility.java
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java26
1 files changed, 22 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 2fd4b477db..28b1dbad9d 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -1035,15 +1035,33 @@ 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) {
@@ -1969,4 +1987,4 @@ public class GT_Utility {
}
}
-} \ No newline at end of file
+}