Detecting when a Splash Potion hits a block

Started by Bre3ezyy on

Topic category: Help with modding (Java Edition)

Last seen on 21:44, 22. Mar 2024
Joined Nov 2023

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detecting when a Splash Potion hits a block

So, I'm creating a mod for my friend's server, and he wants me to add "purification potions" that can turn mycelium into grass

I was wondering if it is possible to detect when a splash potion hits a specific block? The only thing I can think of is maybe finding where the potion entity was just before dying/despawning and then detecting the blocks around it, but even then I'm not 100% sure how to go about it

Any help would be greatly appreciated!