Properly split the material name (Fixes #114)

This commit is contained in:
Phoenix616 2018-03-14 15:08:51 +01:00
parent d04e17450b
commit 26ddb52434

View File

@ -281,8 +281,8 @@ public class MaterialUtil {
return null;
}
for (int index = split[0].indexOf(' '); index >= 0; index = split[0].indexOf(' ', index + 1)) {
material = getMaterial(split[0].substring(index));
for (int index = split[0].indexOf(' '); index >= 0 && index + 1 < split[0].length(); index = split[0].indexOf(' ', index + 1)) {
material = getMaterial(split[0].substring(index + 1));
if (material != null) {
if (durability == 0) {