mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Make backpack config much more forgiving.
Make backpack config much more forgiving of white-space characters in between definitions. Also it will skip entire sections that are empty. Here are the split pattern results. https://dl.dropboxusercontent.com/u/79514/Screenshots/Features/Screenshot%202015-02-26%2001.46.29.png
This commit is contained in:
1 parent
b9b71cf015
commit
e265ffe09e
1 file changed
+2
-2
@@ -564,14 +564,14 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
}
|
||||
|
||||
private static void parseBackpackItems(String backpackIdent, String list, IBackpackDefinition target) {
|
||||
String[] parts = list.split("[;]+");
|
||||
String[] parts = list.split("(\\s*;\\s*)+");
|
||||
|
||||
for (String part : parts) {
|
||||
if (part.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String[] ident = part.split("[:]+");
|
||||
String[] ident = part.split(":+");
|
||||
|
||||
if (ident.length != 2 && ident.length != 3) {
|
||||
Proxies.log.warning("Failed to add block/item of (" + part + ") to " + backpackIdent + " since it isn't formatted properly. Suitable are <name>, <name>:<meta> or <name>:*, e.g. IC2:blockWall:*.");
|
||||
|
||||
Reference in new issue
Block a user