2

I need help with custom totem effects

GrimWither 9/5/22 10:50 pm
206
9/13/2022 4:05 pm
I'm making a datapack that will be introducing a new totem that gives it own effects. I've tired doing this with advancements and scoreboards and I seem to not be having any luck. I was wandering if someone can help me accomplish my task in a simple manner.
Posted by
GrimWither
Level 38 : Artisan Engineer
23

  Have something to say?

JoinSign in

8

Papa Enny
09/09/2022 5:04 pm
Level 62 : High Grandmaster Answer Dwarf
How about making a procedure, that gives you a specific effect when the entity dies
IF entity dies
DO give effect

- I am using MCreator Modmaker logic by it, how I would see it
2
GrimWither
09/09/2022 6:05 pm
Level 38 : Artisan Engineer
I'm wanting to do this via data pack or command blocks, so is it possible for me to detect a totem of undying with a nbt tag die?
2
Papa Enny
09/10/2022 5:29 am
Level 62 : High Grandmaster Answer Dwarf
I think so, NBT is an advanced category, so it can be possible to get a specific effect(inside the death nbt, I think)
2
SwitchedCube
09/12/2022 11:05 am
He/Him • Level 33 : Artisan Loremaster
history
you can also

-give a player a special tag when the player has a totem in main/off hand
-remove it when its not in hand,
-then do /scoreboard objectives add <name> deathCount and check if a player has both that and tag
(/execute if entity @p[​tag=<tagname>,scores={deaths=1..}] run function <functionname>)
-but also make tag giving thing a tick late so that the check command can find the tag even a tick after the player has lost the totem
2
Papa Enny
09/13/2022 4:05 pm
Level 62 : High Grandmaster Answer Dwarf
GrimWither check this
2
GrimWither
09/10/2022 11:02 am
Level 38 : Artisan Engineer
Ok ill try this
2
Papa Enny
09/11/2022 11:02 am
Level 62 : High Grandmaster Answer Dwarf
good
1
GrimWither
09/09/2022 10:47 am
Level 38 : Artisan Engineer
Help
2

Welcome