How do I perform the procedure only once per player or mob colliding with a plant ?

Started by Cherroff on

Topic category: Help with modding (Java Edition)

Last seen on 12:05, 8. Oct 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I perform the procedure only once per player or mob colliding with a plant ?

Hello everyone, please help me set up the procedures for my plant and I apologize for my clumsy English.

I'm trying to make a Thistle with thorns. I need to make it so that when a mob or player comes into contact with this Thistle, from 1 to 4 thorns fall to the ground. But it seems that my procedure for throwing out thorns is repeated for all the time that the mob or player spends in the plant - that is, not once, when he just touched it, but many many times. Can you tell me how to fix this ?

I also want that when the essence of the plant is touched, particles like its dry, brittle leaves fall from its top down to the ground. I created a single particle of a falling drop of honey, because it is dark and suits me, but in the game I could not see and notice it at all. Can create a beam of such particles ? And how ? Thank you in advance for your help !

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could have a plant with…
Fri, 09/25/2020 - 06:34

you could have a plant with different stages and have the one with the thorns use a variable to count how many thorns drop before it switches back to the thorn-less stage.

Last seen on 12:05, 8. Oct 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, that's a great idea…
Fri, 09/25/2020 - 07:46

Oh, that's a great idea,thanks Kinyoshi. Different stages are more interesting for the plant than without stages. Can't you tell me how to create a beam of several particles ? I would like that when the thorns fall out, some dark particles fall down

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know how to do…
Fri, 09/25/2020 - 07:53

I don't know how to do particles, sorry mate