aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/bloodasp/galacticgreg/api/AsteroidBlockComb.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/main/java/bloodasp/galacticgreg/api/AsteroidBlockComb.java b/src/main/java/bloodasp/galacticgreg/api/AsteroidBlockComb.java
index 901a94e270..5dfb2c57c2 100644
--- a/src/main/java/bloodasp/galacticgreg/api/AsteroidBlockComb.java
+++ b/src/main/java/bloodasp/galacticgreg/api/AsteroidBlockComb.java
@@ -60,13 +60,18 @@ public class AsteroidBlockComb extends BlockMetaComb {
boolean tFlag = true;
String otherName = Block.blockRegistry.getNameForObject(otherObj.getBlock());
String thisName = Block.blockRegistry.getNameForObject(this.getBlock());
- if (!otherName.equals(thisName))
- tFlag = false;
-
- if (!(otherObj.getMeta() == this.getMeta()))
- tFlag = false;
-
- if (!(otherObj.getOreMaterial() == this.getOreMaterial()))
+ if (otherName != null && thisName != null)
+ {
+ if (!otherName.equals(thisName))
+ tFlag = false;
+
+ if (!(otherObj.getMeta() == this.getMeta()))
+ tFlag = false;
+
+ if (!(otherObj.getOreMaterial() == this.getOreMaterial()))
+ tFlag = false;
+ }
+ else
tFlag = false;
return tFlag;