mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 19:49:54 +00:00
Fix #1262 NullPointerException from null name in the OreDictionary
This commit is contained in:
1 parent
e23a406e6f
commit
d3c7d7141d
1 file changed
+7
-3
@@ -367,9 +367,13 @@ public class PluginStorage extends BlankForestryPlugin {
|
||||
|
||||
List<String> oreDictNameList = new ArrayList<>();
|
||||
for (String name : OreDictionary.getOreNames()) {
|
||||
for (String regex : backpackConf.getStringList()) {
|
||||
if (name.matches(regex)) {
|
||||
oreDictNameList.add(name);
|
||||
if (name == null) {
|
||||
Log.error("Found a null oreName in the ore dictionary");
|
||||
} else {
|
||||
for (String regex : backpackConf.getStringList()) {
|
||||
if (name.matches(regex)) {
|
||||
oreDictNameList.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user