Custom Enchantments appearing on unsupported items
I've been experimenting with custom enchantments so far, but my current project has me stumped.
I'm trying to create enchantments that are exclusive to certain tool tiers. And initially, that worked as intended. Now that I'm trying to create a suite of gold-exclusive enchantments (which are variants of most vanilla ones, with a higher max level), however, those restrictions are breaking down. The gold ones never respected them, and my previous three enchantments (two for netherite, one for stone) can now also appear on anything.
Things get even more confusing with JEI, because even when it shows the recipes as they are intended (which would imply that I specified things correctly), I can still use anvils to put enchants on unintended items.