Addition of a generic `isIn` for use with `TagKeys` that that do not have easy methods of querying
dexman545 opened this issue ยท 0 comments
... such as Enchantment
s.
enchantment -> {
var maybeKey = Registry.ENCHANTMENT.getKey(enchantment);
return maybeKey.filter(enchantmentRegistryKey ->
Registry.ENCHANTMENT.entryOf(enchantmentRegistryKey).isIn(tagKey))
.isPresent();
}
This makes using ConventionalEnchantmentTags
somewhat annoying to implement, and serves as a barrier for other registries to be used with tags.
One solution would be to inject a better way to get the registry key, as well as a method in TagKey
to query if an object is in that specific tag.