This is currently gamebreaking. Unlike your original intent you can pull orange / legendary out of barrels, boxes, crates, etc.
I liked what you originally intended for the mod which is big chests should give big loot. Barrels and boxes? Not so much...
i did know about that problem, it should now be fixed. (in the build i upload tomorrow anyway)