#Help with little datapack

1 messages · Page 1 of 1 (latest)

plush mason
#

I wanted to make a datapack for a little server with friends and i wanted to give a kit after death but only death by a player like not fall damage nor mobs i've tried with predicates but it seems not to work. I'm in 1.16.5.

prisma sierraBOT
#

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

dusk tendon
#

You can do this with an advancement, entity_killed_player criteria, which then checks if the source entity is a player and runs a reward function to give the kit and revoke the advancement

plush mason
#

{ "criteria": { "entity_killed_player": { "trigger": "minecraft:entity_killed_player", "conditions": { "entity": { "type": "minecraft:player" } } } } }

like this

dusk tendon
#

Looks right

plush mason
#

i tested it and it give the stuff but once i click respawn it disappear

dusk tendon
#

Ah that makes sense, you'll need to have the advancement also check if the player is alive as a separate criteria. Each criteria gets tracked separately, so if a player is killed by another player, that crtera will grant, but the whole advancement won't grant until the second criteria is met. Then you can still revoke the entire advancement

flat dew
#

Or you do /gamerule keepInventory true
My brain says that works too, but i have no idea

plush mason
prisma sierraBOT
storm rose
#

oh

prisma sierraBOT