Material mat = parseMaterial(text, null);
if (mat == null)
return def;
tdat.setMaterial(mat);
} else if (dat instanceof Wool) {
Wool wdat = (Wool) dat;
DyeColor color = parseEnum(DyeColor.class, text, null);
if (color == null)
return def;
wdat.setColor(color);
} else if (dat instanceof Tree) {
Tree tdat = (Tree) dat;
TreeSpecies species = parseTreeSpecies(text, null);
if (species == null)
return def;