Hello everyone, I'm trying to override `Mob#wantsToPickUp` for custom living entities.
Is there a way to detect whether an object matches something like the `minecraft:logs` tag?
I'm currently doing this, but I'd like to go from O(n) to O(1) time complexity.
public static final Set<Item> WANTED_ITEMS;
// ...
@Override
public boolean wantsToPickUp(ItemStack itemStack) {
return WANTED_ITEMS.contains(itemStack.getItem());
}
I was thinking it would be useful if there was some sort of way to do `itemStack.hasTag(Tags.LOGS);` or something along those lines, but I couldn't find any info about tags in the docs.
Also, this would make my mod compatible with trees from other mods, unlike a set where I hardcode all of the vanilla minecraft logs.
Thanks in advance,
Franco.