Minecraft Data Packs / Quality of Life

Keep Some Inventory | Don't lose Weapons, Tools and Armor upon Death

  • check_circle Advancements
  • check_circle Functions
  • 2,761 views, 32 today
  • 493 downloads, 3 today
  • 37
  • 22
  • 7
PuckiSilver avatar PuckiSilver
Level 50 : Grandmaster uwu
57
Isn't it annoying when you die and your Items are far away and surrounded by danger?

With this data pack no longer, since you keep your fighting equipment like weapons, tools and armor on you when dying!

Personally I don't like playing with the KeepInventory true gamerule because it feels cheap to go somewhere dangerous without the risk loosing anything. This data pack aims to give dangerous areas the risk back they deserve while still allowing you to use your best equipment that you spent hours on farming, crafting and enchanting.

Items normally despawn after 5 minutes.
This data pack extends that to 10 minutes for items dropped by dying although this can be changed with the in game config.

The following Items are kept when dying:
Swords, Bows, Crossbows, Tridents, Tools, Armor, Elytra, Potions, Golden Apples, Written Books, Boats, Compasses, Clocks, Maps, Totems, Flint and Steals, Shears, Water Buckets, Fishing Rods, Spyglasses, Carrots on Sticks, Fungi on Sticks and Firework Rockets

The data pack is highly configurable:
You can change what items are kept/dropped by modifying the item tag at /data/ps_keep/tags/items/drop_on_death.json
The config can be changed ingame by any admin by typing /function config:keep_some_inventory


This data pack should be compatible with most other data packs.
If you find any incompatibilities or other bugs, just let me know in a comment below!
I have only tested this data pack in 1.18.2 but it should work from 1.15 to the newest version - let me know if this is not the case. :)
CompatibilityMinecraft 1.15
toMinecraft 1.19
Tags

1 Update Logs

Small Clean Up : by PuckiSilver 04/25/2022 11:04:46 pmApr 25th

- deleted some unused folders/files
- Now properly works with other data packs

Create an account or sign in to comment.

1
04/26/2022 6:25 am
Level 1 : New Miner
Reggit6182
Reggit6182 avatar
It seems shulker boxes are deleted from your inventory if you have one when you die.
1
04/26/2022 10:17 am
Level 50 : Grandmaster uwu
PuckiSilver
PuckiSilver avatar
Shulker boxes are dropped upon death like most other items - if you want to change that, remove all the different colored shulker boxes from the /data/ps_keep/tags/items/drop_on_death.json file.
1
04/27/2022 2:09 am
Level 1 : New Miner
Reggit6182
Reggit6182 avatar
It does seem like they are dropped, tested it in a multiplayer server, had a friend kill me and I neither dropped it nor kept it.
1
04/27/2022 8:14 am
Level 50 : Grandmaster uwu
PuckiSilver
PuckiSilver avatar
How about other regular items, did you drop those?
1
04/25/2022 8:44 pm
Level 84 : Elite Robot
Eastonium
Eastonium avatar
This datapack is incompatible with literally all datapacks, because your tick.json file references a nonexistent ps_keep:main.mcfunction. This breaks the #minecraft:tick function for every datapack, causing literally every pack to break. Please fix.If I'm reading your pack correctly, because you trigger your functions based on an advancement, you have no need for the tick.json.
2
04/25/2022 11:05 pm
Level 50 : Grandmaster uwu
PuckiSilver
PuckiSilver avatar
I have uploaded a new version where all unused files are removed and this issue is addressed!
2
04/15/2022 12:46 pm
Level 36 : Artisan Pixel Puncher
Shamwig
Shamwig avatar
Based on the description I really like this datapack.I had an issue one time playing in a server kinda pvp / role / medieval and we had to manually return lost armor but with this datapack it could work fluidly!

nice work!

edit: now i remember, we used KeepInventory but only in combat events. and not everyone was convinced.
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome