Destroy particles on collision

Started by Baboobraz on

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 1. Dec 2023
Joined Feb 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Destroy particles on collision

I have a particle of petals falling from leaves, and I want to destroy them when they hit any block that isn't the leaf block, because right now they just spin in circles on the ground until they die. How can I do this?

Last seen on 12:31, 22. Jan 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add a condition to the …
Thu, 06/09/2022 - 23:32

add a condition to the "additional expiry condition" in the particle editor

the way conditions work is that you check if a thing is true, then return true, which will make it do the thing

then put a return false block outside of the condition, but with no condition around it, so that it always defaults to not doing the thing

in this case the thing is the particle disappearing

in the "advanced" section, there's a blue thing that says "dependencyName", replace dependencyName with onGround and put that in your condition

if you see onGround pop up on the right in the required dependencies list, you are doin it right

Last seen on 12:31, 22. Jan 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if that doesn't work, then…
Thu, 06/09/2022 - 23:33

if that doesn't work, then check if the block at its position is not leaves