Started by
Hakann
on
Topic category: Help with MCreator software
In my mod I have a mushroom, that supposed to poison the player when it attacks the player, but when I use the "When Entity Attacks: Add Potion Effect" event, it is not working. Is there a way to make it poison the player?
Edited by Hakann on Tue, 02/06/2018 - 16:15
go in the events section, in the thing that says when mob hits player, then click on it and select poison if its in there.
No, I need to do so for only one mob
i meant edit ur mob and go into the when mob hits player event. I didnt mean global events. I meant events specific to that mob
oops, i meant the when mob attacks event
go in there and select add potion effect. Poison is a potion effect, so u can do it :)
please write the code of event (when the mob hits the player)
edit the mob, click next until you see a string that says "when mob attacks", then add event and find the choice that says "add potion effect". Go in it and then type 19 for the id. 19 is the poison effect, so it should make the mob poison you. Is that what you asked for? :)
Duration means how long the poison potion lasts in seconds(i recommend doing it for at least 10 seconds), and Amplifier means how strong you want it to be(I recommend 1 so it isn't insanely strong but still hurts you).
When mob attacks event is not working
Make sure you're setting the duration correctly. The duration for the potion effect is in ticks, not seconds. There are 20 ticks in a second, so for 10 seconds set it to 200. If you have it set to 10, the effect happens for half a second which you won't notice.
That's all I can think of, if that doesn't help let me know :P
Also, try not to spam.