Add some more null checks to Drill's block harvesting.

Should close #175
This commit is contained in:
Ellpeck 2016-07-27 02:01:15 +02:00
parent f96c60f0bb
commit 1418d6fb7f

View file

@ -501,14 +501,19 @@ public class ItemDrill extends ItemEnergy{
}
private boolean hasExtraWhitelist(Block block){
String name = block.getRegistryName().toString();
if(block != null){
ResourceLocation location = block.getRegistryName();
if(location != null){
String name = location.toString();
if(name != null){
for(String list : ConfigStringListValues.DRILL_EXTRA_MINING_WHITELIST.getValue()){
if(list.equals(name)){
for(String s : ConfigStringListValues.DRILL_EXTRA_MINING_WHITELIST.getValue()){
if(s != null && s.equals(name)){
return true;
}
}
}
}
}
return false;
}
}