Started by
Mauviette
on
Topic category: Help with Minecraft modding (Java Edition)
Hello,
I am trying to make a potion effect that damages any entity attacking the player.
I started by creating the effect, then a procedure (here is the code):
At the bottom right of my screen are the provided dependencies :
But the source entity dependency is not detected, so it's dependency is missing (FireThorns procedure)
Am I doing something wrong?
Thank you
Hello there,
I think that the source entity dependency is not provided by the place that you put it in (when effect started/applied). That's why it don't accept the procedure.
Thank you for your reply, I may be wrong but Isn't the global trigger supposed to provide dependencies?
So the global trigger provides dependencies to the procedure, that is true and that part of the implementation is fine. However, when you call a procedure from the element-specific triggers (like in the third image), the only dependencies that are provided are the ones that are shown on that screen - which are entity, x, y, z, world, and amplifier - which is why you cannot add the procedure to the trigger in the third image, since it does not provide the "source entity" dependency.
Then how do you make it work ? I need to know because I have something similar to do
The Entity is the Source Entity. It means that the Entity that has this Potion Effect is it applied.
What you can do is to make a blank Potion Effect and then a Procedure with the Entity attacked Global Trigger.
Then checks in there if the Event/target Entity has the Potion Effect and then you can use the Source Entity to damage the Entity that attacked the Event/target Entity that has the Potion Effect.