Minecraft Data Packs / Quality of Life

Individual KeepInventory

  • check_circle Functions
  • 2,343 views, 7 today
  • 302 downloads, 3 today
  • 3
  • 0
  • 3
codefox_'s Avatar codefox_
Level 34 : Artisan Fox
7
This datapack lets you individually turn on keepInventory for players, instead of only being able to do it globally, with /gamerule keepInventory, however, it only fully retains your items and you still lose the usual amount of experience.

To turn on keepInventory for a player, use /execute as <Player> run function keepinv:keepinv_on, use [...]:keepinv_off to turn it back off.

Warning: This does not work for void deaths, as those delete your items immediately upon death. If you wish to do something against this, you could use one of my other datapacks - Anti-Void
This datapack forceloads the chunk at 0 0. If you remove this forceload, it will cease to function consistently.
CompatibilityMinecraft 1.13
toMinecraft 1.20
Tags

Create an account or sign in to comment.

1
08/30/2023 8:38 pm
Level 34 : Artisan Fox
codefox_
codefox_'s Avatar
oh yeah also when two people with the pack's keepInventory on die at the same time, the one who respawns first would get all of the items. I might be able to fix this, but it'd be a pain, so I'll only take a crack at it if someone requests it
1
11/11/2023 3:42 am
Level 1 : New Miner
Halloweeney
Halloweeney's Avatar
Hey a friend and I are setting up a server and would like to use this datapack but the issue with simultaneous death might become an issue if you are willing to take a crack at fixing it that would be greatly appreciated
1
11/20/2023 7:05 am
Level 34 : Artisan Fox
codefox_
codefox_'s Avatar
I won't lie, I completely forgot what I was even thinking of to fix it (and of course, didn't write it down), but I might give it a try sometime soon
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome