- elseif def:find("dye") then
- local dye_color = def:match(".*_([%w_]+)")
- def = "dye:"..dye_color
- elseif def:find("flower") then
- local flower_color = def:match(".*_([%w_]+)")
- if flower_color == "red" then
- def = "flowers:rose"
- elseif flower_color == "yellow" then
- def = "flowers:dandelion_yellow"
- elseif flower_color == "white" then
- def = "flowers:dandelion_white"
- elseif flower_color == "blue" then
- def = "flowers:geranium"
- elseif flower_color == "orange" then
- def = "flowers:tulip"
- elseif flower_color == "violet" then
- def = "flowers:viola"
- elseif def:find("^group:flower$") then
- def = "flowers:rose"
- end