Various Issues With Lichdom
Closed this issue · 5 comments
getActiveEffects
returns a collection that is still backed by the map, and removeEffectNoUpdate
operates on the map, so this will CME as I just found out.
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1605) ~[?:?] {}
at java.util.HashMap$ValueIterator.next(HashMap.java:1633) ~[?:?] {}
at com.Polarice3.Goety.common.events.LichEvents.onPlayerLichdom(LichEvents.java:93) ~[Goety-2.3.3.jar%23494!/:2.3.3] {re:classloading}
Also it might not be a good idea to use removeEffectNoUpdate
since it doesn't run cleanup on attribute modifiers or fire events, so a hypothetical zombie-immune effect that reduces an attribute will permanently lower it upon lichdom. This also includes soul hunger itself, so the player would be permanently stuck with reduced move/attack speed and damage.
As coded, iron golems will ignore invisibility and other mods that add stealth mechanics (like my own) to attack the lich, as well as ignore any potential follow range upgrades from other mods. getVisibilityPercent
can be used to check whether the golem can see the player.
Lastly, this is a bit more of a selfish request, but my mod tags a few items (claws, gauntlets, gloves, and the like) from other mods as wardance:unarmed
, which allows them to be used with unarmed techniques from my mod. It would be kind of neat if they could apply to lich's withering touch as well. Feel free to ignore this one though.
And just a small question, do arcas work across dimensions for revival and the like?
Thank you for informing me! I'll fix these issues right away! And that you for giving me tips on how to fix the issues, it's really appreciated. :) 👍
Oh yeah, forgot to answer your question. Yes, the Arca works across dimensions!
in retrospect it may be weird for one mod to depend on another's tags, so perhaps a tag like goety:lich_wither_items
that default to just minecraft:air
would be more fitting.
Yeah, I just discovered a long time mistake when it comes to the Wither Touch. It's supposed to work if the player isn't holding anything and attack empty-handed, but currently it works if the player attacks even with items. Will use the tag as you suggested! Sounds like a good way to fix this bug!
Should all be fixed in 2.3.4 for 1.19.2 and 1.32.0 for 1.16.5!