[1.16.4] Living armor crash
UnfortunateName opened this issue · 7 comments
Crash from putting on living armor after enchanting with Apotheosis. In a new world I wasn't able to recreate it after a few attempts quickly (it's 7am and I haven't slept so only did a quick test). Here's from my level.dat showing what enchants were on them, and I equipped them from boots up and crashed when I got the full set on. The helmet just has normal Minecraft enchants so I'm guessing that it wasn't specific to the helmet but something to do with the full set being equipped with one of these enchants on a piece?
I haven't used the mod before and have no idea how the living armor works as I was just getting it made to test it, so I can't think of what else might have caused it.
From the level.dat (sorry for formatting, didn't know proper way to view it so just used a basic text reader):
������Slotd���id��bloodmagic:livingboots���Count�
��tag���Damage���� �Enchantments
�������lvl�����id��minecraft:depth_strider����lvl�����id��naturesaura:aura_mending����lvl�����id��minecraft:fire_protection����lvl�����id��apotheosis:berserk����lvl�����id��minecraft:blast_protection������Slote���id��bloodmagic:livingleggings���Count�
��tag���Damage���� �Enchantments
�������lvl�����id��minecraft:blast_protection����lvl�����id��tombstone:soulbound����lvl�����id��minecraft:unbreaking����lvl�����id��minecraft:feather_falling������Slotf���id��bloodmagic:livingplate���Count�
��tag���Damage���� �Enchantments
�������lvl�����id��minecraft:fire_protection����lvl�����id��minecraft:blast_protection����lvl�����id��apotheosis:life_mending����lvl�����id��apotheosis:berserk����lvl�����id��apotheosis:icy_thorns������Slotg���id��bloodmagic:livinghelmet���Count�
��tag���Damage���� �Enchantments
�������lvl�����id��minecraft:blast_protection����lvl�����id��minecraft:respiration����lvl�����id��minecraft:aqua_affinity����lvl�����id��minecraft:fire_protection�����
Affected Versions (Do not use "latest"):
- BloodMagic: 3.0.2-7
- Minecraft: 1.16.4
- Forge: 35.1.10
Sorry about that! Had it in pastebin and the link in my clipboard and just forgot to add it. It didn't generate an actual crashlog, so here's the end of the latest as the full one was too long to add. After I get some sleep and get back on my computer I can find more if this isn't enough.
https://pastebin.com/yGh0LLdF
I'm not sure how that's null... I assume it's a fully fresh set? I wouldn't be surprised if there's a race condition.
Yup fully fresh. Created less than 5 minutes before, and enchanted within the last minute before the crash, never worn until the very end.
I also encountered this bug while playing on a server. Every time I try to log in I get an Internal Server Error message. Brand new set, crashed after equipping the last piece like the others here. BloodMagic-1.16.3-3.0.2-7. Hopefully that information can help.
I've already informed Way of the issue, but he's busy until Tuesday. I would suggest grabbing the chestplate from the creative menu instead of crafting it if you wish to use it.
TehNut 12/09/2020
@WayofTime https://github.com/WayofTime/BloodMagic/blob/1.16.3/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java#L342-L344
This should be changed to
stats = getStats(...)
if (stats != null) ...
fromPlayer checks full set already and unless you pass true to the overload, the method is still nullable
If the chest plate doesn't have stats, but they're wearing a full set, the poison level call will error
Or any other calls before that if they apply, that's just the only one outside an if
WayofTime 12/09/2020
Ah ok, because I assume enchants add an NBT tag to the item, but the training hasn't started, so to speak
TehNut 12/09/2020
Probably
Depends on when livingstats is getting created after crafting it
Creative chests are ok because they have the default data
WayofTime 12/09/2020
That'd explain that