public void addMaterials(Class<?> c) {
   if (!c.isEnum()) return;
   if (!(c.getEnumConstants() instanceof Material[])) return;
   Material[] ms = (Material[]) c.getEnumConstants();
   for (Material m : ms) {
     materials.put(m.getSymbol(), m);
   }
 }
 public void addMaterial(Material m) {
   materials.put(m.getSymbol(), m);
 }