Easiest way to identify in an item (entity) belongs to a set of specific items
Basically, I want to make something where once I detect damage on a tool, I want to check for an item which came into existence on that tick and check its id against a set of IDs. If it belongs, I intend to summon an entity at its coordinates.
The dumb and easy solution in my brain would be to make a list of ids in data storage, and then take a copy and attempt to merge in the item's ID. If it succeeds, then
the id was not on the list. If it doesn't then it was on the list and I do the thing. idk if that'll actually work or not, and I want to know how other people might try to do this.
(For specifics, I want to make a tree-felling / veinminer type datapack)
Continue to help post