Occultism

Occultism

19M Downloads

Familiars lose tame after player death

theboo opened this issue ยท 5 comments

commented

Describe the bug
Summons seem to lose their tame after player death.

To Reproduce
Steps to reproduce the behavior:
1.summon a familiar(i tested with dragon and cthulu)
2.die
3.notice u cant make it sit and it no longer follows you/gives effects

Expected behavior
they should retain their tame status

System (please complete the following information):

  • Occultism Version: 1.14.2 with no other mods outside dependencies
commented

That's actually a nifty one - Vemerion added owner caching which we need for the familiar ring, but as a side effect the old player entity would be kept alive in memory and then compared to the respawned player.

Will switch that to a weak reference & check for player death to invalidate the cache, that should fix it.

commented

Not sure if caching is worth it at all to be honest, since retrieving the owner via UUID should be constant time operation anyway. And also don't forget to change it for OtherworldBirdEntity as well, since that one does not inherit from FamiliarEntity! ๐Ÿ™‚

commented

@vemerion good point about the bird, thanks!

I didn't do a lot of testing so I went the safe route and kept the cache .. but if it was only a performance consideration and not to cover some edge cases then I'll do away with it

commented

Hmm, you might be right, if the player is in another level that the familiar, it probably can't be found unless the owner is cached.

commented

We'll do a test by user :) If issues are reported I'll revert