parent
6faa7a77ce
commit
cf800a905b
3 changed files with 28 additions and 17 deletions
|
@ -48,6 +48,17 @@ public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
|||
return getOreByName(name, 1);
|
||||
}
|
||||
|
||||
public IBlockState getBlockStateFromName(String name){
|
||||
int index = -1;
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return getStateFromMeta(index);
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
|
||||
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue