*ItemData, multiple names

This commit is contained in:
Zino 2013-07-16 13:30:46 +02:00
parent 016facfc6a
commit 35492fa860
2 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,7 @@ public class ItemData {
while(scanner.hasNextLine()) {
String[] line = scanner.nextLine().split("=");
if (line.length > 1) {
String name = line[0];
String[] name = line[0].split(",");
Data data;
String[] str = line[1].split(",");
@ -40,9 +40,10 @@ public class ItemData {
mdata = Byte.parseByte(str[1]);
}
data = new Data(name, id, mdata);
map.put(name, data);
for (String n : name) {
data = new Data(n, id, mdata);
map.put(n, data);
}
}
}
}

View File

@ -1,7 +1,7 @@
Stone=1
Grass=2
Dirt=3
Cobblestone=4
Cobblestone,Cobble=4
WoodenPlank=5,0
RedwoodPlank=5,1
BirchPlank=5,2