Started by
SparkleArts
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make an Enchantment like an Totem of Undying that triggers if the Players supposed to die.
Can someone help me with this?
Edited by SparkleArts on Sun, 01/24/2021 - 02:43
The "Entity Dies" procedure trigger is cancelable, meaning you can just test if the entity is a player and if they have your enchantment. If those things are true, then cancel the trigger.
how I cancel the trigger?
Nevermind I found the cancel Global Trigger block, thanks for the help.
It worked but I die, I want to be work like an totem of undying that prevent from death once.
hmm... Perhaps you could just prevent the damage itself with the "Before entity is hurt" trigger. To properly do this, you have to make a custom number dependency named "amount" (this can be found in the advanced tab, called Number dependency)
Then just test if "amount" is more than the player's current health. If so, then cancel the global trigger.
Thanks now my enchantment works perfectly.
Could you publish the procedure? because I didn't understand how to do it
how do i test if the entity is a player
I also would like to see this procedure pls
Ok nevermind. Im just dumb and I was doing a stupid thing. You can understand what Im doing there. Just do your own conditions to activate this "second life" and here ya go.
The main point is to choose the global trigger "Entity dies" and then cancel the trigger.
https://prnt.sc/St0DkPNLuwxm
LeZ, does cancel event trigger work for you with your screenshot's procedure?
@_andreax2
Cancel Event Trigger only works with Global Triggers that can be canceled. And these works.
@GamesofFreak i tried much times, and it doesnt work for me. I solved using "before entity hurt"
For me I also set the entity's life to the maximum to prevent death. I'm working on a death token I may have send the player to a Styx style dimension, or I may just have it restore the health and break.