fix: fixed mod compat crash related to checking for enchanted tetra items
@@ -31,8 +31,8 @@ public class MixinItemStack {
private void isEnchanted(CallbackInfoReturnable<Boolean> callback) {
if (getItem() instanceof IModularItem) {
ItemStack itemStack = getInstance();
- IModularItem item = (IModularItem) getItem();
- callback.setReturnValue(itemStack.getTag().contains("Enchantments", 9) || item.hasEnchantments(itemStack));
+ callback.setReturnValue(itemStack.hasTag()
+ && (itemStack.getTag().contains("Enchantments", 9) || ((IModularItem) getItem()).hasEnchantments(itemStack)));
callback.cancel();
}
