ps-dps / KeepSomeInventory

Don't lose your equipment when dying
https://modrinth.com/datapack/keep-some-inventory
MIT License
6 stars 2 forks source link

Suggestion: Make items that don't match any tag drop on death #30

Open 3th3 opened 2 months ago

3th3 commented 2 months ago

A lot of modded items don't fit under any tag, if they are tagless I think they should be dropped like other items. Spelunkery has a few items that remain in inventory after death currently so it is worth checking if changes work with it

PuckiSilver commented 2 months ago

The problem is, the list determines what gets dropped, not what gets kept, so it can never correctly capture all mods. You can add to the list using a data pack so it works for your set of mods. If you want to do that I can help you find the right files.

3th3 commented 2 months ago

I'm confused as to how the list works. Is it tag based or item based? Is it possible to have the list also define items or tags that should be kept on death no matter what as well I'm also keen on making a custom data pack for the items I want dropped via your mod as well

PuckiSilver commented 2 months ago

This is the list of items the pack uses to determine what items should be dropped on death: https://github.com/ps-dps/KeepSomeInventory/blob/2e8fa94fbb69cb76d51b0dde766c1490a549f3eb/src/data/pskeep2/tags/item/drop.json#L1

You can easily create such a list on this website: https://misode.github.io/tags/item/ Make sure to set replace to false or keep it unset.

To use your custom item tag in game along with this pack, create a new data pack (you only need the pack.mcmeta file) and then place the item tag json file downloaded from the generator and place it in <your_data_pack_folder_name>/data/pskeep2/tags/item/drop.json. If you now load this data pack, the 2 lists will get merged and everything that is on either list will get dropped.