#copying dead player inventory to chest

1 messages · Page 1 of 1 (latest)

queen dawnBOT
#

im making a grave datapack and im trying to make it so that the player's inventory gets copied to a chest that anyone can open/close
right now i just have tick/load

#load
tellraw @a {"color":"yellow","text":"Thanks for using Everhaul: Graves!"}
tellraw @a {"color":"yellow","text":"Best intended to use Everhaul! with this simutaneously!"}
playsound minecraft:block.note_block.chime master @a ~ ~ ~ 10000000000000000
scoreboard objectives add deaths deathCount deaths
scoreboard objectives add id dummy id

gamerule keepInventory true
#tick
execute as @a unless score @s id = @s id store result score @s id run scoreboard players add #id_holder id 1
execute as @a[scores={deaths=1..}] at @s run function grave:gravelogic/player_died
execute as @e[type=minecraft:interaction, tag=grave] at @s run function grave:gravelogic/collect_items

I was following a tutorial but it doesnt use chests, and all the other ones are outdated & old

plucky lava
#

how would i copy the inventory of a dead player to the chest? i cant figure it out for the life of me

thorny foxBOT
#

-# (helpers summoned) <@&1166082198152159386> <@&1202694677766348840>

verbal bronze
#

maybe you could make sure keep inventory is on, and then once a player dies, copy their inventory to a storage and clear their inventory

#

actually maybe copying it directly to the grave entity under data would be better

#

(tag or reply if you need more help c:)

twilit birch
unreal kernel
#

Yeah I dont see how you would copy anything but an empty inventory from a player without keepInventory