SLH335 / netherite-extras

A Minecraft Fabric mod adding extra uses for Netherite.
https://modrinth.com/mod/netherite-extras
GNU General Public License v3.0
1 stars 1 forks source link

[Bug Report] Game crashes when using non-Netherite armor items in an anvil in v0.3.0 #5

Closed DiamondBor closed 4 months ago

DiamondBor commented 4 months ago

I haven't tried it in other versions, but in the 1.20.6 version of the mod combining some items in an anvil to combine their enchantments (in my case it was a diamond chestplate with Protection IV, Thorns II, Unbreaking II with another diamond chestplate with Thorns II and Unbreaking III) always causes a crash. I know it has something to do with this mod because the crash report has this line repeated like 50 times: at net.minecraft.class_1738.method_7878(class_1738.java:161) at net.minecraft.class_1738.redirect$dfd000$netheriteextras$canRepair(class_1738.java:519)

Here is the full crash report, incase it helps: crash-2024-05-14_20.49.13-client.txt

Edit: It also happens when I use a diamond helmet with Unbreaking III, Respiration III and Protection IV with an enchanted book with Aqua Affinity and Bane of Anthropods IV — I assume this one has something to do with helmets not being compatible with Bane of Anthropods, but normally Minecraft just doesn't add the incompatible enchantment to the first item, instead of just crashing the game. I also have enchanted other items with books containing incompatible enchantments (that had other enchantments that were compatible) and that worked, so I don't know why this is happening tbh

SLH335 commented 4 months ago

Thank you for reporting this issue!

I was able to reproduce the crash. It occurs when the player puts a non-Netherite armor item into the first anvil slot and then tries to put any other item into the second slot.

The crash was triggered by the logic that lets Netherite armor be repaired with Netherite Nuggets.

I changed the relevant code, and everything appears to be working correctly now. The issue should be fixed in the next update, v0.3.1, which I will publish shortly.

SLH335 commented 4 months ago

Version 0.3.1 is now released. Please tell me, if the issue was resolved for you.