Applying a range check for `ENUM_BLOCK_ID` is bad - we want plugins to be able to handle blocks that MCS doesn't know.
I know, the entire thing boils down to `ENUM_BLOCK_ID` being an enum, those values should be `const BLOCKTYPE`s instead. Go ahead and convert them, if you wish. It will take some work, though, to get rid of the enum usage. Especially with the items' one.