You're in Grave Danger

You're in Grave Danger

17M Downloads

Taking keepInventory into account

yelldow opened this issue ยท 3 comments

commented

This seems to be both an issue and a feature - a way to allow the mod to respect /gamerule keepInventory true. I've looked through the issues and couldn't find anything related to this, specifically, so I'm sorry if this is repetitive to any previous issues.

Describe the solution you'd like
Upon dying, if keepInventory is on, I'd like to spawn with my inventory. Currently, even if keepInventory is on, I do not spawn with my items and XP the way I would if this mod wasn't loaded.

Describe alternatives you've considered
Mostly, I've considered the possibility of including a config option to respect keepInventory. If true, keepInventory has an effect on respawn; if not, YiGD will always prevail, regardless.
Ideally, no matter what option is set, the inventory would be logged the way any other death would be, whether keepInventory is effective or not.

Additional context
I'm requesting this because I'm building a modpack, and for this pack I'd prefer players to have a choice over whether they keep their inventory on death or a gravestone is created, since travel is fairly prevalent in this specific pack.

Thank you for considering this! Thank you for developing the mod, it works super well (apart from this minor note)

P.S. I'm developing this pack on 1.18.2, not 1.19, so I can only say that I'd appreciate it very much if this was implemented in that version - thank you regardless

commented

I do have this implemented, and I'm not quite sure why it's not working for you, as it does for me. If keepInventory is on, the entire grave code should just be skipped. I guess that did not happen. Are you actually getting a grave to spawn, or does your items just disappear? Are you using the latest version as well?

commented

You were right! You did have this implemented. Minor lapse on my part, I apologize! I didn't even have keepInventory on - on testing with the option enabled (as I had thought was the case) in a new world, it works. Thank you for the time, anyhow. (Would you happen to have a donation link?)

commented

No worries. I appreciate people that report anything as soon as there's any sign of a problem. I would like to think that can make other people comfortable in reporting what they might think of as a small issue that maybe doesn't need fixing after all, which could be really good for me to get my hands on that kind of information, so I can make the mod as free from bugs as possible. I think for this mod it's quite an important trait that it always works, even though sometimes it might not.
About the donation link, no, I do not have a donation link. May set one up if I get one more question about it (then it would actually be multiple people asking), or when I release my next mod (which might be in a few months or longer). It's great to see someone actually asking about it though!