From e265ffe09e0c7ac148ae7a6834191763d4faef0d Mon Sep 17 00:00:00 2001 From: Brian Wiegand Date: Thu, 26 Feb 2015 01:49:49 -0800 Subject: [PATCH] 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 --- src/main/java/forestry/plugins/PluginStorage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/forestry/plugins/PluginStorage.java b/src/main/java/forestry/plugins/PluginStorage.java index cbde68f50..63acb239e 100755 --- a/src/main/java/forestry/plugins/PluginStorage.java +++ b/src/main/java/forestry/plugins/PluginStorage.java @@ -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 , : or :*, e.g. IC2:blockWall:*.");