The Conditional Keep Inventory Mod
Have you ever wanted to avoid loosing forever your stuff in some critical situations, but not to have the Keep Inventory set to true for all death?
Haven't we all hoped not to lose our stuff to a slip in the void yet without losing the thrill to go get it back without dying again when killed by some mob in a deep cave?
Well then despair no more! Because I right here have the perfect solution for you!
I hereby present you... the Conditional Keep Inventory mod!
What it does
This mod intends to allow you to choose as exactly as you want when should the Keep Inventory apply, and when shall it not.
Through a config file and a command, I have made this mod so that you can set both a whitelist and a blacklist of conditions, which would condition whether the Keep Inventory can, or not, apply.
Mod showcase
Links
- CurseForge
- Modrinth
- Source code
- Wiki
- Issues
- Fabric API (Modrinth)
- Fabric API (CurseForge)
- Fabric mod loader
- Fabric Server-Side Dev Discord
Dos and Don'ts
You can:
- Download the mod for your own use
- Use the mod in a modpack (only if hosted on CurseForge and/or I am mentioned as being the author)
- Share the mod's existence to your friends and relatives
- Read the source code in order to know how could I achieve something, re-use little pieces of it
- Enjoy the mod, of course!
But you can't:
- Re-upload the mod
- Share it as your own creation
- Use it publicly without letting people know where does it come from
- Make monetary profit on this mod (doesn't include making money on a server using this mod, but does for making money on using funcionalities of this mod ; might be subject to discussions)
- Copy-paste the full code in your own project
Questions and comments?
If you have any question, any suggestion, or just want to share your thoughts on the mod, don't hesitate to leave a comment. I'd rather you submit all bugs through GitHub, by opening an issue. You can as well do it for suggestions, for those I don't really care
Needed this exact mod for forge 1.16.5
Anyone know of an alternative
In reply to idiotface:
Sorry, but I don't know of any. If there is enough demand, I might look into porting this mod for Forge... But I'd rather not make any promises
So.. I finally found some lava to test this, almost fell in, then decided to make a backup and test.
At first, I thought i was due to my grave mod, Forgotten Graves, but no, for some reason, the conditional lava config doesn't work. I'm going to have to test the other ones real quick.
In reply to ShadoUrufu:
Oh my.
It is true that I never tested the compatibility with graves mods
But now that I think about it, they might overhaul some higher functions, and therefore completely disallow my mod to do anything.
Yet, for having tested it myself, multiple times, I can guaranty that this does work for lava, as well as void, lightning, fire... All death you can find in the example as well as in the config page of the wiki.
So I guess I might have to give a look at where this grave mod does its overhaul, although since I don't want to have conflicts with other mods, I prefer not to change things too high.
In reply to Nerjal_Nosk:
it's alright. It might also not be applying because I'm on 1.18. Even though I see it in mod menu. And I tested it without the graves mod, and keepintentory did not apply, so maybe a config there is turned off.
In reply to ShadoUrufu:
Oh, yeah, that might be a thing.
I still haven't done anything to update my mod to 1.18, neither have I tried it at all. I am still waiting for more info, about whether or not there'll be a 1.18.1+ version, and mostly why. As if ever anything about death gets twisted around, it might require me to rework my mod (and as all dev properly grown up, I am but a lazy man and don't want to do the same job twice nor thrice)
So yeah, sorry about that, but if anything, you might prefer playing on 1.17 if you really want to use my mod, as that version I might update (but not the 1.16. Never. It was already too much pain to backport from Java16 to Java8)
In reply to Nerjal_Nosk:
maybe if I go back to 1.17.1. I've been wanting to play 1.18. it's alright, i'll probably go back after a bit, or wait for an uptade. either way, I love the idea of your mod.
In reply to ShadoUrufu:
Why thank you, I'm glad someone likes it so much ^^
I know it isn't much, I know it isn't a much known mod, maybe if more people knew it it'd be more downloaded, but hey, it i my very first public mod, the first project I have put so much time into, and seeing that it has been downloaded so many times is already so much, I cannot help but feeling somewhat proud, and grateful.
Can I bel able to use this mod if I don't want to loose anything under any condition (like the normal keep inventory true mods). If so what is it I have to edit in the config file
In reply to blackcobrajd:
Do you actually want to have the exact keepInventory but without the keepInventory ? why not just having the vanilla keepInventory then?
Although I actually haven't done anything to always enable some element in a condition, since it counts as "validated" when absent, and I made the mod so it skips all empty condition.
In reply to Nerjal_Nosk:
would it be possible for you to upload an extra config file with some default presets in it? I've been trying to figure it out from the wiki and it doesn't really work.
I'm specifically trying to enable keepinventory whenever I die to lava, the void, or explosions. (creeper, ghast, wither), or basically any way that would cause my items to get deleted. And I also want to avoid loosing my items in a difficult location, such as a dungeon room, or when fighting the end dragon. mostly because retrieving items in such conditions is a bit hard, and not all that fun. (you don't have to specifically do these)
but yeah, been trying to figure out the wiki and it just gives me some issues.
In reply to ShadoUrufu:
Why of course.
Although you might just want to use the commands, if setting up the config file gets a little tricky, I can do that.
But I might not do it here (unless I can edit an uploaded version), as I don't wish to make another upload just for that. But it sure will be available at least on github.
In reply to Nerjal_Nosk:
that's fine with me, thank you. and i've been trying to edit it through the config file itself, probably why it's hard for me to do.
In reply to ShadoUrufu:
Done!
You can access the examples here: examples folder
(Although for repeated explosions you might have to wait for the 1.2.0, since I haven't yet implemented explosion's death properly, unless from entities, still have to figure out how to recognize death from TNT lit by a player. But I cannot guaranty you any date for a 1.2.0 update, since I am currently working on some personally more important stuff and cannot afford truly working on the mod)
You can as well suggest me new ones to do at any time
I might as well rework that wiki, since it wasn't clear enough, though...
I hope it helps you ^^
In reply to Nerjal_Nosk:
thanks a lot. and as long as I get protection from any explosion, i'm fine with it. I play in solo, and I just want to avoid getting my items erased.
But yeah, take your time.
In reply to ShadoUrufu:
You're welcome ^^
By the way, I daily check up my CF notifications, and as this is my mod, all comment is a notification for me. So no need to reply on someone else's comment, it'd avoid notifying them as well, if they aren't concerned ^^"