Update ItemActionTag.java

This commit is contained in:
halogly 2025-09-15 11:15:13 +08:00
parent 29c4882bcd
commit 1e21cc771a

View File

@ -105,9 +105,8 @@ public class ItemActionTag implements CommandTagResolver {
}
private Enchantment registryEnchant(NamespacedKey key) {
RegistryAccess registryAccess = RegistryAccess.registryAccess();
if (key != null) {
return registryAccess.getRegistry(RegistryKey.ENCHANTMENT).get(key);
return RegistryAccess.registryAccess().getRegistry(RegistryKey.ENCHANTMENT).get(key);
}
return null;
}