Enchanting Plus

Enchanting Plus

14M Downloads

Client freeze when trying to enchant + exp and costs being displayed wrong.

squedgy opened this issue ยท 5 comments

commented

I dont know if this is an issue with your mod or Extra Utils 2, If you create an item that required Experience levels in Extra Utils 2 (Ex. enchanted wood) player levels update, but the experience "available" to the player (within the enhanced crafting table) doesn't update. I believe that this leads to a false read on what you can enchant which, when attempting to enchant something you don't actually have the experience for it freezes the game and doesn't appear to come back.
The first picture you can see my levels and the experience
2018-09-20_13 49 01
the second is an example of the crafting recipe using experience levels
2018-09-20_13 49 11
followed by a change in levels, but not experience available as well as added enchants that I don't actually have the exp for
2018-09-20_13 50 47
finally the freeze after trying to enchant.
image

I couldn't find any info in the log, but I've attached it anyway.
latest.log

I haven't tried it with other mods that have similar crafting recipes/styles
Sorry for the long post, just hoping to help narrow it down if it's on your side

commented

Thanks for being so quick, means a lot! Keep up the good work!

commented

I don't think this is solely due to Extra Utils 2, as I don't have it but I'm getting a freeze. I enchanted an item which took me from level 37 to level 33, which seemed a little low to me, but I figured this mod was just very generous. Trying to enchant a second item, it says my available xp is 5301, and the cost is 2188, but when I clicked enchant, the game froze. I also don't see anything in my log.

Edit: Looking at an xp chart, 33 levels should be 1758 xp, which means I didn't have enough for the enchant, and my xp was grossly misreported.

Edit2: After reloading the game I see all my experience is gone, but the item remains unenchanted. It seems the table isn't properly updating how much xp the player actually has and is trying to enchant still even if you don't have enough, causing the freeze.

commented

Thanks for the report, your issue has helped me identify an endless loop when removing experience. If they player has an unexpected experience value, like less than the cost, it will try to take exp away from you forever. This is why you freeze, and why your EXP will be 0 when you log back in. Fixing this issue is easy enough, and I already have a fix that will stop the freezes.

Unfortunately, as @sweetsosweet has commented, there does seem to be an issue with calculating the amount of experience the player has. In the game code there is a "experienceTotal" value which represents how much EXP the player has, however many mods, and parts of vanilla completely ignore updating this value, which is why it is sometimes incorrect. There are ways to fix this as well, however it will take a little bit longer to fix.

commented

This issue should now be fixed, and there is a new version of the mod on CurseForge with the new changes. https://minecraft.curseforge.com/projects/enchanting-plus/files/2619195

Thanks again for the report, and info.

commented

Yay, thanks for the quick fix! As you've no doubt noticed from the curse comments, everyone's crazy excited to have this mod back, so thanks so much for everything you've done~